Skip to content

Commit

Permalink
Hotkey management prototype, renamed KeyboardDragListener hotkeys set…
Browse files Browse the repository at this point in the history
…ter => setHotkeys(), see phetsims/scenery#1621
  • Loading branch information
jonathanolson committed Mar 28, 2024
1 parent 0071cfa commit 69ce519
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/faradays-law/view/MagnetNodeWithField.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import Dimension2 from '../../../../dot/js/Dimension2.js';
import GrabDragInteraction from '../../../../scenery-phet/js/accessibility/GrabDragInteraction.js';
import { animatedPanZoomSingleton, DragListener, HighlightFromNode, InteractiveHighlightingNode, KeyboardListener, KeyboardUtils, Node } from '../../../../scenery/js/imports.js';
import { animatedPanZoomSingleton, DragListener, eventCodeToEnglishString, HighlightFromNode, InteractiveHighlightingNode, KeyboardUtils, Node } from '../../../../scenery/js/imports.js';
import SoundClip from '../../../../tambo/js/sound-generators/SoundClip.js';
import soundManager from '../../../../tambo/js/soundManager.js';
import grabMagnet_mp3 from '../../../sounds/grabMagnet_mp3.js';
Expand Down Expand Up @@ -198,7 +198,7 @@ class MagnetNodeWithField extends Node {
// needs to fire for all key codes.
const cancelAnimationKeyDownListener = {
keydown: event => {
const englishEventKey = KeyboardListener.eventCodeToEnglishString( event.domEvent.code );
const englishEventKey = eventCodeToEnglishString( event.domEvent.code );
const isSlideKey = MagnetAutoSlideKeyboardListener.AUTO_SLIDE_KEYS.includes( englishEventKey );

// Any key press that is not one of the auto-slide keys should stop the animation.
Expand Down

0 comments on commit 69ce519

Please sign in to comment.