codemirror-vim
codemirror-vim copied to clipboard
Dead keys don't work as expected in normal mode
Dead keys such as the backtick and ^
(German keyboard layout), when pressed in normal mode, insert the character directly into the text instead of waiting for a space or some other character.
This makes it (as examples) impossible to use ^
for going to the beginning of a line or using the backtick in f
motions.
From what I have read, it is not possible to read the dead key on the keyboard event at keydown The Dead key (at least in normal mode) would need to be ignored and a compositionupdate event handler would need to be added to accept the shortcuts
I think code could be reused from the keydown event; i'll try and make a patch
edit: some references:
- keyboard events: https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
- composition update how to https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionupdate_event
I wonder whether it's similar to #12/#22.
(I fixed it for myself by disabling dead keys, but that's only a personal solution.)