mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-03 20:07:34 +01:00
Merge pull request #2055 from hexnaught/s-key-editor-save-patch
Change editor save keybind to be CTRL/CMD + S
This commit is contained in:
commit
7215e73f41
@ -277,9 +277,11 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
function maybeSave(event: KeyboardEvent): void {
|
function maybeSave(event: KeyboardEvent): void {
|
||||||
if (Settings.DisableHotkeys) return;
|
if (Settings.DisableHotkeys) return;
|
||||||
//Ctrl + b
|
|
||||||
if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) {
|
// CTRL/CMD + S
|
||||||
|
if (event.code == `KeyS` && (event.ctrlKey || event.metaKey)) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -622,7 +624,7 @@ export function Root(props: IProps): React.ReactElement {
|
|||||||
<Typography color={updatingRam ? "secondary" : "primary"} sx={{ mx: 1 }}>
|
<Typography color={updatingRam ? "secondary" : "primary"} sx={{ mx: 1 }}>
|
||||||
{ram}
|
{ram}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button onClick={save}>Save (Ctrl/Cmd + b)</Button>
|
<Button onClick={save}>Save (CTRL/CMD + S)</Button>
|
||||||
<Typography sx={{ mx: 1 }}>
|
<Typography sx={{ mx: 1 }}>
|
||||||
{" "}
|
{" "}
|
||||||
Documentation:{" "}
|
Documentation:{" "}
|
||||||
|
Loading…
Reference in New Issue
Block a user