Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This adds an exception to `KeyCode.toKey` regarding special keys on numpads

Signed-off-by: Gero Posmyk-Leinemann <gero.posmyk-leinemann@typefox.io>
  • Loading branch information
geropl authored and westbury committed Jul 19, 2020
1 parent eae9d69 commit 12b0435
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/core/src/browser/keyboard/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,15 @@ export namespace KeyCode {
return Key.INTL_BACKSLASH;
}
}

// https://github.com/eclipse-theia/theia/issues/7315
if (code.startsWith('Numpad') && event.key && event.key.length > 1) {
const k = Key.getKey(event.key);
if (k) {
return k;
}
}

const key = Key.getKey(code);
if (key) {
return key;
Expand Down

0 comments on commit 12b0435

Please sign in to comment.