-
Notifications
You must be signed in to change notification settings - Fork 58
Shift keyevent interrupts matching a key sequence #65
Comments
I am seeing the same thing in archlinux with the UK keyboard layout |
Okay, now I've checked this on Windows 8.1. There seems to be no problem. Furthermore, I've narrowed down the issue.
window.addEventListener('keydown', function(e) { console.log(e); }); in the Chromium console, pressing the keys ctrl, shift and alt one at a time, and looking at the log output. It would be a trivial fix to add these identifiers to On Windows these identifiers seemed to be as they should: |
I don't think it should cause issues on other platforms because we only check that set for determining if the key is a modifier, and on other platforms it shouldn't be those identifiers. That said, this whole area is a minefield of unintended consequences. |
It should be noted, though, that |
Investigating a vim-mode bug about bindings like 'i (' and 'i {' being ignored, I found the following: pressing shift alone generates a keydown event. Thus, when typing a sequence like 'i (', the 'i' gives a partial match. Then, on my keyboard, typing '(' involves pressing shift and 9 simultaneously. The shift key alone, however, generates a separate keydown event before the 9 keypress, so the partial matching gets interrupted before the actual '(' keydown event comes in. I verified this by console.logging the keydown events received on Chromium 39, Linux.
EDIT: this can be also verified by having vim-mode on, looking at the keybinding resolver. In command mode, press first 'c', then 'i'. There's the list of partial matches. As soon as I push down the shift key to type '(', the list of partial matches disappears before I could type in the actual '('.
EDIT 2: This might be Linux specific.
The text was updated successfully, but these errors were encountered: