diff --git a/zss/firmware/zzt.ts b/zss/firmware/zzt.ts index 75f500e0d..33291bfc4 100644 --- a/zss/firmware/zzt.ts +++ b/zss/firmware/zzt.ts @@ -59,7 +59,6 @@ import { dirfrompts, ptapplydir, COLLISION, - readexpr, } from './wordtypes' const STAT_NAMES = new Set([ diff --git a/zss/gadget/components/userinput.tsx b/zss/gadget/components/userinput.tsx index 7e14a321a..7a565a609 100644 --- a/zss/gadget/components/userinput.tsx +++ b/zss/gadget/components/userinput.tsx @@ -73,6 +73,11 @@ document.addEventListener( case 'tab': invoke(INPUT.MENU_BUTTON, mods) break + case '?': + if (mods.shift) { + invoke(INPUT.DEBUG_BUTTON, mods) + } + break default: // we should have gamepad input that moves between hotkey inputs, // which then can be activated with the ok button @@ -124,6 +129,7 @@ type UserInputProps = { OK_BUTTON?: UserInputHandler CANCEL_BUTTON?: UserInputHandler MENU_BUTTON?: UserInputHandler + DEBUG_BUTTON?: UserInputHandler keydown?: KeyboardInputHandler } @@ -162,7 +168,7 @@ export function UserFocus({ blockhotkeys, children }: UserFocusProps) { user.root = old user.ignorehotkeys = oldconfig } - }, []) + }, [current, blockhotkeys]) return ( diff --git a/zss/gadget/data/types.ts b/zss/gadget/data/types.ts index 983b44597..c8164ef0c 100644 --- a/zss/gadget/data/types.ts +++ b/zss/gadget/data/types.ts @@ -262,4 +262,5 @@ export enum INPUT { OK_BUTTON, CANCEL_BUTTON, MENU_BUTTON, + DEBUG_BUTTON, } diff --git a/zss/memory/board.ts b/zss/memory/board.ts index 7654f020b..f68789dcc 100644 --- a/zss/memory/board.ts +++ b/zss/memory/board.ts @@ -42,6 +42,7 @@ export type BOARD_ELEMENT_STATS = { inputok?: number inputcancel?: number inputmenu?: number + inputdebug?: number data?: any [key: string]: WORD_VALUE }