Path: utzoo!attcan!uunet!mcvax!hafro!krafla!rispa2!orn From: orn@rsp.is (Orn E. Hansen) Newsgroups: comp.sys.ibm.pc Subject: Re: Enhanced Keyboard Scan Codes Summary: The Extended scan codes. Message-ID: <108@.rsp.is> Date: 25 Jan 89 08:00:54 GMT References: <67172BP3@PSUVM> <3421@arcturus> Organization: National Hospital of Iceland Lines: 225 Keywords: Ok, here comes data that should supply you with what you need. I send it to you in a format that can be put directly into a header file. After all thats where it came from anyway. At the bottom you'll find a way to find out what kind of keyboard is attached to your system. If you need any further info, feel free to mail. +-----------------------------------+------------------------------------+ | Orn Hansen | | | System analyst | May the source be with you. | +-----------------------------------+------------------------------------+ #define CHR_ALT_ESC 0x01 /* Items 0x02 through 0x0D are unclaimed. */ #define CHR_ALT_BS 0x0E #define CHR_SHIFT_TAB 0x0f #define CHR_ALT_Q 0x10 #define CHR_ALT_W 0x11 #define CHR_ALT_E 0x12 #define CHR_ALT_R 0x13 #define CHR_ALT_T 0x14 #define CHR_ALT_Y 0x15 #define CHR_ALT_U 0x16 #define CHR_ALT_I 0x17 #define CHR_ALT_O 0x18 #define CHR_ALT_P 0x19 #define CHR_ALT_OBRK 0x1A #define CHR_ALT_CBRK 0x1B #define CHR_ALT_ENTER 0x1C /* Item 0x1d is unclaimed. */ #define CHR_ALT_A 0x1e #define CHR_ALT_S 0x1f #define CHR_ALT_D 0x20 #define CHR_ALT_F 0x21 #define CHR_ALT_G 0x22 #define CHR_ALT_H 0x23 #define CHR_ALT_J 0x24 #define CHR_ALT_K 0x25 #define CHR_ALT_L 0x26 #define CHR_ALT_SEMI 0x27 #define CHR_ALT_QUOTE 0x28 #define CHR_ALT_BQUOTE 0x29 /* Item 0x2a is unclaimed. */ #define CHR_ALT_BSLSH 0x2B #define CHR_ALT_Z 0x2c #define CHR_ALT_X 0x2d #define CHR_ALT_C 0x2e #define CHR_ALT_V 0x2f #define CHR_ALT_B 0x30 #define CHR_ALT_N 0x31 #define CHR_ALT_M 0x32 #define CHR_ALT_COMMA 0x33 #define CHR_ALT_PERIOD 0x34 #define CHR_ALT_SLSH 0x35 #define CHR_N_ALT_STAR 0x37 /* Items 0x37 through 0x3a are unclaimed. */ #define CHR_F1 0x3b #define CHR_F2 0x3c #define CHR_F3 0x3d #define CHR_F4 0x3e #define CHR_F5 0x3f #define CHR_F6 0x40 #define CHR_F7 0x41 #define CHR_F8 0x42 #define CHR_F9 0x43 #define CHR_F10 0x44 /* Items 0x45 through 0x46 are unclaimed. */ #define CHR_HOME 0x47 #define CHR_UP 0x48 #define CHR_PGUP 0x49 #define CHR_N_ALT_DASH 0x4A #define CHR_LEFT 0x4b #define CHR_N_5 0x4C #define CHR_RIGHT 0x4d #define CHR_N_ALT_PLUS 0x4E #define CHR_END 0x4f #define CHR_DOWN 0x50 #define CHR_PGDN 0x51 #define CHR_INS 0x52 #define CHR_DEL 0x53 #define CHR_SHIFT_F1 0x54 #define CHR_SHIFT_F2 0x55 #define CHR_SHIFT_F3 0x56 #define CHR_SHIFT_F4 0x57 #define CHR_SHIFT_F5 0x58 #define CHR_SHIFT_F6 0x59 #define CHR_SHIFT_F7 0x5a #define CHR_SHIFT_F8 0x5b #define CHR_SHIFT_F9 0x5c #define CHR_SHIFT_F10 0x5d #define CHR_CONTROL_F1 0x5e #define CHR_CONTROL_F2 0x5f #define CHR_CONTROL_F3 0x60 #define CHR_CONTROL_F4 0x61 #define CHR_CONTROL_F5 0x62 #define CHR_CONTROL_F6 0x63 #define CHR_CONTROL_F7 0x64 #define CHR_CONTROL_F8 0x65 #define CHR_CONTROL_F9 0x66 #define CHR_CONTROL_F10 0x67 #define CHR_ALT_F1 0x68 #define CHR_ALT_F2 0x69 #define CHR_ALT_F3 0x6a #define CHR_ALT_F4 0x6b #define CHR_ALT_F5 0x6c #define CHR_ALT_F6 0x6d #define CHR_ALT_F7 0x6e #define CHR_ALT_F8 0x6f #define CHR_ALT_F9 0x70 #define CHR_ALT_F10 0x71 /* Item 0x72 is unclaimed. */ #define CHR_CONTRL_LEFT 0x73 #define CHR_CONTRL_RIGHT 0x74 #define CHR_CONTRL_END 0x75 #define CHR_CONTRL_PGDN 0x76 #define CHR_CONTRL_HOME 0x77 #define CHR_ALT_1 0x78 #define CHR_ALT_2 0x79 #define CHR_ALT_3 0x7a #define CHR_ALT_4 0x7b #define CHR_ALT_5 0x7c #define CHR_ALT_6 0x7d #define CHR_ALT_7 0x7e #define CHR_ALT_8 0x7f #define CHR_ALT_9 0x80 #define CHR_ALT_0 0x81 #define CHR_ALT_DASH 0x82 #define CHR_ALT_EQU 0x83 #define CHR_CONTRL_PGUP 0x84 #define CHR_F11 0x85 #define CHR_F12 0x86 #define CHR_SHIFT_F11 0x87 #define CHR_SHIFT_F12 0x88 #define CHR_CONTRL_F11 0x89 #define CHR_CONTRL_F12 0x8A #define CHR_ALT_F11 0x8b #define CHR_ALT_F12 0x8c #define CHR_N_CONTRL_UP 0x8d #define CHR_N_CONTRL_DASH 0x8e #define CHR_N_CONTRL_5 0x8f #define CHR_N_CONTRL_PLUS 0x90 #define CHR_N_CONTRL_DOWN 0x91 #define CHR_N_CONTRL_INSERT 0x92 #define CHR_N_CONTRL_DEL 0x93 #define CHR_CONTRL_TAB 0x94 #define CHR_N_CONTRL_SLSH 0x95 #define CHR_N_CONTRL_STAR 0x96 #define CHR_C_ALT_HOME 0x97 #define CHR_C_ALT_UP 0x98 #define CHR_C_ALT_PGUP 0x99 #define CHR_C_ALT_LEFT 0x9b #define CHR_C_ALT_RIGHT 0x9d #define CHR_C_ALT_END 0x9f #define CHR_C_ALT_DOWN 0xa0 #define CHR_C_ALT_PGDN 0xa1 #define CHR_C_ALT_INSERT 0xa2 #define CHR_C_ALT_DEL 0xa3 #define CHR_N_ALT_SLSH 0xa4 #define CHR_ALT_TAB 0xa5 #define CHR_N_ALT_ENTER 0xa6 #define CHR_N_STAR 0xad #define CHR_N_DASH 0xae #define CHR_N_PLUS 0xaf #define CHR_N_ENTER 0xb0 #define CHR_N_CONTRL_ENTER 0xb1 #define CHR_N_SLSH 0xb2 #define CHR_C_HOME 0xb3 #define CHR_C_UP 0xb4 #define CHR_C_PGUP 0xb5 #define CHR_C_LEFT 0xb6 #define CHR_C_RIGHT 0xb7 #define CHR_C_END 0xb8 #define CHR_C_DOWN 0xb9 #define CHR_C_PGDN 0xba #define CHR_C_INSERT 0xbb #define CHR_C_DEL 0xbc #define CHR_C_CONTRL_LEFT 0xbd #define CHR_C_CONTRL_RIGHT 0xbe #define CHR_C_CONTRL_END 0xbf #define CHR_C_CONTRL_PGDN 0xc0 #define CHR_C_CONTRL_HOME 0xc1 #define CHR_C_CONTRL_PGUP 0xc2 #define CHR_C_CONTRL_UP 0xc3 #define CHR_C_CONTRL_DOWN 0xc4 #define CHR_C_CONTRL_INSERT 0xc5 #define CHR_C_CONTRL_DEL 0xc6 #define CHR_LAST_EXT 0xC6 /* Last extended key code */ /* Codes that identify the keyboard type connected */ #define _KBD_102 4 #define _KBD_101 3 #define _KBD_84 2 #define _KBD_83 1 #define KBD_WAIT 1 #define KBD_NOWAIT 0 #define KBD_TYPE() ( _kbd_flags & 0x03 ) #define KBD_E_BIOS() ( _kbd_flags & 0x08 ) extern int _kbd_flags;