Merge pull request #3872 from ilkecan/add-options-shortcut

UI: Add a keyboard shortcut to switch to Options page
This commit is contained in:
hydroflame 2022-07-06 14:39:25 -04:00 committed by GitHub
commit f706b48db8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -272,6 +272,8 @@ export function SidebarRoot(props: IProps): React.ReactElement {
// Alt-a - Augmentations
// Alt-u - Tutorial
// Alt-o - Options
// Alt-b - Bladeburner
// Alt-g - Gang
function handleShortcuts(this: Document, event: KeyboardEvent): any {
if (Settings.DisableHotkeys) return;
if ((props.player.isWorking && props.player.focus) || props.router.page() === Page.BitVerse) return;
@ -315,6 +317,9 @@ export function SidebarRoot(props: IProps): React.ReactElement {
} else if (event.code === KEYCODE.U && event.altKey) {
event.preventDefault();
clickTutorial();
} else if (event.code === KEYCODE.O && event.altKey) {
event.preventDefault();
clickOptions();
} else if (event.code === KEYCODE.B && event.altKey && props.player.bladeburner) {
event.preventDefault();
clickBladeburner();