Class Keyboard - Paradoxis/Windows-Sound-Manager GitHub Wiki

Windows Sound Manager

Class description

Singleton class used to send virtual keystrokes to the OS

Methods

  • public static Keyboard.keyDown(int keyCode) Sends a keyDown event to the OS, will not trigger a keyUp event.
  • public static Keyboard.keyUp(int keyCode) Sends a keyUp event to the OS, only works if a keyDown event was triggered.
  • public static Keyboard.key(int keyCode, int lenth) Sends a keyUp and keyDown event simultaniously, to add a delay (in seconds) between the two event use the length argument.

Constants

The keyboard class contains a list of virutal key codes used in the keyUp, keyDown and key methods, for full documentation please refer to the MSDN Virual Key Codes list

  • public const VK_BACKSPACE=0x08
  • public const VK_ENTER=0x0D
  • public const VK_CTRL=0x11
  • public const VK_ALT=0x12
  • public const VK_0=0x30
  • public const VK_1=0x31
  • public const VK_2=0x32
  • public const VK_3=0x33
  • public const VK_4=0x34
  • public const VK_5=0x35
  • public const VK_6=0x36
  • public const VK_7=0x37
  • public const VK_8=0x38
  • public const VK_9=0x39
  • public const VK_A=0x41
  • public const VK_B=0x42
  • public const VK_C=0x43
  • public const VK_D=0x44
  • public const VK_E=0x45
  • public const VK_F=0x46
  • public const VK_G=0x47
  • public const VK_H=0x48
  • public const VK_I=0x49
  • public const VK_J=0x4A
  • public const VK_K=0x4B
  • public const VK_L=0x4C
  • public const VK_M=0x4D
  • public const VK_N=0x4E
  • public const VK_O=0x4F
  • public const VK_P=0x50
  • public const VK_Q=0x51
  • public const VK_R=0x52
  • public const VK_S=0x53
  • public const VK_T=0x54
  • public const VK_U=0x55
  • public const VK_V=0x56
  • public const VK_W=0x57
  • public const VK_X=0x58
  • public const VK_Y=0x59
  • public const VK_Z=0x5A
  • public const VK_VOLUME_MUTE = 0xAD
  • public const VK_VOLUME_DOWN = 0xAE
  • public const VK_VOLUME_UP = 0xAF
  • public const VK_MEDIA_NEXT_TRACK = 0xB0
  • public const VK_MEDIA_PREV_TRACK = 0xB1
  • public const VK_MEDIA_PLAY_PAUSE = 0xB3
  • public const VK_MEDIA_STOP = 0xB2
  • public const VK_LBUTTON = 0x01
  • public const VK_RBUTTON = 0x02
  • public const VK_CANCEL = 0x03
  • public const VK_MBUTTON = 0x04
  • public const VK_XBUTTON1 = 0x05
  • public const VK_XBUTTON2 = 0x06
  • public const VK_BACK = 0x08
  • public const VK_TAB = 0x09
  • public const VK_CLEAR = 0x0C
  • public const VK_RETURN = 0x0D
  • public const VK_SHIFT = 0x10
  • public const VK_CONTROL = 0x11
  • public const VK_MENU = 0x12
  • public const VK_PAUSE = 0x13
  • public const VK_CAPITAL = 0x14
  • public const VK_KANA = 0x15
  • public const VK_HANGUEL = 0x15
  • public const VK_HANGUL = 0x15
  • public const VK_JUNJA = 0x17
  • public const VK_FINAL = 0x18
  • public const VK_HANJA = 0x19
  • public const VK_KANJI = 0x19
  • public const VK_ESCAPE = 0x1B
  • public const VK_CONVERT = 0x1C
  • public const VK_NONCONVERT = 0x1D
  • public const VK_ACCEPT = 0x1E
  • public const VK_MODECHANGE = 0x1F
  • public const VK_SPACE = 0x20
  • public const VK_PRIOR = 0x21
  • public const VK_NEXT = 0x22
  • public const VK_END = 0x23
  • public const VK_HOME = 0x24
  • public const VK_LEFT = 0x25
  • public const VK_UP = 0x26
  • public const VK_RIGHT = 0x27
  • public const VK_DOWN = 0x28
  • public const VK_SELECT = 0x29
  • public const VK_PRINT = 0x2A
  • public const VK_EXECUTE = 0x2B
  • public const VK_SNAPSHOT = 0x2C
  • public const VK_INSERT = 0x2D
  • public const VK_DELETE = 0x2E
  • public const VK_HELP = 0x2F
  • public const VK_LWIN = 0x5B
  • public const VK_RWIN = 0x5C
  • public const VK_APPS = 0x5D
  • public const VK_SLEEP = 0x5F
  • public const VK_NUMPAD0 = 0x60
  • public const VK_NUMPAD1 = 0x61
  • public const VK_NUMPAD2 = 0x62
  • public const VK_NUMPAD3 = 0x63
  • public const VK_NUMPAD4 = 0x64
  • public const VK_NUMPAD5 = 0x65
  • public const VK_NUMPAD6 = 0x66
  • public const VK_NUMPAD7 = 0x67
  • public const VK_NUMPAD8 = 0x68
  • public const VK_NUMPAD9 = 0x69
  • public const VK_MULTIPLY = 0x6A
  • public const VK_ADD = 0x6B
  • public const VK_SEPARATOR = 0x6C
  • public const VK_SUBTRACT = 0x6D
  • public const VK_DECIMAL = 0x6E
  • public const VK_DIVIDE = 0x6F
  • public const VK_F1 = 0x70
  • public const VK_F2 = 0x71
  • public const VK_F3 = 0x72
  • public const VK_F4 = 0x73
  • public const VK_F5 = 0x74
  • public const VK_F6 = 0x75
  • public const VK_F7 = 0x76
  • public const VK_F8 = 0x77
  • public const VK_F9 = 0x78
  • public const VK_F10 = 0x79
  • public const VK_F11 = 0x7A
  • public const VK_F12 = 0x7B
  • public const VK_F13 = 0x7C
  • public const VK_F14 = 0x7D
  • public const VK_F15 = 0x7E
  • public const VK_F16 = 0x7F
  • public const VK_F17 = 0x80
  • public const VK_F18 = 0x81
  • public const VK_F19 = 0x82
  • public const VK_F20 = 0x83
  • public const VK_F21 = 0x84
  • public const VK_F22 = 0x85
  • public const VK_F23 = 0x86
  • public const VK_F24 = 0x87
  • public const VK_NUMLOCK = 0x90
  • public const VK_SCROLL = 0x91
  • public const VK_LSHIFT = 0xA0
  • public const VK_RSHIFT = 0xA1
  • public const VK_LCONTROL = 0xA2
  • public const VK_RCONTROL = 0xA3
  • public const VK_LMENU = 0xA4
  • public const VK_RMENU = 0xA5
  • public const VK_BROWSER_BACK = 0xA6
  • public const VK_BROWSER_FORWARD = 0xA7
  • public const VK_BROWSER_REFRESH = 0xA8
  • public const VK_BROWSER_STOP = 0xA9
  • public const VK_BROWSER_SEARCH = 0xAA
  • public const VK_BROWSER_FAVORITES = 0xAB
  • public const VK_BROWSER_HOME = 0xAC
  • public const VK_LAUNCH_MAIL = 0xB4
  • public const VK_LAUNCH_MEDIA_SELECT = 0xB5
  • public const VK_LAUNCH_APP1 = 0xB6
  • public const VK_LAUNCH_APP2 = 0xB7
  • public const VK_OEM_1 = 0xBA
  • public const VK_OEM_PLUS = 0xBB
  • public const VK_OEM_COMMA = 0xBC
  • public const VK_OEM_MINUS = 0xBD
  • public const VK_OEM_PERIOD = 0xBE
  • public const VK_OEM_2 = 0xBF
  • public const VK_OEM_3 = 0xC0
  • public const VK_OEM_4 = 0xDB
  • public const VK_OEM_5 = 0xDC
  • public const VK_OEM_6 = 0xDD
  • public const VK_OEM_7 = 0xDE
  • public const VK_OEM_8 = 0xDF
  • public const VK_OEM_102 = 0xE2
  • public const VK_PROCESSKEY = 0xE5
  • public const VK_PACKET = 0xE7
  • public const VK_ATTN = 0xF6
  • public const VK_CRSEL = 0xF7
  • public const VK_EXSEL = 0xF8
  • public const VK_EREOF = 0xF9
  • public const VK_PLAY = 0xFA
  • public const VK_ZOOM = 0xFB
  • public const VK_NONAME = 0xFC
  • public const VK_PA1 = 0xFD
  • public const VK_OEM_CLEAR = 0xFE