keithamus / jwerty

⌨ Awesome handling of keyboard events
http://keithamus.github.io/jwerty
Other
1.21k stars 107 forks source link

Need for an ability to detect if ctrl/shift/alt key is active at current event #46

Open creage opened 11 years ago

creage commented 11 years ago

Currently there is no ability to detect if there were any of shift/ctrl/alt key active for current event. Would be nice to have something like $.jwerty.is('shift').

keithamus commented 11 years ago

Jwerty doesn't need this functionality because it's already baked into the event object. Simply do event.shiftKey === true

creage commented 11 years ago

Well jQuery events don't. They are wrapped into jQuery Event, having originalEvent property, which actually does have this props. But it is not convinient to write a (e.originalEvent || e).shiftKey === true everytime.

keithamus commented 11 years ago

Fancy making a PR for it?