mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Handle multi-keystroke keybinding
Previously for a binding like `meta-x meta-y` you had to hold down the meta key. This makes it possible to release the meta key between key presses.
This commit is contained in:
@@ -203,6 +203,7 @@ describe "Keymap", ->
|
||||
describe "when a second keystroke added to the first to match a multi-stroke binding completely", ->
|
||||
it "triggers the event associated with the matched multi-stroke binding", ->
|
||||
expect(keymap.handleKeyEvent(keydownEvent('x', target: fragment[0], ctrlKey: true))).toBeFalsy()
|
||||
expect(keymap.handleKeyEvent(keydownEvent('ctrl', target: fragment[0]))).toBeFalsy() # This simulates actual key event behavior
|
||||
expect(keymap.handleKeyEvent(keydownEvent('c', target: fragment[0], ctrlKey: true))).toBeFalsy()
|
||||
|
||||
expect(quitHandler).toHaveBeenCalled()
|
||||
|
||||
Reference in New Issue
Block a user