Javascript keycode clash: “right arrow” and “single quote”

后端 未结 4 1203
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 07:06

The following script does what it should, that is, it reacts on the keys \"arrow left\" and \"arrow right\". However, due to a keycode clash, it reacts on a single quote as

4条回答
  •  迷失自我
    2021-01-14 07:59

    keypress should not capture control keys like left/right arrow. if you use keydown event, single quote keycode is 222 definitely no conflict

提交回复
热议问题