Added alt g shortcut to gang and alt b shortcut to bladeburner

This commit is contained in:
Olivier Gagnon 2021-03-23 15:25:18 -04:00
parent 6efc3ec75e
commit 40713a4112
3 changed files with 53 additions and 27 deletions

@ -31,6 +31,8 @@ Alt + f Switch to 'Factions' page
Alt + a Switch to 'Augmentations' page
Alt + u Switch to 'Tutorial' page
Alt + o Switch to 'Options' page
Alt + g Switch to 'Gang' page
Alt + b Switch to 'Bladeburner' page
========== ===========================================================================
Script Editor

@ -134,7 +134,7 @@ $(document).keydown(function(e) {
} catch(e) {}
if (!Player.isWorking && !redPillFlag && !inMission && !cinematicTextFlag) {
if (e.keyCode == 84 && e.altKey) {
if (e.keyCode == KEY.T && e.altKey) {
e.preventDefault();
Engine.loadTerminalContent();
} else if (e.keyCode === KEY.C && e.altKey) {
@ -174,6 +174,12 @@ $(document).keydown(function(e) {
} else if (e.keyCode === KEY.U && e.altKey) {
e.preventDefault();
Engine.loadTutorialContent();
} else if (e.keyCode === KEY.B && e.altKey) {
e.preventDefault();
Engine.loadBladeburnerContent();
} else if (e.keyCode === KEY.G && e.altKey) {
e.preventDefault();
Engine.loadGangContent();
}
}

@ -4,30 +4,48 @@ import { IMap } from "../../src/types";
* Keyboard key codes
*/
export const KEY: IMap<number> = {
A: 65,
B: 66,
C: 67,
CTRL: 17,
D: 68,
DOWNARROW: 40,
E: 69,
ENTER: 13,
ESC: 27,
F: 70,
H: 72,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
R: 82,
S: 83,
TAB: 9,
U: 85,
UPARROW: 38,
W: 87,
"1": 49,
"2": 50,
CTRL: 17,
DOWNARROW: 40,
ENTER: 13,
ESC: 27,
TAB: 9,
UPARROW: 38,
"0": 48,
"1": 49,
"2": 50,
"3": 51,
"4": 52,
"5": 53,
"6": 54,
"7": 55,
"8": 56,
"9": 57,
A: 65,
B: 66,
C: 67,
D: 68,
E: 69,
F: 70,
G: 71,
H: 72,
I: 73,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
Q: 81,
R: 82,
S: 83,
T: 84,
U: 85,
V: 86,
W: 87,
X: 88,
Y: 89,
Z: 90,
};