mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05:00
Merge pull request #10921 from atom/bo-keyup
Add support for keybindings with keyup keystrokes
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
"electronVersion": "0.36.8",
|
||||
"dependencies": {
|
||||
"async": "0.2.6",
|
||||
"atom-keymap": "^6.2.0",
|
||||
"atom-keymap": "^6.3.1",
|
||||
"babel-core": "^5.8.21",
|
||||
"bootstrap": "^3.3.4",
|
||||
"cached-run-in-this-context": "0.4.1",
|
||||
@@ -96,7 +96,7 @@
|
||||
"grammar-selector": "0.48.1",
|
||||
"image-view": "0.56.0",
|
||||
"incompatible-packages": "0.25.1",
|
||||
"keybinding-resolver": "0.33.0",
|
||||
"keybinding-resolver": "0.35.0",
|
||||
"line-ending-selector": "0.3.1",
|
||||
"link": "0.31.0",
|
||||
"markdown-preview": "0.157.3",
|
||||
|
||||
@@ -15,7 +15,8 @@ class WindowEventHandler
|
||||
@addEventListener(@window, 'focus', @handleWindowFocus)
|
||||
@addEventListener(@window, 'blur', @handleWindowBlur)
|
||||
|
||||
@addEventListener(@document, 'keydown', @handleDocumentKeydown)
|
||||
@addEventListener(@document, 'keyup', @handleDocumentKeyEvent)
|
||||
@addEventListener(@document, 'keydown', @handleDocumentKeyEvent)
|
||||
@addEventListener(@document, 'drop', @handleDocumentDrop)
|
||||
@addEventListener(@document, 'dragover', @handleDocumentDragover)
|
||||
@addEventListener(@document, 'contextmenu', @handleDocumentContextmenu)
|
||||
@@ -66,7 +67,7 @@ class WindowEventHandler
|
||||
target.addEventListener(eventName, handler)
|
||||
@subscriptions.add(new Disposable(-> target.removeEventListener(eventName, handler)))
|
||||
|
||||
handleDocumentKeydown: (event) =>
|
||||
handleDocumentKeyEvent: (event) =>
|
||||
@atomEnvironment.keymaps.handleKeyboardEvent(event)
|
||||
event.stopImmediatePropagation()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user