diff --git a/js/input/Hotkey.ts b/js/input/Hotkey.ts index c0e704efd..72f99baf2 100644 --- a/js/input/Hotkey.ts +++ b/js/input/Hotkey.ts @@ -49,17 +49,19 @@ type SelfOptions = { // A set of modifier keys that: // // 1. Need to be pressed before the main key before this hotkey is considered pressed. - // 2. If not a normal (ctrl/alt/meta/shift) modifier key, will also be required to be "off" for other hotkeys to be - // activated when this hotkey is present. + // 2. Must NOT be pressed for other hotkeys to be 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". + // A Hotkey will also not activate if the standard modifier keys (ctrl/alt/meta/shift) are pressed, unless they + // are explicitly included in the modifierKeys array. + // + // 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-standard + // 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. When a modifier key is added, + // pressing it will prevent any other Hotkeys from becoming active. This is how the typical modifier keys behave and + // so that is kept consistent for PhET-specific modifier keys. // - // 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. - // When a modifier key is added, pressing it will prevent any other Hotkeys from becoming active. This is how the - // typical modifier keys behave and so that is kept consistent for PhET-specific modifier keys. + // Note that the release of a modifier key may "activate" the hotkey for "fire-on-hold", but not for "fire-on-down". modifierKeys?: EnglishKey[]; // A set of modifier keys that can be down and the hotkey will still fire. Essentially ignoring the modifier