W3C home > Mailing lists > Public > public-html-ig-zh@w3.org > May 2011

如何使用JavaScript判断用户按下了左边的Ctrl键还是右边的Ctrl键?

From: Jinjiang Zhao <zhaojinjiang@yahoo.com.cn>
Date: Wed, 25 May 2011 17:05:01 +0800
Message-ID: <79894F2F0E6C45048BEE2B32C2DFE722@JinjiangZhaoPC>
To: <public-html-ig-zh@w3.org>
如题,想区分一下左右Ctrl键的键盘事件,想不出合适的办法,stackoverflow也有人问类似的问题:
http://stackoverflow.com/questions/4404899/can-you-distinguish-between-the-left-ctrl-key-and-right-ctrl-key-using-keycodes-i

想问问诸位有没有好的办法或技巧可以判断左右Ctrl键,另外标准中为何在定义keyCode的时候不为左右Ctrl设计不同的值呢?

Jinks Zhao | maxthon | Front-end Manager
Received on Wednesday, 25 May 2011 09:07:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:43:48 UTC