blob: dce57c28afb0271fafddeffcbe785d8683e31198 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{$IFDEF OGC_INTERFACE}
const
USBKEYBOARD_PRESSED = 0;
USBKEYBOARD_RELEASED = 1;
USBKEYBOARD_DISCONNECTED = 2;
type
USBKeyboard_eventType = Integer;
const
USBKEYBOARD_LEDNUM = 0;
USBKEYBOARD_LEDCAPS = 1;
USBKEYBOARD_LEDSCROLL = 2;
type
USBKeyboard_led = Integer;
USBKeyboard_event = packed record
type_ : USBKeyboard_eventType;
keyCode : cuint8;
end;
eventcallback = procedure(event: USBKeyboard_event); cdecl;
function USBKeyboard_Initialize: cint32; cdecl; external;
function USBKeyboard_Deinitialize: cint32; cdecl; external;
function USBKeyboard_Open(cb: eventcallback): cint32; cdecl; external;
procedure USBKeyboard_Close; cdecl; external;
function USBKeyboard_IsConnected: cbool; cdecl; external;
function USBKeyboard_Scan: cint32; cdecl; external;
function USBKeyboard_SetLed(led: USBKeyboard_led; on_: cbool): cint32; cdecl; external;
function USBKeyboard_ToggleLed(led: USBKeyboard_led): cint32; cdecl; external;
{$ENDIF}
|