-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
You should be able to bind an event handler to a keydown event for a specific set of keys.
Examples - using enter key for submit, providing a keyboard friendly set of options.
Single key:
event :keypress, :enter do
# event handler code goes here
end
An array of keys:
event :keypress, :enter, :g do
# event handler code goes here
end
Having a modifier
event :keypress, :enter, {key: :g, modifiers: :ctrl} do
# event handler code goes here
end
Having multiple modifiers
event :keypress, :enter, {key: :g, modifiers: [:shift,:ctrl]} do
# event handler code goes here
end
Metadata
Metadata
Assignees
Labels
No labels