@@ -1067,12 +1067,12 @@ describe("composer control shortcuts", () => {
10671067 [ "h" , "composer.host" , true ] ,
10681068 [ "e" , "composer.effort" , false ] ,
10691069 [ "a" , "composer.mode" , false ] ,
1070- [ "t " , "composer.workspace" , false ] ,
1070+ [ "s " , "composer.workspace" , false ] ,
10711071 [ "g" , "composer.branch" , false ] ,
10721072 [ "p" , "composer.previousWorktree" , false ] ,
10731073 ] as const ;
10741074
1075- for ( const platform of [ "MacIntel" , "Linux" ] ) {
1075+ for ( const platform of [ "MacIntel" , "Win32" , " Linux"] ) {
10761076 it . each ( shortcuts ) (
10771077 `resolves %s on ${ platform } and leaves terminal input alone` ,
10781078 ( key , command , shiftKey ) => {
@@ -1100,6 +1100,47 @@ describe("composer control shortcuts", () => {
11001100 ) ;
11011101 }
11021102
1103+ it ( "leaves AltGr text entry alone on Windows and Linux" , ( ) => {
1104+ for ( const platform of [ "Win32" , "Linux" ] ) {
1105+ const input = event ( {
1106+ key : "€" ,
1107+ code : "KeyE" ,
1108+ ctrlKey : true ,
1109+ altKey : true ,
1110+ getModifierState : ( key ) => key === "AltGraph" ,
1111+ } ) ;
1112+ assert . isNull ( resolveShortcutCommand ( input , DEFAULT_RESOLVED_KEYBINDINGS , { platform } ) ) ;
1113+ assert . strictEqual (
1114+ resolveShortcutCommand (
1115+ { ...input , getModifierState : ( ) => false } ,
1116+ DEFAULT_RESOLVED_KEYBINDINGS ,
1117+ { platform } ,
1118+ ) ,
1119+ "composer.effort" ,
1120+ ) ;
1121+ }
1122+ } ) ;
1123+
1124+ it ( "keeps Firefox modifier reporting usable on Windows and macOS" , ( ) => {
1125+ const getModifierState = ( key : string ) => key === "AltGraph" ;
1126+ assert . strictEqual (
1127+ resolveShortcutCommand (
1128+ event ( { key : "e" , ctrlKey : true , altKey : true , getModifierState } ) ,
1129+ DEFAULT_RESOLVED_KEYBINDINGS ,
1130+ { platform : "Win32" } ,
1131+ ) ,
1132+ "composer.effort" ,
1133+ ) ;
1134+ assert . strictEqual (
1135+ resolveShortcutCommand (
1136+ event ( { key : "´" , code : "KeyE" , metaKey : true , altKey : true , getModifierState } ) ,
1137+ DEFAULT_RESOLVED_KEYBINDINGS ,
1138+ { platform : "MacIntel" } ,
1139+ ) ,
1140+ "composer.effort" ,
1141+ ) ;
1142+ } ) ;
1143+
11031144 it . each ( shortcuts ) ( "uses a custom binding for %s" , ( _key , command ) => {
11041145 const bindings = compileResolvedKeybindingsConfig ( [
11051146 { key : "mod+shift+y" , command, when : "!terminalFocus" } ,
0 commit comments