
;Miscellaneous
;Event modes
Const DX9_EVENT_IMMEDIATE 	= 0
Const DX9_EVENT_WAIT		= 1

;Windows virtual keyboard mappings
Const VK_LBUTTON	= $01	;Left mouse button
Const VK_RBUTTON	= $02	;Right mouse button
Const VK_CANCEL	 	= $03	;Control-break processing
Const VK_MBUTTON	= $04	;Middle mouse button
Const VK_XBUTTON1	= $05	;X1 mouse button
Const VK_XBUTTON2	= $06	;X2 mouse button
Const VK_BACK	 	= $08	;BACKSPACE key
Const VK_TAB	 		= $09	;TAB key
Const VK_CLEAR	 	= $0C	;CLEAR key
Const VK_RETURN	 	= $0D	;ENTER key
Const VK_SHIFT	 	= $10	;SHIFT key
Const VK_CONTROL	= $11	;CTRL key
Const VK_MENU	 	= $12	;ALT key
Const VK_PAUSE	 	= $13	;PAUSE key
Const VK_CAPITAL	= $14	;CAPS LOCK key
Const VK_KANA	 	= $15	;IME Kana mode
Const VK_HANGUL	 	= $15	;IME Hangul mode
Const VK_IME_ON	 	= $16	;IME On
Const VK_JUNJA	 	= $17	;IME Junja mode
Const VK_FINAL	 	= $18	;IME final mode
Const VK_HANJA	 	= $19	;IME Hanja mode
Const VK_KANJI	 	= $19	;IME Kanji mode
Const VK_IME_OFF	= $1A	;IME Off
Const VK_ESCAPE	 	= $1B	;ESC key
Const VK_CONVERT	 = $1C	;IME convert
Const VK_NONCONVERT	 = $1D	;IME nonconvert
Const VK_ACCEPT	 	 = $1E	;IME accept
Const VK_MODECHANGE	 = $1F	;IME mode change request
Const VK_SPACE	 	 = $20	;SPACEBAR
Const VK_PRIOR	 	 = $21	;PAGE UP key
Const VK_NEXT	 	 = $22		;PAGE DOWN key
Const VK_END	 		 = $23		;END key
Const VK_HOME	 	 = $24		;HOME key
Const VK_LEFT	 = $25		;LEFT ARROW key
Const VK_UP	 = $26		;UP ARROW key
Const VK_RIGHT	 = $27	;RIGHT ARROW key
Const VK_DOWN	 = $28		;DOWN ARROW key
Const VK_SELECT	 = $29	;SELECT key
Const VK_PRINT	 = $2A	;PRINT key
Const VK_EXECUTE	 = $2B	;EXECUTE key
Const VK_SNAPSHOT	 = $2C	;PRINT SCREEN key
Const VK_INSERT	 = $2D	;INS key
Const VK_DELETE	 = $2E	;DEL key
Const VK_HELP	 = $2F		;HELP key
Const VK_0 = $30				;0 key
Const VK_1 = $31				;1 key
Const VK_2 = $32				;2 key
Const VK_3 = $33				;3 key
Const VK_4 = $34				;4 key
Const VK_5 = $35				;5 key
Const VK_6 = $36				;6 key
Const VK_7 = $37				;7 key
Const VK_8 = $38				;8 key
Const VK_9 = $39				;9 key
Const VK_A = $41				;A key
Const VK_B = $42				;B key
Const VK_C = $43				;C key
Const VK_D = $44				;D key
Const VK_E = $45				;E key
Const VK_F = $46				;F key
Const VK_G = $47				;G key
Const VK_H = $48				;H key
Const VK_I = $49				;I key
Const VK_J = $4A				;J key
Const VK_K = $4B				;K key
Const VK_L = $4C				;L key
Const VK_M = $4D				;M key
Const VK_N = $4E				;N key
Const VK_O = $4F				;O key
Const VK_P = $50				;P key
Const VK_Q = $51				;Q key
Const VK_R = $52				;R key
Const VK_S = $53				;S key
Const VK_T = $54				;T key
Const VK_U = $55				;U key
Const VK_V = $56				;V key
Const VK_W = $57				;W key
Const VK_X = $58				;X key
Const VK_Y = $59				;Y key
Const VK_Z = $5A				;Z key
Const VK_LWIN	 = $5B		;Left Windows key
Const VK_RWIN	 = $5C		;Right Windows key
Const VK_APPS	 = $5D		;Applications key
Const VK_SLEEP	 = $5F	;Computer Sleep key
Const VK_NUMPAD0	 = $60	;Numeric keypad 0 key
Const VK_NUMPAD1	 = $61	;Numeric keypad 1 key
Const VK_NUMPAD2	 = $62	;Numeric keypad 2 key
Const VK_NUMPAD3	 = $63	;Numeric keypad 3 key
Const VK_NUMPAD4	 = $64	;Numeric keypad 4 key
Const VK_NUMPAD5	 = $65	;Numeric keypad 5 key
Const VK_NUMPAD6	 = $66	;Numeric keypad 6 key
Const VK_NUMPAD7	 = $67	;Numeric keypad 7 key
Const VK_NUMPAD8	 = $68	;Numeric keypad 8 key
Const VK_NUMPAD9	 = $69	;Numeric keypad 9 key
Const VK_MULTIPLY	 = $6A	;Multiply key *
Const VK_ADD	 = $6B		;Add key
Const VK_SEPARATOR	 = $6C;Separator key
Const VK_SUBTRACT	 = $6D	;Subtract key
Const VK_DECIMAL	 = $6E	;Decimal key
Const VK_DIVIDE	 = $6F	;Divide key
Const VK_F1	 = $70		;F1 key
Const VK_F2	 = $71		;F2 key
Const VK_F3	 = $72		;F3 key
Const VK_F4	 = $73		;F4 key
Const VK_F5	 = $74		;F5 key
Const VK_F6	 = $75		;F6 key
Const VK_F7	 = $76		;F7 key
Const VK_F8	 = $77		;F8 key
Const VK_F9	 = $78		;F9 key
Const VK_F10	 = $79		;F10 key
Const VK_F11	 = $7A		;F11 key
Const VK_F12	 = $7B		;F12 key
Const VK_F13	 = $7C		;F13 key
Const VK_F14	 = $7D		;F14 key
Const VK_F15	 = $7E		;F15 key
Const VK_F16	 = $7F		;F16 key
Const VK_F17	 = $80		;F17 key
Const VK_F18	 = $81		;F18 key
Const VK_F19	 = $82		;F19 key
Const VK_F20	 = $83		;F20 key
Const VK_F21	 = $84		;F21 key
Const VK_F22	 = $85		;F22 key
Const VK_F23	 = $86		;F23 key
Const VK_F24	 = $87		;F24 key
Const VK_NUMLOCK	 = $90	;NUM LOCK key
Const VK_SCROLL	 = $91	;SCROLL LOCK key
Const VK_LSHIFT	 = $A0	;Left SHIFT key
Const VK_RSHIFT	 = $A1	;Right SHIFT key
Const VK_LCONTROL	 = $A2	;Left CONTROL key
Const VK_RCONTROL	 = $A3	;Right CONTROL key
Const VK_LMENU	 = $A4	;Left ALT key
Const VK_RMENU	 = $A5	;Right ALT key
Const VK_BROWSER_BACK	 = $A6;Browser Back key
Const VK_BROWSER_FORWARD	 = $A7	;Browser Forward key
Const VK_BROWSER_REFRESH	 = $A8	;Browser Refresh key
Const VK_BROWSER_STOP	 = $A9		;Browser Stop key
Const VK_BROWSER_SEARCH	 = $AA	;Browser Search key
Const VK_BROWSER_FAVORITES	 = $AB;Browser Favorites key
Const VK_BROWSER_HOME	 = $AC		;Browser Start and Home key
Const VK_VOLUME_MUTE	 = $AD	;Volume Mute key
Const VK_VOLUME_DOWN	 = $AE	;Volume Down key
Const VK_VOLUME_UP	 = $AF	;Volume Up key
Const VK_MEDIA_NEXT_TRACK	 = $B0	;Next Track key
Const VK_MEDIA_PREV_TRACK	 = $B1	;Previous Track key
Const VK_MEDIA_STOP	 = $B2		;Stop Media key
Const VK_MEDIA_PLAY_PAUSE	 = $B3	;Play/Pause Media key
Const VK_LAUNCH_MAIL	 = $B4		;Start Mail key
Const VK_LAUNCH_MEDIA_SELECT	 = $B5	;Select Media key
Const VK_LAUNCH_APP1	 = $B6			;Start Application 1 key
Const VK_LAUNCH_APP2	 = $B7			;Start Application 2 key
Const VK_OEM_1	 = $BA				;Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the ;: key
Const VK_OEM_PLUS	 = $BB				;For any country/region, the + key
Const VK_OEM_COMMA	 = $BC			;For any country/region, the , key
Const VK_OEM_MINUS	 = $BD			;For any country/region, the - key
Const VK_OEM_PERIOD	 = $BE			;For any country/region, the . key
Const VK_OEM_2	 = $BF			;Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the /? key
Const VK_OEM_3	 = $C0			;Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the `~ key
Const VK_OEM_4	 = $DB			;Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the [{ key
Const VK_OEM_5	 = $DC			;Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the \\| key
Const VK_OEM_6	 = $DD			;Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the ]} key
Const VK_OEM_7	 = $DE			;Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the '" key
Const VK_OEM_8	 = $DF			;Used for miscellaneous characters; it can vary by keyboard.
Const VK_OEM_102	 = $E2			;The <> keys on the US standard keyboard, or the \\| key on the non-US 102-key keyboard
Const VK_PROCESSKEY	 = $E5		;IME PROCESS key
Const VK_PACKET	 = $E7			;Used to pass Unicode characters as if they were keystrokes. The Const VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP.
Const VK_ATTN	 = $F6				;Attn key
Const VK_CRSEL	 = $F7	;CrSel key
Const VK_EXSEL	 = $F8	;ExSel key
Const VK_EREOF	 = $F9	;Erase EOF key
Const VK_PLAY	 = $FA		;Play key
Const VK_ZOOM	 = $FB		;Zoom key
Const VK_PA1	 = $FD		;PA1 key
Const VK_OEM_CLEAR	 = $FE	;Clear key

;Mouse input is also taken through VK_ constants, and will work with DX9_IsKeyHit/DX9_IsKeyDown,
;But for readability, DX9_IsMouseHit/DX9_IsMouseDown commands are provided within the library.
Const VM_LBUTTON	= $01	;Left mouse button
Const VM_RBUTTON	= $02	;Right mouse button
Const VM_MBUTTON 	= $04	;Middle mouse button

;Const XInput Button Constants
; Use these with BBR_ControllerButtonDown/Hit:
Const XINPUT_GAMEPAD_DPAD_UP = 1
Const XINPUT_GAMEPAD_DPAD_DOWN = 2
Const XINPUT_GAMEPAD_DPAD_LEFT = 4
Const XINPUT_GAMEPAD_DPAD_RIGHT = 8
Const XINPUT_GAMEPAD_START = 16
Const XINPUT_GAMEPAD_BACK = 32
Const XINPUT_GAMEPAD_LEFT_THUMB = 64
Const XINPUT_GAMEPAD_RIGHT_THUMB = 128
Const XINPUT_GAMEPAD_LEFT_SHOULDER = 256
Const XINPUT_GAMEPAD_RIGHT_SHOULDER = 512
Const XINPUT_GAMEPAD_A = 4096
Const XINPUT_GAMEPAD_B = 8192
Const XINPUT_GAMEPAD_X = 16384
Const XINPUT_GAMEPAD_Y = 32768