getKeyStategetKeyState(Ver2.11対応版)
目次Index−
スクリプトScript−
グローバルのメソッドGlobal method−
getKeyState
getKeyState( num1, num2 )
キーボードの状態を取得します。
Gets the keyboard status.
- パラメータ1(数値型)
-
仮想キーコードを指定します。(例:0x10はVK_SHIFT/0x11はVK_CONTROL/0x04はVK_MBUTTON)
Specify a virtual key code. (Example: 0x10 for VK_SHIFT / 0x11 for VK_CONTROL / 0x04 for VK_MBUTTON)
- パラメータ2(数値型)
-
0の場合Win32APIのGetKeyStateと同じです。
1の場合リンクバーなどのボタンを押したときの中ボタンの状態が取得できます。
2の場合Win32APIのGetAsyncKeyStateと同じです。
When 0 it is the same as GetKeyState of Win32 API.
When 1, you can get the state of the middle button when you press a button such as the link bar.
When 2, it is the same as GetAsyncKeyState of Win32 API.
- 返り値(数値型)
-
0x8000のビットがキーが押されているかどうか、0x0001のビットがキーのトグル状態を返します。
(例:if(getKeyState(0x04,1)&0x8000){...})
The return value is whether the 0x8000 bit is pressed or not. A bit of 0x0001 represents the toggle state of the key.