How can I tell if an event comes from right Ctrl key?

后端 未结 6 1720
慢半拍i
慢半拍i 2020-12-11 06:37

I have an event listener in Javascript, I can tell whether a key event is Ctrl (e.keyCode == 17), but how can I know this Ctrl comes from the right one or left

6条回答
  •  攒了一身酷
    2020-12-11 07:09

    Just a quick note: I wouldn't base an architecture / design on the availability of the right control key - many laptop keyboards may not have two control keys.

提交回复
热议问题