hotkeyManager¶
Overview¶
Manages hotkeys based on two sources:
- Global hotkeys (from globalHotkeyRegistry)
- Hotkeys from the current focus trail (FocusManager.pdomFocusProperty, all hotkeys on all input listeners of nodes in the trail)
Manages key press state using EnglishKey from globalKeyStateTracker.
The "available" hotkeys are the union of the above two sources.
The "enabled" hotkeys are the subset of available hotkeys whose enabledProperties are true.
The "active" hotkeys are the subset of enabled hotkeys that are considered pressed. They will have fire-on-hold behavior active.
The set of enabled hotkeys determines the set of modifier keys that are considered "active" (in addition to ctrl/alt/meta/shift, which are always included).
@author Jesse Greenberg (PhET Interactive Simulations) @author Jonathan Olson <jonathan.olson@colorado.edu>
Source Code¶
See the source for hotkeyManager.ts in the scenery repository.