在delphi中,很多窗体和控件的鼠标事件里面已经将鼠标按键状态封装好传给响应事件的函数,所以这种情况直接使用就可以,但在某些时候,我们没有这些事件可以处理时,想判断鼠标按键是否按下的状态,就需要借助API或者消息了,使用API和消息可分别应对2种不同情形: 1)使用API: GetAsyncKeyState,适合实时检测,下面代码演示判断鼠标是否按下左键 function IsMouseLButtonDown():Boolean;begin Result := (Windows.GetAs…
The relevant option is no longer available in the settings menu in Ubuntu 13.10; this has been reported as a bug (https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1218322). However, it is still possible to swap these keys using th…