diff --git a/js/accessibility/AccessibleNumberSpinner.ts b/js/accessibility/AccessibleNumberSpinner.ts index 74394b7d..284ad112 100644 --- a/js/accessibility/AccessibleNumberSpinner.ts +++ b/js/accessibility/AccessibleNumberSpinner.ts @@ -109,8 +109,7 @@ const AccessibleNumberSpinner = ( Type: SuperType // check for relevant keys here if ( KeyboardUtils.isRangeKey( event.domEvent ) ) { - // TODO: How to specify subtypes of DOMEvents, https://github.com/phetsims/scenery/issues/1340 - const domEvent = event.domEvent! as Event & { metaKey: boolean }; + const domEvent = event.domEvent! as KeyboardEvent; // If the meta key is down we will not even call the keydown listener of the supertype, so we need // to be sure that default behavior is prevented so we don't receive `input` and `change` events. diff --git a/js/accessibility/AccessibleValueHandler.ts b/js/accessibility/AccessibleValueHandler.ts index 214c4571..bdf84fcb 100644 --- a/js/accessibility/AccessibleValueHandler.ts +++ b/js/accessibility/AccessibleValueHandler.ts @@ -549,8 +549,7 @@ const AccessibleValueHandler = ( Type: SuperType, */ handleKeyDown( event: SceneryEvent ) { - // TODO: How to specify subtypes of DOMEvents, https://github.com/phetsims/scenery/issues/1340 - const domEvent = event.domEvent as Event & { shiftKey: boolean, metaKey: boolean }; + const domEvent = event.domEvent as KeyboardEvent; const key = KeyboardUtils.getEventCode( domEvent );