Skip to content

Commit 3e79208

Browse files
authored
Fix debug keybindings (#657)
Replace 't' with '}'. Fixes #648 Fix keybindings to actually work on other pages
1 parent 9048f92 commit 3e79208

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

wpilib-utility-standalone/src/generatorscript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ function displayItems(toDisplay: IDisplayJSON[], rootFolder: string, java: boole
185185
}
186186

187187
document.addEventListener('keydown', (e) => {
188-
if (e.which === 123) {
188+
if (e.key === '{') {
189189
remote.getCurrentWindow().webContents.toggleDevTools();
190-
} else if (e.which === 116) {
190+
} else if (e.key === '}') {
191191
location.reload();
192192
}
193193
});

wpilib-utility-standalone/src/mainscript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import * as electron from 'electron';
33
const remote = electron.remote;
44

55
document.addEventListener('keydown', (e) => {
6-
if (e.which === 123) {
6+
if (e.key === '{') {
77
remote.getCurrentWindow().webContents.openDevTools();
8-
} else if (e.which === 116) {
8+
} else if (e.key === '}') {
99
location.reload();
1010
}
1111
});

wpilib-utility-standalone/src/projectcreator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ window.addEventListener('load', async () => {
175175
document.addEventListener('keydown', (e) => {
176176
if (e.key === '{') {
177177
bWindow.webContents.openDevTools();
178-
} else if (e.key === 't') {
178+
} else if (e.key === '}') {
179179
location.reload();
180180
}
181181
});

wpilib-utility-standalone/src/riolog/script/implscript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export function sendMessage(message: IIPCReceiveMessage) {
2424
}
2525

2626
document.addEventListener('keydown', (e) => {
27-
if (e.which === 123) {
27+
if (e.key === '{') {
2828
remote.getCurrentWindow().webContents.toggleDevTools();
29-
} else if (e.which === 116) {
29+
} else if (e.key === '}') {
3030
location.reload();
3131
}
3232
});

0 commit comments

Comments
 (0)