mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 12:57:06 +02:00
UI: Add "Run" action to run current script in editor (#1987)
This commit is contained in:
@@ -6,6 +6,7 @@ import { KEY } from "./KeyboardEventKey";
|
||||
export enum ScriptEditorAction {
|
||||
Save = "ScriptEditor-Save",
|
||||
GoToTerminal = "ScriptEditor-GoToTerminal",
|
||||
Run = "ScriptEditor-Run",
|
||||
}
|
||||
|
||||
export const SpoilerKeyBindingTypes = [
|
||||
@@ -220,7 +221,7 @@ export const DefaultKeyBindings: Record<KeyBindingType, [KeyCombination | null,
|
||||
},
|
||||
null,
|
||||
],
|
||||
"ScriptEditor-Save": [
|
||||
[ScriptEditorAction.Save]: [
|
||||
{
|
||||
control: true,
|
||||
alt: false,
|
||||
@@ -236,7 +237,7 @@ export const DefaultKeyBindings: Record<KeyBindingType, [KeyCombination | null,
|
||||
key: "S",
|
||||
},
|
||||
],
|
||||
"ScriptEditor-GoToTerminal": [
|
||||
[ScriptEditorAction.GoToTerminal]: [
|
||||
{
|
||||
control: true,
|
||||
alt: false,
|
||||
@@ -252,6 +253,16 @@ export const DefaultKeyBindings: Record<KeyBindingType, [KeyCombination | null,
|
||||
key: "B",
|
||||
},
|
||||
],
|
||||
[ScriptEditorAction.Run]: [
|
||||
{
|
||||
control: true,
|
||||
alt: false,
|
||||
shift: false,
|
||||
meta: false,
|
||||
key: "Q",
|
||||
},
|
||||
null,
|
||||
],
|
||||
};
|
||||
|
||||
// This is the set of key bindings merged from DefaultKeyBindings and Settings.KeyBindings.
|
||||
|
||||
Reference in New Issue
Block a user