File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -1219,6 +1219,7 @@ export namespace CommandRegistry {
1219
1219
export function formatKeystroke ( keystroke : string ) : string {
1220
1220
let mods = '' ;
1221
1221
let parts = parseKeystroke ( keystroke ) ;
1222
+ let keyWithoutArrows = parts . key . replace ( 'Arrow(Left|Down|Up|Right)' , '' ) ;
1222
1223
if ( Platform . IS_MAC ) {
1223
1224
if ( parts . ctrl ) {
1224
1225
mods += '\u2303 ' ;
@@ -1232,18 +1233,6 @@ export namespace CommandRegistry {
1232
1233
if ( parts . cmd ) {
1233
1234
mods += '\u2318 ' ;
1234
1235
}
1235
- if ( parts . arrowLeft ) {
1236
- mods += '\u2190 ' ;
1237
- }
1238
- if ( parts . arrowUp ) {
1239
- mods += '\u2191 ' ;
1240
- }
1241
- if ( parts . arrowRight ) {
1242
- mods += '\u2192 ' ;
1243
- }
1244
- if ( parts . arrowDown ) {
1245
- mods += '\u2193 ' ;
1246
- }
1247
1236
} else {
1248
1237
if ( parts . ctrl ) {
1249
1238
mods += 'Ctrl+' ;
@@ -1255,7 +1244,20 @@ export namespace CommandRegistry {
1255
1244
mods += 'Shift+' ;
1256
1245
}
1257
1246
}
1258
- return mods + parts . key ;
1247
+ // regardless of platform
1248
+ if ( parts . arrowLeft ) {
1249
+ mods += '\u2190 ' ;
1250
+ }
1251
+ if ( parts . arrowUp ) {
1252
+ mods += '\u2191 ' ;
1253
+ }
1254
+ if ( parts . arrowRight ) {
1255
+ mods += '\u2192 ' ;
1256
+ }
1257
+ if ( parts . arrowDown ) {
1258
+ mods += '\u2193 ' ;
1259
+ }
1260
+ return mods + keyWithoutArrows ;
1259
1261
}
1260
1262
1261
1263
/**
You can’t perform that action at this time.
0 commit comments