From e4450bad7b21ee8b737c7622eece7ccc9c1a4d04 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 6 Jul 2021 13:28:15 -0400 Subject: [PATCH] add getNumberFromCode to support number keys, https://github.com/phetsims/scenery/issues/1053 --- js/common/view/BothHandsInteractionListener.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/common/view/BothHandsInteractionListener.js b/js/common/view/BothHandsInteractionListener.js index c9c72572..568f5ef0 100644 --- a/js/common/view/BothHandsInteractionListener.js +++ b/js/common/view/BothHandsInteractionListener.js @@ -187,7 +187,7 @@ class BothHandsInteractionListener { // for number keys 0-9, jump both values to that tick mark number. This value changes based on the tickMarkRangeProperty for ( let i = 0; i <= 9; i++ ) { - if ( domEvent.key === `${i}` && + if ( KeyboardUtils.getNumberFromCode( domEvent ) === i && !domEvent.getModifierState( 'Control' ) && !domEvent.getModifierState( 'Shift' ) && !domEvent.getModifierState( 'Alt' ) ) {