Skip to content

Commit

Permalink
Hotkey doc update, see #1621
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Mar 28, 2024
1 parent f0155e5 commit 5c9799e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/input/Hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ type SelfOptions = {
// key behavior for this key.
ignoredModifierKeys?: EnglishKey[];

// Called as fire() when the hotkey is tired
// Called as fire() when the hotkey is fired (see fireOnDown/fireOnHold for when that happens).
// The event will be null if the hotkey was fired due to fire-on-hold.
fire?: ( event: KeyboardEvent | null ) => void;

// If true, the hotkey will fire when the hotkey is initially pressed.
Expand Down Expand Up @@ -128,7 +129,6 @@ export default class Hotkey extends EnabledComponent {
// Create a timer to handle the optional fire-on-hold feature.
if ( this.fireOnHold && this.fireOnHoldTiming === 'custom' ) {
this.fireOnHoldTimer = new CallbackTimer( {
// TODO: Consider passing the _original_ event here? https://github.com/phetsims/scenery/issues/1621
callback: this.fire.bind( this, null ), // Pass null for fire-on-hold events
delay: options.fireOnHoldCustomDelay,
interval: options.fireOnHoldCustomInterval
Expand Down

0 comments on commit 5c9799e

Please sign in to comment.