jQuery Event Keypress: Which key was pressed? A-Z, & @

后端 未结 3 885
小蘑菇
小蘑菇 2021-01-06 00:41

on a keydown I get the following from jQuery:

jQuery.Event
altKey: false
attrChange: undefined
attrName: undefined
bubbles: true
button: undefined
cancelable         


        
3条回答
  •  长发绾君心
    2021-01-06 01:08

    Not sure if you want to run events when the keys are pressed but you can try https://github.com/jeresig/jquery.hotkeys

    Otherwise you can check if the shift key was pressed in the event from your code. Havent seen a library that handles this for you

提交回复
热议问题