Unit GlobalConst

From Ultibo.org
Revision as of 02:37, 26 September 2016 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


To be documented

Constants



Universal error constants ERROR_*
ERROR_SUCCESS = 0; Success
NO_ERROR = 0; Success
 
ERROR_INVALID_FUNCTION = 1; Invalid function
ERROR_FILE_NOT_FOUND = 2; The file cannot be found
ERROR_PATH_NOT_FOUND = 3; The path cannot be found
ERROR_TOO_MANY_OPEN_FILES = 4; Too many open files
ERROR_ACCESS_DENIED = 5; Access is denied
ERROR_INVALID_HANDLE = 6; Invalid handle}
ERROR_NOT_ENOUGH_MEMORY = DWORD(8); Not enough storage is available to process this command
 
ERROR_INVALID_ACCESS = 12; Invalid access
ERROR_INVALID_DATA = 13; The data is invalid
ERROR_OUTOFMEMORY = 14; Not enough memory is available
ERROR_INVALID_DRIVE = 15; Cannot find the drive specified
ERROR_CURRENT_DIRECTORY = 16; Current directory cannot be removed
ERROR_NOT_SAME_DEVICE = 17; Cannot move the file to a different disk drive
ERROR_NO_MORE_FILES = 18; There are no more files
ERROR_WRITE_PROTECT = 19; Media is write protected
ERROR_BAD_UNIT = 20; Cannot find the device specified
ERROR_NOT_READY = 21; The device is not ready
ERROR_BAD_COMMAND = 22; The device does not recognise the command
 
ERROR_WRITE_FAULT = 29; The device cannot be written to
ERROR_READ_FAULT = 30; The device cannot be read from
ERROR_GEN_FAILURE = 31; The device has failed
 
ERROR_NOT_SUPPORTED = 50; The request is not supported
 
ERROR_DEV_NOT_EXIST = 55; The device does not exist
 
ERROR_BAD_DEV_TYPE = 66; Invalid device type
 
ERROR_ALREADY_ASSIGNED = 85; The device name is already in use
ERROR_INVALID_PASSWORD = 86; Invalid pasword
ERROR_INVALID_PARAMETER = 87; Invalid parameter
 
ERROR_SEM_IS_SET = 102; The semaphore is in use and cannot be closed
ERROR_OPEN_FAILED = 110; The file or device could not be opened
ERROR_CALL_NOT_IMPLEMENTED = 120; The function is not currently implemented
ERROR_INSUFFICIENT_BUFFER = 122; The buffer passed is too small for the requested data
ERROR_WAIT_NO_CHILDREN = 128; There are no child processes to wait for
 
ERROR_NOT_LOCKED = 158; The entry is not locked
 
ERROR_LOCK_FAILED = 167; The lock operation failed
 
ERROR_ALREADY_EXISTS = 183; The file or object already exists
 
ERROR_ENVVAR_NOT_FOUND = 203; The environment variable could not be found
 
ERROR_LOCKED = 212; The entry is already locked
 
ERROR_MORE_DATA = 234; More data is available than the provided buffer
 
ERROR_WAIT_TIMEOUT = 258; The operation timed out
ERROR_NO_MORE_ITEMS = 259; No more items available
 
ERROR_NOT_OWNER = 288; The current thread is not the owner
 
ERROR_OPERATION_ABORTED = DWORD(995); The I/O operation has been aborted because of either a thread exit or an application request
ERROR_IO_INCOMPLETE = DWORD(996); Overlapped I/O event is not in a signaled state
ERROR_IO_PENDING = DWORD(997); Overlapped I/O operation is in progress
 
ERROR_CAN_NOT_COMPLETE = 1003; Cannot complete the function
 
ERROR_NOT_FOUND = 1168; The entry or device was not found
 
ERROR_INVALID_ACL = DWORD(1336); The access control list (ACL) structure is invalid
ERROR_INVALID_SID = DWORD(1337); The security ID structure is invalid
ERROR_INVALID_SECURITY_DESCR = DWORD(1338); The security descriptor structure is invalid
 
ERROR_TIMEOUT = 1460; The operation returned because the timeout expired
 
ERROR_FUNCTION_FAILED = 1627; The function call failed
 
Errors below here have no compatibility equivalent
ERROR_NOT_VALID = 1000001; The entry or device is not valid
ERROR_NOT_ASSIGNED = 1000002; The device is not assigned
ERROR_IN_USE = 1000003; The device is in use
ERROR_OPERATION_FAILED = 1000004; The operation failed
ERROR_NOT_OPEN = 1000005; The file or device is not open
ERROR_ALREADY_OPEN = 1000006; The file or device is already open
ERROR_WAIT_ABANDONED = 1000007; The operation was abandoned
ERROR_IN_PROGRESS = 1000008; An operation is already in progress
ERROR_RUNTIME_ERROR = 1000009; A run time occurred
ERROR_EXCEPTION = 1000010; An exception occurred
ERROR_NOT_PROCESSED = 1000011; The entry has not been processed
ERROR_NOT_COMPLETED = 1000012; The entry or operation has not completed
ERROR_NOT_COMPATIBLE = 1000013; The entry is not compatible for the operation
ERROR_CANCELLED = 1000014; The entry or operation has been cancelled
 
ERROR_UNKNOWN = $FFFFFFFF;  


Universal value constants INVALID_*
INVALID_HANDLE_VALUE = THandle(-1); DWORD(-1);
INVALID_FILE_SIZE = DWORD($FFFFFFFF);  
INVALID_SET_FILE_POINTER = DWORD(-1);  
INVALID_FILE_ATTRIBUTES = DWORD(-1);  


File position constants FILE_*
FILE_BEGIN = 0;  
FILE_CURRENT = 1;  
FILE_END = 2;  


File open/create constants CREATE_*
CREATE_NEW = 1;  
CREATE_ALWAYS = 2;  
OPEN_EXISTING = 3;  
OPEN_ALWAYS = 4;  
TRUNCATE_EXISTING = 5;  


File creation flag constants FILE_FLAG_*
FILE_FLAG_WRITE_THROUGH = DWORD($80000000);  
FILE_FLAG_OVERLAPPED = $40000000;  
FILE_FLAG_NO_BUFFERING = $20000000;  
FILE_FLAG_RANDOM_ACCESS = $10000000;  
FILE_FLAG_SEQUENTIAL_SCAN = $08000000;  
FILE_FLAG_DELETE_ON_CLOSE = $04000000;  
FILE_FLAG_BACKUP_SEMANTICS = $02000000;  
FILE_FLAG_POSIX_SEMANTICS = $01000000;  
FILE_FLAG_OPEN_REPARSE_POINT = $00200000;  
FILE_FLAG_OPEN_NO_RECALL = $00100000;  
FILE_FLAG_FIRST_PIPE_INSTANCE = $00080000;  


File attribute constants FILE_ATTRIBUTE_*
FILE_ATTRIBUTE_READONLY = $00000001;  
FILE_ATTRIBUTE_HIDDEN = $00000002;  
FILE_ATTRIBUTE_SYSTEM = $00000004;  
FILE_ATTRIBUTE_DIRECTORY = $00000010;  
FILE_ATTRIBUTE_ARCHIVE = $00000020;  
FILE_ATTRIBUTE_DEVICE = $00000040;  
FILE_ATTRIBUTE_NORMAL = $00000080;  
FILE_ATTRIBUTE_TEMPORARY = $00000100;  
FILE_ATTRIBUTE_SPARSE_FILE = $00000200;  
FILE_ATTRIBUTE_REPARSE_POINT = $00000400;  
FILE_ATTRIBUTE_COMPRESSED = $00000800;  
FILE_ATTRIBUTE_OFFLINE = $00001000;  
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = $00002000;  
FILE_ATTRIBUTE_ENCRYPTED = $00004000;  


Filesystem attribute constants FS_*
FS_CASE_SENSITIVE_SEARCH = $00000001;  
FS_CASE_PRESERVED_NAMES = $00000002;  
FS_UNICODE_ON_DISK = $00000004;  
FS_PERSISTENT_ACLS = $00000008;  
FS_FILE_COMPRESSION = $00000010;  
FS_VOLUME_QUOTAS = $00000020;  
FS_SUPPORTS_SPARSE_FILES = $00000040;  
FS_SUPPORTS_REPARSE_POINTS = $00000080;  
FS_SUPPORTS_REMOTE_STORAGE = $00000100;  
FS_VOLUME_IS_COMPRESSED = $00008000;  
FS_SUPPORTS_OBJECT_IDS = $00010000;  
FS_SUPPORTS_ENCRYPTION = $00020000;  
FS_NAMED_STREAMS = $00040000;  
FS_READ_ONLY_VOLUME = $00080000;  


Timeout constants INFINITE =*
INFINITE = LongWord(-1);  


TLS constants TLS_*
TLS_OUT_OF_INDEXES = DWORD($FFFFFFFF);  


Wait constants WAIT_*
WAIT_OBJECT_0 = ERROR_SUCCESS + 0;  
WAIT_ABANDONED = $00000080 + 0; STATUS_ABANDONED_WAIT_0
WAIT_ABANDONED_0 = $00000080 + 0; STATUS_ABANDONED_WAIT_0
WAIT_TIMEOUT = ERROR_WAIT_TIMEOUT;  
WAIT_FAILED = DWORD($FFFFFFFF);  
 
WAIT_IO_COMPLETION = $000000C0; STATUS_USER_APC
 
MAXIMUM_WAIT_OBJECTS = 64; Maximum number of wait objects


Thread state constants STILL_*
STILL_ACTIVE = ERROR_NO_MORE_ITEMS;  


TimeZone constants TIME_ZONE_*
TIME_ZONE_ID_INVALID = DWORD($FFFFFFFF);  


Universal key code constants KEY_CODE_*
Keyboard key codes are based on the Unicode standard with each key code mapped to the code point for that character (See http://unicode.org or http://unicode-table.com)
Keyboard keymaps map the scan code value to the key code value for the specific keyboard layout and include alternate mappings for Shift and AltGr
Non character codes for keys like Home, End, Arrows, F1..F24, Shift, Caps Lock etc are mapped in the Unicode Private Use Area (E000-F8FF)
These are the values reported in the KeyCode field of the TKeyboardData structure returned by the KeyboardRead function
 
Control Characters (0000-001F)
KEY_CODE_NONE = $0000; 0
KEY_CODE_BACKSPACE = $0008; 8
KEY_CODE_TAB = $0009; 9
KEY_CODE_ENTER = $000D; 13
KEY_CODE_ESCAPE = $001B; 27
KEY_CODE_DELETE = $007F; 127
 
Basic Latin Characters (0020-007F)
Punctuation
KEY_CODE_SPACE = $0020; 32
KEY_CODE_EXCLAMATION = $0021; 33
KEY_CODE_QUOTATION = $0022; 34
KEY_CODE_NUMBER = $0023; 35 (Hash / Pound)
KEY_CODE_DOLLAR = $0024; 36
KEY_CODE_PERCENT = $0025; 37
KEY_CODE_AMPERSAND = $0026; 38
KEY_CODE_APOSTROPHE = $0027; 39
KEY_CODE_LEFT_BRACKET = $0028; 40
KEY_CODE_RIGHT_BRACKET = $0029; 41
KEY_CODE_ASTERISK = $002A; 42
KEY_CODE_PLUS = $002B; 43
KEY_CODE_COMMA = $002C; 44
KEY_CODE_MINUS = $002D; 45
KEY_CODE_PERIOD = $002E; 46
KEY_CODE_SLASH = $002F; 47
 
Numerals
KEY_CODE_0 = $0030; 48
KEY_CODE_1 = $0031; 49
KEY_CODE_2 = $0032; 50
KEY_CODE_3 = $0033; 51
KEY_CODE_4 = $0034; 52
KEY_CODE_5 = $0035; 53
KEY_CODE_6 = $0036; 54
KEY_CODE_7 = $0037; 55
KEY_CODE_8 = $0038; 56
KEY_CODE_9 = $0039; 57
 
Punctuation
KEY_CODE_COLON = $003A; 58
KEY_CODE_SEMICOLON = $003B; 59
KEY_CODE_LESSTHAN = $003C; 60
KEY_CODE_EQUALS = $003D; 61
KEY_CODE_GREATERTHAN = $003E; 62
KEY_CODE_QUESTION = $003F; 63
KEY_CODE_AT = $0040; 64
 
Capital Characters
KEY_CODE_CAPITAL_A = $0041; 65
KEY_CODE_CAPITAL_B = $0042; 66
KEY_CODE_CAPITAL_C = $0043; 67
KEY_CODE_CAPITAL_D = $0044; 68
KEY_CODE_CAPITAL_E = $0045; 69
KEY_CODE_CAPITAL_F = $0046; 70
KEY_CODE_CAPITAL_G = $0047; 71
KEY_CODE_CAPITAL_H = $0048; 72
KEY_CODE_CAPITAL_I = $0049; 73
KEY_CODE_CAPITAL_J = $004A; 74
KEY_CODE_CAPITAL_K = $004B; 75
KEY_CODE_CAPITAL_L = $004C; 76
KEY_CODE_CAPITAL_M = $004D; 77
KEY_CODE_CAPITAL_N = $004E; 78
KEY_CODE_CAPITAL_O = $004F; 79
KEY_CODE_CAPITAL_P = $0050; 80
KEY_CODE_CAPITAL_Q = $0051; 81
KEY_CODE_CAPITAL_R= $0052; 82
KEY_CODE_CAPITAL_S = $0053; 83
KEY_CODE_CAPITAL_T = $0054; 84
KEY_CODE_CAPITAL_U = $0055; 85
KEY_CODE_CAPITAL_V = $0056; 86
KEY_CODE_CAPITAL_W = $0057; 87
KEY_CODE_CAPITAL_X = $0058; 88
KEY_CODE_CAPITAL_Y = $0059; 89
KEY_CODE_CAPITAL_Z = $005A; 90
 
Punctuation
KEY_CODE_LEFT_SQUARE = $005B; 91
KEY_CODE_BACKSLASH = $005C; 92
KEY_CODE_RIGHT_SQUARE = $005D; 93
KEY_CODE_CARET = $005E; 94 (Circumflex)
KEY_CODE_UNDERSCORE = $005F; 95
KEY_CODE_GRAVE = $0060; 96
 
Lowercase Characters
KEY_CODE_A = $0061; 97
KEY_CODE_B = $0062; 98
KEY_CODE_C = $0063; 99
KEY_CODE_D = $0064; 100
KEY_CODE_E = $0065; 101
KEY_CODE_F = $0066; 102
KEY_CODE_G = $0067; 103
KEY_CODE_H = $0068; 104
KEY_CODE_I = $0069; 105
KEY_CODE_J = $006A; 106
KEY_CODE_K = $006B; 107
KEY_CODE_L = $006C; 108
KEY_CODE_M = $006D; 109
KEY_CODE_N = $006E; 110
KEY_CODE_O = $006F; 111
KEY_CODE_P = $0070; 112
KEY_CODE_Q = $0071; 113
KEY_CODE_R = $0072; 114
KEY_CODE_S = $0073; 115
KEY_CODE_T = $0074; 116
KEY_CODE_U = $0075; 117
KEY_CODE_V = $0076; 118
KEY_CODE_W = $0077; 119
KEY_CODE_X = $0078; 120
KEY_CODE_Y = $0079; 121
KEY_CODE_Z = $007A; 122
 
Punctuation
KEY_CODE_LEFT_BRACE = $007B; 123 (Curly Bracket)
KEY_CODE_PIPE = $007C; 124 (Vertical Bar)
KEY_CODE_RIGHT_BRACE = $007D; 125 (Curly Bracket)
KEY_CODE_TILDE = $007E; 126
KEY_CODE_DELETE (See above)
 
Latin-1 Supplement Characters (0080-00FF)
KEY_CODE_INVERTED_EXCLAMATION = $00A1;  
KEY_CODE_CENT = $00A2;  
KEY_CODE_POUND = $00A3;  
KEY_CODE_CURRENCY = $00A4;  
KEY_CODE_YEN = $00A5;  
KEY_CODE_BROKEN_BAR = $00A6;  
KEY_CODE_SECTION = $00A7;  
KEY_CODE_DIAERESIS = $00A8;  
KEY_CODE_COPYRIGHT = $00A9;  
KEY_CODE_FEMININE = $00AA;  
KEY_CODE_LEFT_DOUBLE_ANGLE = $00AB;  
KEY_CODE_NOT = $00AC;  
KEY_CODE_REGISTERED = $00AE;  
KEY_CODE_MACRON = $00AF;  
KEY_CODE_DEGREE = $00B0;  
KEY_CODE_PLUS_MINUS = $00B1;  
KEY_CODE_SUPERSCRIPT_2 = $00B2;  
KEY_CODE_SUPERSCRIPT_3 = $00B3;  
KEY_CODE_ACUTE = $00B4;  
KEY_CODE_MICRO = $00B5;  
KEY_CODE_PILCROW = $00B6;  
KEY_CODE_MIDDLE_DOT = $00B7;  
KEY_CODE_CEDILLA = $00B8;  
KEY_CODE_SUPERSCRIPT_1 = $00B9;  
KEY_CODE_MASCULINE = $00BA;  
KEY_CODE_RIGHT_DOUBLE_ANGLE = $00BB;  
KEY_CODE_ONE_QUARTER = $00BC;  
KEY_CODE_ONE_HALF = $00BD;  
KEY_CODE_THREE_QUARTER = $00BE;  
KEY_CODE_INVERTED_QUESTION = $00BF;  
KEY_CODE_CAPITAL_GRAVE_A = $00C0;  
KEY_CODE_CAPITAL_ACUTE_A = $00C1;  
KEY_CODE_CAPITAL_CIRCUMFLEX_A = $00C2;  
KEY_CODE_CAPITAL_TILDE_A = $00C3;  
KEY_CODE_CAPITAL_DIAERESIS_A = $00C4;  
KEY_CODE_CAPITAL_RING_A = $00C5;  
KEY_CODE_CAPITAL_AE = $00C6;  
KEY_CODE_CAPITAL_CEDILLA_C = $00C7;  
KEY_CODE_CAPITAL_GRAVE_E = $00C8;  
KEY_CODE_CAPITAL_ACUTE_E = $00C9;  
KEY_CODE_CAPITAL_CIRCUMFLEX_E = $00CA;  
KEY_CODE_CAPITAL_DIAERESIS_E = $00CB;  
KEY_CODE_CAPITAL_GRAVE_I = $00CC;  
KEY_CODE_CAPITAL_ACUTE_I = $00CD;  
KEY_CODE_CAPITAL_CIRCUMFLEX_I = $00CE;  
KEY_CODE_CAPITAL_DIAERESIS_I = $00CF;  
KEY_CODE_CAPITAL_ETH = $00D0;  
KEY_CODE_CAPITAL_TILDE_N = $00D1;  
KEY_CODE_CAPITAL_GRAVE_O = $00D2;  
KEY_CODE_CAPITAL_ACUTE_O = $00D3;  
KEY_CODE_CAPITAL_CIRCUMFLEX_O = $00D4;  
KEY_CODE_CAPITAL_TILDE_O = $00D5;  
KEY_CODE_CAPITAL_DIAERESIS_O = $00D6;  
KEY_CODE_MULTIPLY = $00D7;  
KEY_CODE_CAPITAL_STROKE_O = $00D8;  
KEY_CODE_CAPITAL_GRAVE_U = $00D9;  
KEY_CODE_CAPITAL_ACUTE_U = $00DA;  
KEY_CODE_CAPITAL_CIRCUMFLEX_U = $00DB;  
KEY_CODE_CAPITAL_DIAERESIS_U = $00DC;  
KEY_CODE_CAPITAL_ACUTE_Y = $00DD;  
KEY_CODE_CAPITAL_THORN = $00DE;  
KEY_CODE_SHARP_S = $00DF;  
KEY_CODE_GRAVE_A = $00E0;  
KEY_CODE_ACUTE_A = $00E1;  
KEY_CODE_CIRCUMFLEX_A = $00E2;  
KEY_CODE_TILDE_A = $00E3;  
KEY_CODE_DIAERESIS_A = $00E4;  
KEY_CODE_RING_A = $00E5;  
KEY_CODE_AE = $00E6;  
KEY_CODE_CEDILLA_C = $00E7;  
KEY_CODE_GRAVE_E = $00E8;  
KEY_CODE_ACUTE_E = $00E9;  
KEY_CODE_CIRCUMFLEX_E = $00EA;  
KEY_CODE_DIAERESIS_E = $00EB;  
KEY_CODE_GRAVE_I = $00EC;  
KEY_CODE_ACUTE_I = $00ED;  
KEY_CODE_CIRCUMFLEX_I = $00EE;  
KEY_CODE_DIAERESIS_I = $00EF;  
KEY_CODE_ETH = $00F0;  
KEY_CODE_TILDE_N = $00F1;  
KEY_CODE_GRAVE_O = $00F2;  
KEY_CODE_ACUTE_O = $00F3;  
KEY_CODE_CIRCUMFLEX_O = $00F4;  
KEY_CODE_TILDE_O = $00F5;  
KEY_CODE_DIAERESIS_O = $00F6;  
KEY_CODE_DIVISION = $00F7;  
KEY_CODE_STROKE_O = $00F8;  
KEY_CODE_GRAVE_U = $00F9;  
KEY_CODE_ACUTE_U = $00FA;  
KEY_CODE_CIRCUMFLEX_U = $00FB;  
KEY_CODE_DIAERESIS_U = $00FC;  
KEY_CODE_ACUTE_Y = $00FD;  
KEY_CODE_THORN = $00FE;  
KEY_CODE_DIAERESIS_Y = $00FF;  
 
General Punctuation (2000-206F)
KEY_CODE_LEFT_QUOTE = $2018;  
KEY_CODE_RIGHT_QUOTE = $2019;  
 
Currency Symbols (20A0-20CF)
KEY_CODE_EURO = $20AC;  
 
Private Area (E000-F8FF)
Non Character Codes
KEY_CODE_CAPSLOCK = $E000;  
KEY_CODE_F1 = $E001;  
KEY_CODE_F2 = $E002;  
KEY_CODE_F3 = $E003;  
KEY_CODE_F4 = $E004;  
KEY_CODE_F5 = $E005;  
KEY_CODE_F6 = $E006;  
KEY_CODE_F7 = $E007;  
KEY_CODE_F8 = $E008;  
KEY_CODE_F9 = $E009;  
KEY_CODE_F10 = $E00A;  
KEY_CODE_F11 = $E00B;  
KEY_CODE_F12 = $E00C;  
KEY_CODE_PRINTSCREEN = $E00D;  
KEY_CODE_SCROLLLOCK = $E00E;  
KEY_CODE_PAUSE = $E00F;  
KEY_CODE_INSERT = $E010;  
KEY_CODE_HOME = $E011;  
KEY_CODE_PAGEUP = $E012;  
KEY_CODE_END = $E013;  
KEY_CODE_PAGEDN = $E014;  
KEY_CODE_RIGHT_ARROW = $E015;  
KEY_CODE_LEFT_ARROW = $E016;  
KEY_CODE_DOWN_ARROW = $E017;  
KEY_CODE_UP_ARROW = $E018;  
KEY_CODE_NUMLOCK = $E019;  
KEY_CODE_APPLICATION = $E01A;  
KEY_CODE_POWER = $E01B;  
KEY_CODE_F13 = $E01C;  
KEY_CODE_F14 = $E01D;  
KEY_CODE_F15 = $E01E;  
KEY_CODE_F16 = $E01F;  
KEY_CODE_F17 = $E020;  
KEY_CODE_F18 = $E021;  
KEY_CODE_F19 = $E022;  
KEY_CODE_F20 = $E023;  
KEY_CODE_F21 = $E024;  
KEY_CODE_F22 = $E025;  
KEY_CODE_F23 = $E026;  
KEY_CODE_F24 = $E027;  
KEY_CODE_EXECUTE = $E028;  
KEY_CODE_HELP = $E029;  
KEY_CODE_MENU = $E02A;  
KEY_CODE_SELECT = $E02B;  
KEY_CODE_STOP = $E02C;  
KEY_CODE_AGAIN = $E02D;  
KEY_CODE_UNDO = $E02E;  
KEY_CODE_CUT = $E02F;  
KEY_CODE_COPY = $E030;  
KEY_CODE_PASTE = $E031;  
KEY_CODE_FIND = $E032;  
KEY_CODE_MUTE = $E033;  
KEY_CODE_VOLUMEUP = $E034;  
KEY_CODE_VOLUMEDOWN = $E035;  
KEY_CODE_LOCKING_CAPSLOCK = $E036;  
KEY_CODE_LOCKING_NUMLOCK = $E037;  
KEY_CODE_LOCKING_SCROLLLOCK = $E038;  
KEY_CODE_INTERNATIONAL1 = $E039;  
KEY_CODE_INTERNATIONAL2 = $E03A;  
KEY_CODE_INTERNATIONAL3 = $E03B;  
KEY_CODE_INTERNATIONAL4 = $E03C;  
KEY_CODE_INTERNATIONAL5 = $E03D;  
KEY_CODE_INTERNATIONAL6 = $E03E;  
KEY_CODE_INTERNATIONAL7 = $E03F;  
KEY_CODE_INTERNATIONAL8 = $E040;  
KEY_CODE_INTERNATIONAL9 = $E041;  
KEY_CODE_LANG1 = $E042;  
KEY_CODE_LANG2 = $E043;  
KEY_CODE_LANG3 = $E044;  
KEY_CODE_LANG4 = $E045;  
KEY_CODE_LANG5 = $E046;  
KEY_CODE_LANG6 = $E047;  
KEY_CODE_LANG7 = $E048;  
KEY_CODE_LANG8 = $E049;  
KEY_CODE_LANG9 = $E04A;  
KEY_CODE_ALT_ERASE = $E04B;  
KEY_CODE_SYSREQ = $E04C;  
KEY_CODE_CANCEL = $E04D;  
KEY_CODE_CLEAR = $E04E;  
KEY_CODE_PRIOR = $E04F;  
KEY_CODE_RETURN = $E050;  
KEY_CODE_SEPARATOR = $E051;  
KEY_CODE_OUT = $E052;  
KEY_CODE_OPER = $E053;  
KEY_CODE_CLEAR_AGAIN = $E054;  
KEY_CODE_CRSEL_PROPS = $E055;  
KEY_CODE_EXSEL = $E056;  
KEY_CODE_00 = $E057;  
KEY_CODE_000 = $E058;  
KEY_CODE_THOUSANDS_SEPARATOR = $E059;  
KEY_CODE_DECIMAL_SEPARATOR = $E05A;  
KEY_CODE_CURRENCY_UNIT = $E05B;  
KEY_CODE_CURRENCY_SUBUNIT = $E05C;  
KEY_CODE_XOR = $E05D;  
KEY_CODE_MEM_STORE = $E05E;  
KEY_CODE_MEM_RECALL = $E05F;  
KEY_CODE_MEM_CLEAR = $E060;  
KEY_CODE_MEM_ADD = $E061;  
KEY_CODE_MEM_SUBTRACT = $E062;  
KEY_CODE_MEM_MULTIPLY = $E063;  
KEY_CODE_MEM_DIVIDE = $E064;  
KEY_CODE_CLEAR_ENTRY = $E065;  
KEY_CODE_BINARY = $E066;  
KEY_CODE_OCTAL = $E067;  
KEY_CODE_DECIMAL = $E068;  
KEY_CODE_HEX = $E069;  
KEY_CODE_CTRL = $E06A;  
KEY_CODE_SHIFT = $E06B;  
KEY_CODE_ALT = $E06C;  
KEY_CODE_GUI = $E06D;  
KEY_CODE_DOUBLE_AMPERSAND = $E06E;  
KEY_CODE_DOUBLE_PIPE = $E06F;  
KEY_CODE_CENTER = $E070;  
 
KEY_CODE_TRANSLATE_START = $0080; Key codes below this are direct characters in all code pages
KEY_CODE_PRIVATE_START = $E000; Key codes in this range are private area mappings for non character keys
KEY_CODE_PRIVATE_END = $F8FF;  


Universal scan code constants SCAN_CODE_*
Keyboard scan codes are based on the USB HID Usages (See Section 10 of the Universal Serial Bus HID Usage Tables v1.12)
These are the values reported in the ScanCode field of the TKeyboardData structure returned by the KeyboardRead function
Any keyboard driver supporting legacy keyboards (eg PC/AT or PS/2) should translate the reported codes to be compatible with this set
 
SCAN_CODE_NONE = 0; Reserved (no event indicated)
SCAN_CODE_ROLLOVER = 1; Keyboard ErrorRollOver
SCAN_CODE_POSTFAIL = 2; Keyboard POSTFail
SCAN_CODE_ERROR = 3; Keyboard ErrorUndefined
SCAN_CODE_A = 4; Keyboard a or A
SCAN_CODE_B = 5; Keyboard b or B
SCAN_CODE_C = 6; Keyboard c or C
SCAN_CODE_D = 7; Keyboard d or D
SCAN_CODE_E = 8; Keyboard e or E
SCAN_CODE_F = 9; Keyboard f or F
SCAN_CODE_G = 10; Keyboard g or G
SCAN_CODE_H = 11; Keyboard h or H
SCAN_CODE_I = 12; Keyboard i or I
SCAN_CODE_J = 13; Keyboard j or J
SCAN_CODE_K = 14; Keyboard k or K
SCAN_CODE_L = 15; Keyboard l or L
SCAN_CODE_M = 16; Keyboard m or M
SCAN_CODE_N = 17; Keyboard n or N
SCAN_CODE_O = 18; Keyboard o or O
SCAN_CODE_P = 19; Keyboard p or P
SCAN_CODE_Q = 20; Keyboard q or Q
SCAN_CODE_R = 21; Keyboard r or R
SCAN_CODE_S = 22; Keyboard s or S
SCAN_CODE_T = 23; Keyboard t or T
SCAN_CODE_U = 24; Keyboard u or U
SCAN_CODE_V = 25; Keyboard v or V
SCAN_CODE_W = 26; Keyboard w or W
SCAN_CODE_X = 27; Keyboard x or X
SCAN_CODE_Y = 28; Keyboard y or Y
SCAN_CODE_Z = 29; Keyboard z or Z
SCAN_CODE_1 = 30; Keyboard 1 or !
SCAN_CODE_2 = 31; Keyboard 2 or @
SCAN_CODE_3 = 32; Keyboard 3 or #
SCAN_CODE_4 = 33; Keyboard 4 or $
SCAN_CODE_5 = 34; Keyboard 5 or %
SCAN_CODE_6 = 35; Keyboard 6 or ^
SCAN_CODE_7 = 36; Keyboard 7 or &
SCAN_CODE_8 = 37; Keyboard 8 or *
SCAN_CODE_9 = 38; Keyboard 9 or (
SCAN_CODE_0 = 39; Keyboard 0 or )
SCAN_CODE_ENTER = 40; Keyboard Enter
SCAN_CODE_ESCAPE = 41; Keyboard Escape
SCAN_CODE_BACKSPACE = 42; Keyboard Backspace
SCAN_CODE_TAB = 43; Keyboard Tab
SCAN_CODE_SPACE = 44; Keyboard Spacebar
SCAN_CODE_MINUS = 45; Keyboard - or _
SCAN_CODE_EQUALS = 46; Keyboard = or +
SCAN_CODE_LEFT_SQUARE = 47; Keyboard [ or Left Brace
SCAN_CODE_RIGHT_SQUARE = 48; Keyboard ] or Right Brace
SCAN_CODE_BACKSLASH = 49;
SCAN_CODE_NONUS_NUMBER = 50; Keyboard Non-US # and ~
SCAN_CODE_SEMICOLON = 51; Keyboard ; or :
SCAN_CODE_APOSTROPHE = 52; Keyboard ' or "
SCAN_CODE_GRAVE = 53; Keyboard ` or ~
SCAN_CODE_COMMA = 54; Keyboard , or <
SCAN_CODE_PERIOD = 55; Keyboard . or >
SCAN_CODE_SLASH = 56; Keyboard / or ?
SCAN_CODE_CAPSLOCK = 57; Keyboard Caps Lock
SCAN_CODE_F1 = 58; Keyboard F1
SCAN_CODE_F2 = 59; Keyboard F2
SCAN_CODE_F3 = 60; Keyboard F3
SCAN_CODE_F4 = 61; Keyboard F4
SCAN_CODE_F5 = 62; Keyboard F5
SCAN_CODE_F6 = 63; Keyboard F6
SCAN_CODE_F7 = 64; Keyboard F7
SCAN_CODE_F8 = 65; Keyboard F8
SCAN_CODE_F9 = 66; Keyboard F9
SCAN_CODE_F10 = 67; Keyboard F10
SCAN_CODE_F11 = 68; Keyboard F11
SCAN_CODE_F12 = 69; Keyboard F12
SCAN_CODE_PRINTSCREEN = 70; Keyboard Print Screen
SCAN_CODE_SCROLLLOCK = 71; Keyboard Scroll Lock
SCAN_CODE_PAUSE = 72; Keyboard Pause
SCAN_CODE_INSERT = 73; Keyboard Insert
SCAN_CODE_HOME = 74; Keyboard Home
SCAN_CODE_PAGEUP = 75; Keyboard PageUp
SCAN_CODE_DELETE = 76; Keyboard Delete
SCAN_CODE_END = 77; Keyboard End
SCAN_CODE_PAGEDN = 78; Keyboard PageDn
SCAN_CODE_RIGHT_ARROW = 79; Keyboard Right Arrow
SCAN_CODE_LEFT_ARROW = 80; Keyboard Left Arrow
SCAN_CODE_DOWN_ARROW = 81; Keyboard Down Arrow
SCAN_CODE_UP_ARROW = 82; Keyboard Up Arrow
SCAN_CODE_NUMLOCK = 83; Keyboard Num Lock
SCAN_CODE_KEYPAD_SLASH = 84; Keypad /
SCAN_CODE_KEYPAD_ASTERISK = 85; Keypad *
SCAN_CODE_KEYPAD_MINUS = 86; Keypad -
SCAN_CODE_KEYPAD_PLUS = 87; Keypad +
SCAN_CODE_KEYPAD_ENTER = 88; Keypad Enter
SCAN_CODE_KEYPAD_1 = 89; Keypad 1 and End
SCAN_CODE_KEYPAD_2 = 90; Keypad 2 and Down Arrow
SCAN_CODE_KEYPAD_3 = 91; Keypad 3 and PageDn
SCAN_CODE_KEYPAD_4 = 92; Keypad 4 and Left Arrow
SCAN_CODE_KEYPAD_5 = 93; Keypad 5 and Center
SCAN_CODE_KEYPAD_6 = 94; Keypad 6 and Right Arrow
SCAN_CODE_KEYPAD_7 = 95; Keypad 7 and Home
SCAN_CODE_KEYPAD_8 = 96; Keypad 8 and Up Arrow
SCAN_CODE_KEYPAD_9 = 97; Keypad 9 and PageUp
SCAN_CODE_KEYPAD_0 = 98; Keypad 0 and Insert
SCAN_CODE_KEYPAD_PERIOD = 99; Keypad . and Delete
SCAN_CODE_NONUS_BACKSLASH = 100;
SCAN_CODE_APPLICATION = 101; Keyboard Application
SCAN_CODE_POWER = 102; Keyboard Power
SCAN_CODE_KEYPAD_EQUALS = 103; Keypad =
SCAN_CODE_F13 = 104; Keyboard F13
SCAN_CODE_F14 = 105; Keyboard F14
SCAN_CODE_F15 = 106; Keyboard F15
SCAN_CODE_F16 = 107; Keyboard F16
SCAN_CODE_F17 = 108; Keyboard F17
SCAN_CODE_F18 = 109; Keyboard F18
SCAN_CODE_F19 = 110; Keyboard F19
SCAN_CODE_F20 = 111; Keyboard F20
SCAN_CODE_F2? = 112; Keyboard F21
SCAN_CODE_F22 = 113; Keyboard F22
SCAN_CODE_F23 = 114; Keyboard F23
SCAN_CODE_F24 = 115; Keyboard F24
SCAN_CODE_EXECUTE = 116; Keyboard Execute
SCAN_CODE_HELP = 117; Keyboard Help
SCAN_CODE_MENU = 118; Keyboard Menu
SCAN_CODE_SELECT = 119; Keyboard Select
SCAN_CODE_STOP = 120; Keyboard Stop
SCAN_CODE_AGAIN = 121; Keyboard Again
SCAN_CODE_UNDO = 122; Keyboard Undo
SCAN_CODE_CUT = 123; Keyboard Cut
SCAN_CODE_COPY = 124; Keyboard Copy
SCAN_CODE_PASTE = 125; Keyboard Paste
SCAN_CODE_FIND = 126; Keyboard Find
SCAN_CODE_MUTE = 127; Keyboard Mute
SCAN_CODE_VOLUMEUP = 128; Keyboard Volume Up
SCAN_CODE_VOLUMEDN = 129; Keyboard Volume Down
SCAN_CODE_LOCKING_CAPSLOCK = 130; Keyboard Locking Caps Lock
SCAN_CODE_LOCKING_NUMLOCK = 131; Keyboard Locking Num Lock
SCAN_CODE_LOCKING_SCROLLLOCK = 132; Keyboard Locking Scroll Lock
SCAN_CODE_KEYPAD_COMMA = 133; Keypad Comma
SCAN_CODE_KEYPAD_EQUAL_SIGN = 134; Keypad Equal Sign
SCAN_CODE_INTERNATIONAL? = 135; Keyboard International1
SCAN_CODE_INTERNATIONAL2 = 136; Keyboard International2
SCAN_CODE_INTERNATIONAL3 = 137; Keyboard International3
SCAN_CODE_INTERNATIONAL4 = 138; Keyboard International4
SCAN_CODE_INTERNATIONAL5 = 139; Keyboard International5
SCAN_CODE_INTERNATIONAL6 = 140; Keyboard International6
SCAN_CODE_INTERNATIONAL7 = 141; Keyboard International7
SCAN_CODE_INTERNATIONAL8 = 142; Keyboard International8
SCAN_CODE_INTERNATIONAL9 = 143; Keyboard International9
SCAN_CODE_LANG? = 144; Keyboard LANG1
SCAN_CODE_LANG2 = 145; Keyboard LANG2
SCAN_CODE_LANG3 = 146; Keyboard LANG3
SCAN_CODE_LANG4 = 147; Keyboard LANG4
SCAN_CODE_LANG5 = 148; Keyboard LANG5
SCAN_CODE_LANG6 = 149; Keyboard LANG6
SCAN_CODE_LANG7 = 150; Keyboard LANG7
SCAN_CODE_LANG8 = 151; Keyboard LANG8
SCAN_CODE_LANG9 = 152; Keyboard LANG9
SCAN_CODE_ALT_ERASE = 153; Keyboard Alternate Erase
SCAN_CODE_SYSREQ = 154; Keyboard SysReq/Attention
SCAN_CODE_CANCEL = 155; Keyboard Cancel
SCAN_CODE_CLEAR = 156; Keyboard Clear
SCAN_CODE_PRIOR = 157; Keyboard Prior
SCAN_CODE_RETURN = 158; Keyboard Return
SCAN_CODE_SEPARATOR = 159; Keyboard Separator
SCAN_CODE_OUT = 160; Keyboard Out
SCAN_CODE_OPER = 161; Keyboard Oper
SCAN_CODE_CLEAR_AGAIN = 162; Keyboard Clear/Again
SCAN_CODE_CRSEL_PROPS = 163; Keyboard CrSel/Props
SCAN_CODE_EXSEL = 164; Keyboard ExSel
Codes 165 to 175 Reserved
SCAN_CODE_KEYPAD_00 = 176; Keypad 00
SCAN_CODE_KEYPAD_000 = 177; Keypad 000


Type definitions


None defined

Public variables


None defined

Function declarations


None defined


Return to Unit Reference