1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

Desktop: Fix handling of certain keys in shortcut editor (#4022)

String.fromCharCode expects unicode charcodes as an argument; e.keyCode returns javascript keycodes.
Javascript keycodes and unicode charcodes are not the same thing!

Therefore I used an array to map keycodes. This seems to be the only way to make this work properly.

I also changed the width of the shortcut recorder input field to 200px, since certain key combinations are cut off, because they don't fit in the field.
This commit is contained in:
Helmut K. C. Tessarek
2020-11-12 13:40:00 -05:00
committed by GitHub
parent 006239913e
commit 340312fa80
2 changed files with 270 additions and 34 deletions

View File

@@ -25,6 +25,7 @@ export default function styles(themeId: number) {
recorderInput: {
...theme.inputStyle,
minHeight: 29,
width: '200px',
},
label: {
...theme.textStyle,