From eb137455f5544ab9e680aa67f0d3ff2eb0c2accf Mon Sep 17 00:00:00 2001 From: MageKing17 Date: Fri, 24 Dec 2021 21:22:46 -0800 Subject: [PATCH] Allow shortcuts to work while doing unfocused work. A lot of people thought keyboard shortcuts weren't working because the code to make them stop working was only checking if the player was working without checking if the player was also focused. If doing unfocused work, there's no reason not to allow keyboard shortcuts to keep working. --- src/Sidebar/ui/SidebarRoot.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Sidebar/ui/SidebarRoot.tsx b/src/Sidebar/ui/SidebarRoot.tsx index a974fbba9..132758e92 100644 --- a/src/Sidebar/ui/SidebarRoot.tsx +++ b/src/Sidebar/ui/SidebarRoot.tsx @@ -273,7 +273,7 @@ export function SidebarRoot(props: IProps): React.ReactElement { // Alt-o - Options function handleShortcuts(this: Document, event: KeyboardEvent): any { if (Settings.DisableHotkeys) return; - if (props.player.isWorking || redPillFlag) return; + if ((props.player.isWorking && props.player.focus) || redPillFlag) return; if (event.keyCode == KEY.T && event.altKey) { event.preventDefault(); clickTerminal();