Skip to content

Commit

Permalink
Adding demo for two-press delayed (multi-hot-key) behavior, and added…
Browse files Browse the repository at this point in the history
… modifierKeys docs, see #1621
  • Loading branch information
jonathanolson committed Mar 28, 2024
1 parent 353f9f3 commit 378e69c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/input/Hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ type SelfOptions = {
// activated when this hotkey is present.
//
// Note that the release of a modifier key may "activate" the hotkey for "fire-on-hold", but not for "fire-on-down".
//
// NOTE: This is a generalization of the normal concept of "modifier key" (https://en.wikipedia.org/wiki/Modifier_key).
// It is a PhET-specific concept that allows other non-modifier keys to be used as modifiers.
// The standard modifier keys (ctrl/alt/meta/shift) are automatically handled by the hotkey system, but this can
// expand the set of modifier keys that can be used.
modifierKeys?: EnglishKey[];

// A set of modifier keys that can be down and the hotkey will still fire. Essentially ignoring the modifier
Expand Down

0 comments on commit 378e69c

Please sign in to comment.