Skip to content

Commit

Permalink
Revert "Add arrow glyphs jupyterlab#151"
Browse files Browse the repository at this point in the history
This reverts commit 57a6ee7.

It was not clear in issue jupyterlab#151 calling for a change in formatting of arrows that arrows should not be treated as modifier keys.
  • Loading branch information
jasongrout committed Nov 2, 2021
1 parent 0f7378b commit 76f615f
Showing 1 changed file with 1 addition and 55 deletions.
56 changes: 1 addition & 55 deletions packages/commands/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1062,26 +1062,6 @@ export namespace CommandRegistry {
*/
shift: boolean;

/**
* Whether `'ArrowLeft'` appears in the keystroke.
*/
arrowLeft: boolean;

/**
* Whether `'ArrowUp'` appears in the keystroke.
*/
arrowUp: boolean;

/**
* Whether `'ArrowRight'` appears in the keystroke.
*/
arrowRight: boolean;

/**
* Whether `'ArrowDown'` appears in the keystroke.
*/
arrowDown: boolean;

/**
* The primary key for the keystroke.
*/
Expand Down Expand Up @@ -1116,10 +1096,6 @@ export namespace CommandRegistry {
let cmd = false;
let ctrl = false;
let shift = false;
let arrowLeft = false;
let arrowUp = false;
let arrowRight = false;
let arrowDown = false;
for (let token of keystroke.split(/\s+/)) {
if (token === 'Accel') {
if (Platform.IS_MAC) {
Expand All @@ -1135,29 +1111,11 @@ export namespace CommandRegistry {
ctrl = true;
} else if (token === 'Shift') {
shift = true;
} else if (token === 'ArrowLeft') {
arrowLeft = true;
} else if (token === 'ArrowUp') {
arrowUp = true;
} else if (token === 'ArrowRight') {
arrowRight = true;
} else if (token === 'ArrowDown') {
arrowDown = true;
} else if (token.length > 0) {
key = token;
}
}
return {
cmd,
ctrl,
alt,
shift,
key,
arrowLeft,
arrowUp,
arrowRight,
arrowDown
};
return { cmd, ctrl, alt, shift, key };
}

/**
Expand Down Expand Up @@ -1229,18 +1187,6 @@ export namespace CommandRegistry {
if (parts.cmd) {
mods += '\u2318 ';
}
if (parts.arrowLeft) {
mods += '\u2190 ';
}
if (parts.arrowUp) {
mods += '\u2191 ';
}
if (parts.arrowRight) {
mods += '\u2192 ';
}
if (parts.arrowDown) {
mods += '\u2193 ';
}
} else {
if (parts.ctrl) {
mods += 'Ctrl+';
Expand Down

0 comments on commit 76f615f

Please sign in to comment.