From ff0599367fd3822843facba3bc00ffa3d33b1c46 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Wed, 27 Mar 2024 20:25:13 -0600 Subject: [PATCH] Hotkey management prototype, renamed KeyboardDragListener hotkeys setter => setHotkeys(), see https://github.com/phetsims/scenery/issues/1621 --- doc/alternative-input-quickstart-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/alternative-input-quickstart-guide.md b/doc/alternative-input-quickstart-guide.md index b168e85e..c1e81278 100644 --- a/doc/alternative-input-quickstart-guide.md +++ b/doc/alternative-input-quickstart-guide.md @@ -226,7 +226,7 @@ If your Node has a `KeyboardDragListener`, add hotkeys like this: ```ts const keyboardDragListener = new KeyboardDragListener( /* ... */ ); -keyboardDragListener.hotkeys = [ +keyboardDragListener.setHotkeys( [ // Escape { keys: [ KeyboardUtils.KEY_ESCAPE ], @@ -238,7 +238,7 @@ keyboardDragListener.hotkeys = [ keys: [ KeyboardUtils.KEY_J, KeyboardUtils.KEY_O ], callback: () => { /* ... */ } } -]; +] ); ``` If your Node does not have a `KeyboardDragListener`, add hotkeys with `KeyboardListener` like this: