FDOSTUI
FreeDOS Text User Interface
Enumerations | Functions
keyboard.h File Reference

keyboard enumerations and utility routines More...

Go to the source code of this file.

Enumerations

enum  asciicodes {
  ASCII_BS = 0x08, ASCII_TAB = 0x09, ASCII_ENTER = 0x0d, ASCII_ESC = 0x1b,
  ASCII_SPACE = 0x20
}
 ASCII codes.
 
enum  scancodes {
  SCAN_NONE =0x00, SCAN_F1 =0x3b, SCAN_F2 =0x3c, SCAN_F3 =0x3d,
  SCAN_F4 =0x3e, SCAN_F5 =0x3f, SCAN_F6 =0x40, SCAN_F7 =0x41,
  SCAN_F8 =0x42, SCAN_F9 =0x43, SCAN_F10 =0x44, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_SHIFT_F1 =0x54, SCAN_SHIFT_F2 =0x55,
  SCAN_SHIFT_F3 =0x56, SCAN_SHIFT_F4 =0x57, SCAN_SHIFT_F5 =0x58, SCAN_SHIFT_F6 =0x59,
  SCAN_SHIFT_F7 =0x5a, SCAN_SHIFT_F8 =0x5b, SCAN_SHIFT_F9 =0x5c, SCAN_SHIFT_F10 =0x5d,
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_ALT_F1 =0x68, SCAN_ALT_F2 =0x69,
  SCAN_ALT_F3 =0x6a, SCAN_ALT_F4 =0x6b, SCAN_ALT_F5 =0x6c, SCAN_ALT_F6 =0x6d,
  SCAN_ALT_F7 =0x6e, SCAN_ALT_F8 =0x6f, SCAN_ALT_F9 =0x70, SCAN_ALT_F10 =0x71,
  SCAN_CTL_F1 =0x5e, SCAN_CTL_F2 =0x5f, SCAN_CTL_F3 =0x60, SCAN_CTL_F4 =0x61,
  SCAN_CTL_F5 =0x62, SCAN_CTL_F6 =0x63, SCAN_CTL_F7 =0x64, SCAN_CTL_F8 =0x65,
  SCAN_CTL_F9 =0x66, SCAN_CTL_F10 =0x67, SCAN_CTL_HOME =0x77, SCAN_CTL_PGUP =0x84,
  SCAN_CTL_LEFT =0x73, SCAN_CTL_RIGHT =0x74, SCAN_CTL_END =0x75, SCAN_CTL_PGDN =0x76,
  SCAN_NONE =0x00, SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49,
  SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50,
  SCAN_PGDN =0x51, SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf,
  SCAN_ALT_MASK =1000, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A,
  SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E,
  SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82,
  SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12,
  SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16,
  SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e,
  SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22,
  SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26,
  SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f,
  SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00,
  SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b,
  SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51,
  SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ESC_MASK =(1+KEY_MAX),
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79,
  SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D,
  SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81,
  SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11,
  SCAN_ALT_E =0x12, SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15,
  SCAN_ALT_U =0x16, SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19,
  SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21,
  SCAN_ALT_G =0x22, SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25,
  SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e,
  SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32
}
 ASCII Scan Codes.
 
enum  scancodes {
  SCAN_NONE =0x00, SCAN_F1 =0x3b, SCAN_F2 =0x3c, SCAN_F3 =0x3d,
  SCAN_F4 =0x3e, SCAN_F5 =0x3f, SCAN_F6 =0x40, SCAN_F7 =0x41,
  SCAN_F8 =0x42, SCAN_F9 =0x43, SCAN_F10 =0x44, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_SHIFT_F1 =0x54, SCAN_SHIFT_F2 =0x55,
  SCAN_SHIFT_F3 =0x56, SCAN_SHIFT_F4 =0x57, SCAN_SHIFT_F5 =0x58, SCAN_SHIFT_F6 =0x59,
  SCAN_SHIFT_F7 =0x5a, SCAN_SHIFT_F8 =0x5b, SCAN_SHIFT_F9 =0x5c, SCAN_SHIFT_F10 =0x5d,
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_ALT_F1 =0x68, SCAN_ALT_F2 =0x69,
  SCAN_ALT_F3 =0x6a, SCAN_ALT_F4 =0x6b, SCAN_ALT_F5 =0x6c, SCAN_ALT_F6 =0x6d,
  SCAN_ALT_F7 =0x6e, SCAN_ALT_F8 =0x6f, SCAN_ALT_F9 =0x70, SCAN_ALT_F10 =0x71,
  SCAN_CTL_F1 =0x5e, SCAN_CTL_F2 =0x5f, SCAN_CTL_F3 =0x60, SCAN_CTL_F4 =0x61,
  SCAN_CTL_F5 =0x62, SCAN_CTL_F6 =0x63, SCAN_CTL_F7 =0x64, SCAN_CTL_F8 =0x65,
  SCAN_CTL_F9 =0x66, SCAN_CTL_F10 =0x67, SCAN_CTL_HOME =0x77, SCAN_CTL_PGUP =0x84,
  SCAN_CTL_LEFT =0x73, SCAN_CTL_RIGHT =0x74, SCAN_CTL_END =0x75, SCAN_CTL_PGDN =0x76,
  SCAN_NONE =0x00, SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49,
  SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50,
  SCAN_PGDN =0x51, SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf,
  SCAN_ALT_MASK =1000, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A,
  SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E,
  SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82,
  SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12,
  SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16,
  SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e,
  SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22,
  SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26,
  SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f,
  SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00,
  SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b,
  SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51,
  SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ESC_MASK =(1+KEY_MAX),
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79,
  SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D,
  SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81,
  SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11,
  SCAN_ALT_E =0x12, SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15,
  SCAN_ALT_U =0x16, SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19,
  SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21,
  SCAN_ALT_G =0x22, SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25,
  SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e,
  SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32
}
 
enum  scancodes {
  SCAN_NONE =0x00, SCAN_F1 =0x3b, SCAN_F2 =0x3c, SCAN_F3 =0x3d,
  SCAN_F4 =0x3e, SCAN_F5 =0x3f, SCAN_F6 =0x40, SCAN_F7 =0x41,
  SCAN_F8 =0x42, SCAN_F9 =0x43, SCAN_F10 =0x44, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_SHIFT_F1 =0x54, SCAN_SHIFT_F2 =0x55,
  SCAN_SHIFT_F3 =0x56, SCAN_SHIFT_F4 =0x57, SCAN_SHIFT_F5 =0x58, SCAN_SHIFT_F6 =0x59,
  SCAN_SHIFT_F7 =0x5a, SCAN_SHIFT_F8 =0x5b, SCAN_SHIFT_F9 =0x5c, SCAN_SHIFT_F10 =0x5d,
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_ALT_F1 =0x68, SCAN_ALT_F2 =0x69,
  SCAN_ALT_F3 =0x6a, SCAN_ALT_F4 =0x6b, SCAN_ALT_F5 =0x6c, SCAN_ALT_F6 =0x6d,
  SCAN_ALT_F7 =0x6e, SCAN_ALT_F8 =0x6f, SCAN_ALT_F9 =0x70, SCAN_ALT_F10 =0x71,
  SCAN_CTL_F1 =0x5e, SCAN_CTL_F2 =0x5f, SCAN_CTL_F3 =0x60, SCAN_CTL_F4 =0x61,
  SCAN_CTL_F5 =0x62, SCAN_CTL_F6 =0x63, SCAN_CTL_F7 =0x64, SCAN_CTL_F8 =0x65,
  SCAN_CTL_F9 =0x66, SCAN_CTL_F10 =0x67, SCAN_CTL_HOME =0x77, SCAN_CTL_PGUP =0x84,
  SCAN_CTL_LEFT =0x73, SCAN_CTL_RIGHT =0x74, SCAN_CTL_END =0x75, SCAN_CTL_PGDN =0x76,
  SCAN_NONE =0x00, SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49,
  SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50,
  SCAN_PGDN =0x51, SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf,
  SCAN_ALT_MASK =1000, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A,
  SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E,
  SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82,
  SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12,
  SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16,
  SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e,
  SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22,
  SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26,
  SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f,
  SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00,
  SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b,
  SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51,
  SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ESC_MASK =(1+KEY_MAX),
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79,
  SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D,
  SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81,
  SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11,
  SCAN_ALT_E =0x12, SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15,
  SCAN_ALT_U =0x16, SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19,
  SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21,
  SCAN_ALT_G =0x22, SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25,
  SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e,
  SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32
}
 
enum  scancodes {
  SCAN_NONE =0x00, SCAN_F1 =0x3b, SCAN_F2 =0x3c, SCAN_F3 =0x3d,
  SCAN_F4 =0x3e, SCAN_F5 =0x3f, SCAN_F6 =0x40, SCAN_F7 =0x41,
  SCAN_F8 =0x42, SCAN_F9 =0x43, SCAN_F10 =0x44, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_SHIFT_F1 =0x54, SCAN_SHIFT_F2 =0x55,
  SCAN_SHIFT_F3 =0x56, SCAN_SHIFT_F4 =0x57, SCAN_SHIFT_F5 =0x58, SCAN_SHIFT_F6 =0x59,
  SCAN_SHIFT_F7 =0x5a, SCAN_SHIFT_F8 =0x5b, SCAN_SHIFT_F9 =0x5c, SCAN_SHIFT_F10 =0x5d,
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_ALT_F1 =0x68, SCAN_ALT_F2 =0x69,
  SCAN_ALT_F3 =0x6a, SCAN_ALT_F4 =0x6b, SCAN_ALT_F5 =0x6c, SCAN_ALT_F6 =0x6d,
  SCAN_ALT_F7 =0x6e, SCAN_ALT_F8 =0x6f, SCAN_ALT_F9 =0x70, SCAN_ALT_F10 =0x71,
  SCAN_CTL_F1 =0x5e, SCAN_CTL_F2 =0x5f, SCAN_CTL_F3 =0x60, SCAN_CTL_F4 =0x61,
  SCAN_CTL_F5 =0x62, SCAN_CTL_F6 =0x63, SCAN_CTL_F7 =0x64, SCAN_CTL_F8 =0x65,
  SCAN_CTL_F9 =0x66, SCAN_CTL_F10 =0x67, SCAN_CTL_HOME =0x77, SCAN_CTL_PGUP =0x84,
  SCAN_CTL_LEFT =0x73, SCAN_CTL_RIGHT =0x74, SCAN_CTL_END =0x75, SCAN_CTL_PGDN =0x76,
  SCAN_NONE =0x00, SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49,
  SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50,
  SCAN_PGDN =0x51, SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf,
  SCAN_ALT_MASK =1000, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A,
  SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E,
  SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82,
  SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12,
  SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16,
  SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e,
  SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22,
  SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26,
  SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f,
  SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00,
  SCAN_HOME =0x47, SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b,
  SCAN_RIGHT =0x4d, SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51,
  SCAN_INS =0x52, SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ESC_MASK =(1+KEY_MAX),
  SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79, SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B,
  SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D, SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F,
  SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81, SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83,
  SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11, SCAN_ALT_E =0x12, SCAN_ALT_R =0x13,
  SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15, SCAN_ALT_U =0x16, SCAN_ALT_I =0x17,
  SCAN_ALT_O =0x18, SCAN_ALT_P =0x19, SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f,
  SCAN_ALT_D =0x20, SCAN_ALT_F =0x21, SCAN_ALT_G =0x22, SCAN_ALT_H =0x23,
  SCAN_ALT_J =0x24, SCAN_ALT_K =0x25, SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c,
  SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e, SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30,
  SCAN_ALT_N =0x31, SCAN_ALT_M =0x32, SCAN_NONE =0x00, SCAN_HOME =0x47,
  SCAN_UP =0x48, SCAN_PGUP =0x49, SCAN_LEFT =0x4b, SCAN_RIGHT =0x4d,
  SCAN_END =0x4f, SCAN_DOWN =0x50, SCAN_PGDN =0x51, SCAN_INS =0x52,
  SCAN_DEL =0x53, SCAN_SHIFT_TAB =0xf, SCAN_ALT_1 =0x78, SCAN_ALT_2 =0x79,
  SCAN_ALT_3 =0x7A, SCAN_ALT_4 =0x7B, SCAN_ALT_5 =0x7C, SCAN_ALT_6 =0x7D,
  SCAN_ALT_7 =0x7E, SCAN_ALT_8 =0x7F, SCAN_ALT_9 =0x80, SCAN_ALT_0 =0x81,
  SCAN_ALT_MINUS =0x82, SCAN_ALT_PLUS =0x83, SCAN_ALT_Q =0x10, SCAN_ALT_W =0x11,
  SCAN_ALT_E =0x12, SCAN_ALT_R =0x13, SCAN_ALT_T =0x14, SCAN_ALT_Y =0x15,
  SCAN_ALT_U =0x16, SCAN_ALT_I =0x17, SCAN_ALT_O =0x18, SCAN_ALT_P =0x19,
  SCAN_ALT_A =0x1e, SCAN_ALT_S =0x1f, SCAN_ALT_D =0x20, SCAN_ALT_F =0x21,
  SCAN_ALT_G =0x22, SCAN_ALT_H =0x23, SCAN_ALT_J =0x24, SCAN_ALT_K =0x25,
  SCAN_ALT_L =0x26, SCAN_ALT_Z =0x2c, SCAN_ALT_X =0x2d, SCAN_ALT_C =0x2e,
  SCAN_ALT_V =0x2f, SCAN_ALT_B =0x30, SCAN_ALT_N =0x31, SCAN_ALT_M =0x32
}
 

Functions

short int keyboard_query ()
 query if key is ready More...
 
void keyboard_read (unsigned char *const o_scan, unsigned char *const o_ascii)
 read a key from the console More...
 

Detailed Description

keyboard enumerations and utility routines

Function Documentation

◆ keyboard_query()

int keyboard_query ( )

query if key is ready

Returns
0 no key read
!0 key ready

◆ keyboard_read()

void keyboard_read ( unsigned char *const  o_scan,
unsigned char *const  o_ascii 
)

read a key from the console

Parameters
[out]o_scanscan code
[out]o_asciiascii code

The routine blocks until a key is ready. Use keyboard_query to poll if a key is ready.