mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Triggers the event created with window.keydown.
This commit is contained in:
@@ -5,10 +5,12 @@ window.atom = new (require 'app')
|
||||
|
||||
window.keydown = (pattern) ->
|
||||
keys = pattern.split '+'
|
||||
$.Event "keydown",
|
||||
event = $.Event "keydown",
|
||||
ctrlKey: 'ctrl' in keys
|
||||
altKey: 'alt' in keys
|
||||
shiftKey: 'shift' in keys
|
||||
metaKey: 'meta' in keys
|
||||
which: _.last(keys).toUpperCase().charCodeAt 0
|
||||
|
||||
$(document).trigger event
|
||||
|
||||
|
||||
Reference in New Issue
Block a user