From 60c819e487e7e58dbb344f2ed054c4a60d5ada1e Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Thu, 28 Mar 2024 11:12:51 -0600 Subject: [PATCH] Adding Hotkey.allowOverlap flag (to allow "conflicts"/overlap of hotkeys), see https://github.com/phetsims/scenery/issues/1621 --- js/wilder/view/WilderScreenView.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/wilder/view/WilderScreenView.ts b/js/wilder/view/WilderScreenView.ts index 98c6e70..50b5909 100644 --- a/js/wilder/view/WilderScreenView.ts +++ b/js/wilder/view/WilderScreenView.ts @@ -78,6 +78,12 @@ class WilderScreenView extends ScreenView { fireOnHoldCustomInterval: 300 } ) ); + globalHotkeyRegistry.add( new Hotkey( { + key: 'd', + fire: () => console.log( 'fire: (second d)' ), + allowOverlap: true + } ) ); + resetAllButton.addInputListener( { hotkeys: [ new Hotkey( {