Skip to content

Commit

Permalink
Fix debug keybindings (#657)
Browse files Browse the repository at this point in the history
Replace 't' with '}'. Fixes #648
Fix keybindings to actually work on other pages
  • Loading branch information
sciencewhiz authored Jan 21, 2024
1 parent 9048f92 commit 3e79208
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions wpilib-utility-standalone/src/generatorscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ function displayItems(toDisplay: IDisplayJSON[], rootFolder: string, java: boole
}

document.addEventListener('keydown', (e) => {
if (e.which === 123) {
if (e.key === '{') {
remote.getCurrentWindow().webContents.toggleDevTools();
} else if (e.which === 116) {
} else if (e.key === '}') {
location.reload();
}
});
Expand Down
4 changes: 2 additions & 2 deletions wpilib-utility-standalone/src/mainscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import * as electron from 'electron';
const remote = electron.remote;

document.addEventListener('keydown', (e) => {
if (e.which === 123) {
if (e.key === '{') {
remote.getCurrentWindow().webContents.openDevTools();
} else if (e.which === 116) {
} else if (e.key === '}') {
location.reload();
}
});
Expand Down
2 changes: 1 addition & 1 deletion wpilib-utility-standalone/src/projectcreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ window.addEventListener('load', async () => {
document.addEventListener('keydown', (e) => {
if (e.key === '{') {
bWindow.webContents.openDevTools();
} else if (e.key === 't') {
} else if (e.key === '}') {
location.reload();
}
});
Expand Down
4 changes: 2 additions & 2 deletions wpilib-utility-standalone/src/riolog/script/implscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export function sendMessage(message: IIPCReceiveMessage) {
}

document.addEventListener('keydown', (e) => {
if (e.which === 123) {
if (e.key === '{') {
remote.getCurrentWindow().webContents.toggleDevTools();
} else if (e.which === 116) {
} else if (e.key === '}') {
location.reload();
}
});
Expand Down

0 comments on commit 3e79208

Please # to comment.