Triggers the event created with window.keydown.

This commit is contained in:
Corey Johnson
2011-12-19 12:58:35 -08:00
parent f0bfe17572
commit 5ec94fc28c

View File

@@ -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