mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-20 05:34:47 +00:00
8e1e7bc540
Currently the Keyboard _Devices entry on Windows does not report all the key presses and releases. This is due to missing some messages in the form of WM_SYSKEYDOWN and WM_SYSKEYUP. Additionally Windows is weird about report the state of the individual shift keys, so we add some logic using GetAsyncKeyState() to fix that up. Fixes: #333
28 lines
585 B
Text
28 lines
585 B
Text
|
|
Const INPUT_TYPE_KEYBOARD = 1
|
|
|
|
Const KBD_FLAG_EXTENDED = 1
|
|
Const KBD_FLAG_UP = 2
|
|
Const KBD_FLAG_UNICODE = 4
|
|
Const KBD_FLAG_SCANCODE = 8
|
|
|
|
Const Down = 1
|
|
Const Up = 0
|
|
|
|
Type KbdInput
|
|
typ As Long
|
|
pad As Long
|
|
vk As Integer
|
|
scancode As Integer
|
|
flags As _Unsigned Long
|
|
tim As _Unsigned Long
|
|
pad2 As Long
|
|
extraInfo As _Offset
|
|
padding As String * 8
|
|
End Type
|
|
|
|
Declare CustomType Library
|
|
Function SendInput~&(ByVal inputCount As _Unsigned Long, ByVal inputArray As _Offset, ByVal inputTypeSize As _Unsigned Long)
|
|
Function GetLastError&()
|
|
End Declare
|
|
|