1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-06 19:50:22 +00:00
QB64-PE/tests/compile_tests/keyboard/sendinput.bi
Matthew Kilgore 8e1e7bc540 Fix keyboard _Device on Windows
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
2023-04-25 19:12:01 -04:00

29 lines
585 B
Plaintext

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