File tree Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -589,24 +589,18 @@ export default class ElectronPlatform extends VectorBasePlatform {
589
589
handled = true ;
590
590
}
591
591
break ;
592
+ }
592
593
593
- case "1" :
594
- case "2" :
595
- case "3" :
596
- case "4" :
597
- case "5" :
598
- case "6" :
599
- case "7" :
600
- case "8" :
601
- case "9" :
602
- case "0" :
603
- // ideally we would use SpaceStore.spacesEnabled here but importing SpaceStore in this platform
604
- // breaks skinning as the platform is instantiated prior to the skin being loaded
605
- if ( SettingsStore . getValue ( "feature_spaces" ) && isOnlyCtrlOrCmdKeyEvent ( ev ) ) {
606
- this . navigateToSpace ( parseInt ( ev . key , 10 ) ) ;
607
- handled = true ;
608
- }
609
- break ;
594
+ if ( ! handled &&
595
+ // ideally we would use SpaceStore.spacesEnabled here but importing SpaceStore in this platform
596
+ // breaks skinning as the platform is instantiated prior to the skin being loaded
597
+ SettingsStore . getValue ( "feature_spaces" ) &&
598
+ ev . code . startsWith ( "Digit" ) &&
599
+ isOnlyCtrlOrCmdKeyEvent ( ev )
600
+ ) {
601
+ const spaceNumber = ev . code . slice ( 5 ) ; // Cut off the first 5 characters - "Digit"
602
+ this . navigateToSpace ( parseInt ( spaceNumber , 10 ) ) ;
603
+ handled = true ;
610
604
}
611
605
612
606
return handled ;
You can’t perform that action at this time.
0 commit comments