"Fossies" - the Fresh Open Source Software Archive

Member "dosemu-1.4.0/src/plugin/kbd_unicode/keynum.h" (23 Jun 2003, 3704 Bytes) of package /linux/misc/old/dosemu-1.4.0.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "keynum.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef keynum_h
    2 #define keynum_h
    3 /* 
    4  * key numbers 
    5  * Keynums are unique identifiers of physical keys. (As in X)
    6  *
    7  * The names are taken from the symbols on those keys in the standard
    8  * us keyboard layout.
    9  *
   10  * These are different from keysyms which identify are numbers
   11  * identifying the labels on particular keys.
   12  *
   13  * Most applications should use keysyms, not keynums,
   14  * so the code still works when the keyboard is remapped.
   15  */
   16 #include "keyboard.h"
   17 
   18 /* shift keys */
   19 
   20 #define NUM_L_ALT   0x38
   21 #define NUM_R_ALT   (0x38 | 0x80)
   22 #define NUM_L_CTRL  0x1d
   23 #define NUM_R_CTRL  (0x1d | 0x80)
   24 #define NUM_L_SHIFT 0x2a
   25 #define NUM_R_SHIFT 0x36
   26 #define NUM_NUM     0x45
   27 #define NUM_SCROLL  0x46
   28 #define NUM_CAPS    0x3a
   29 
   30 /* main block */
   31 
   32 #define NUM_SPACE       0x39
   33 #define NUM_BKSP    0x0e
   34 #define NUM_RETURN  0x1c
   35 #define NUM_TAB     0x0f
   36 #define NUM_A       0x1e
   37 #define NUM_B       0x30
   38 #define NUM_C       0x2e
   39 #define NUM_D       0x20
   40 #define NUM_E       0x12
   41 #define NUM_F       0x21
   42 #define NUM_G       0x22
   43 #define NUM_H       0x23
   44 #define NUM_I       0x17
   45 #define NUM_J       0x24
   46 #define NUM_K       0x25
   47 #define NUM_L       0x26
   48 #define NUM_M       0x32
   49 #define NUM_N       0x31
   50 #define NUM_O       0x18
   51 #define NUM_P       0x19
   52 #define NUM_Q       0x10
   53 #define NUM_R       0x13
   54 #define NUM_S       0x1f
   55 #define NUM_T       0x14
   56 #define NUM_U       0x16
   57 #define NUM_V       0x2f
   58 #define NUM_W       0x11
   59 #define NUM_X       0x2d
   60 #define NUM_Y       0x15
   61 #define NUM_Z       0x2c
   62 #define NUM_1       0x02
   63 #define NUM_2       0x03
   64 #define NUM_3       0x04
   65 #define NUM_4       0x05
   66 #define NUM_5       0x06
   67 #define NUM_6       0x07
   68 #define NUM_7       0x08
   69 #define NUM_8       0x09
   70 #define NUM_9       0x0a
   71 #define NUM_0       0x0b
   72 #define NUM_DASH    0x0c
   73 #define NUM_EQUALS  0x0d
   74 #define NUM_LBRACK  0x1a
   75 #define NUM_RBRACK  0x1b
   76 #define NUM_SEMICOLON   0x27
   77 #define NUM_APOSTROPHE  0x28    /* ' */
   78 #define NUM_GRAVE   0x29    /* ` */
   79 #define NUM_BACKSLASH   0x2b
   80 #define NUM_COMMA   0x33
   81 #define NUM_PERIOD  0x34
   82 #define NUM_SLASH   0x35
   83 #define NUM_LESSGREATER 0x56    /* not on US keyboards */
   84 
   85 /* keypad */
   86 
   87 #define NUM_PAD_0   0x52
   88 #define NUM_PAD_1   0x4f
   89 #define NUM_PAD_2   0x50
   90 #define NUM_PAD_3   0x51
   91 #define NUM_PAD_4   0x4b
   92 #define NUM_PAD_5   0x4c
   93 #define NUM_PAD_6   0x4d
   94 #define NUM_PAD_7   0x47
   95 #define NUM_PAD_8   0x48
   96 #define NUM_PAD_9   0x49
   97 #define NUM_PAD_DECIMAL 0x53
   98 #define NUM_PAD_SLASH   (0x35 | 0x80)
   99 #define NUM_PAD_AST 0x37
  100 #define NUM_PAD_MINUS   0x4a
  101 #define NUM_PAD_PLUS    0x4e
  102 #define NUM_PAD_ENTER   (0x1c | 0x80)
  103 
  104 
  105 /* function keys */
  106 
  107 #define NUM_ESC     0x01
  108 #define NUM_F1      0x3b
  109 #define NUM_F2      0x3c
  110 #define NUM_F3      0x3d
  111 #define NUM_F4      0x3e
  112 #define NUM_F5      0x3f
  113 #define NUM_F6      0x40
  114 #define NUM_F7      0x41
  115 #define NUM_F8      0x42
  116 #define NUM_F9      0x43
  117 #define NUM_F10     0x44
  118 #define NUM_F11     0x57
  119 #define NUM_F12     0x58
  120 
  121 /* cursor block */
  122 
  123 #define NUM_INS     (0x52 | 0x80)
  124 #define NUM_DEL     (0x53 | 0x80)
  125 #define NUM_HOME    (0x47 | 0x80)
  126 #define NUM_END     (0x4f | 0x80)
  127 #define NUM_PGUP    (0x49 | 0x80)
  128 #define NUM_PGDN    (0x51 | 0x80)
  129 #define NUM_UP      (0x48 | 0x80)
  130 #define NUM_DOWN    (0x50 | 0x80)
  131 #define NUM_LEFT    (0x4b | 0x80)
  132 #define NUM_RIGHT   (0x4d | 0x80)
  133 
  134 /* New keys on a Microsoft Windows keyboard */
  135 #define NUM_LWIN    (0x5b | 0x80)
  136 #define NUM_RWIN    (0x5c | 0x80)
  137 #define NUM_MENU    (0x5d | 0x80)
  138 
  139 /* Dual scancode keys */
  140 #define NUM_PRTSCR_SYSRQ    0x54
  141 #define NUM_PAUSE_BREAK     (0x46 | 0x80)
  142 
  143 /* Keynum value that is never a key */
  144 #define NUM_VOID         0
  145 
  146 
  147 /* These are logical rather than physical keys:
  148  * The scancodes for the keys exist but the keys really don't
  149  */
  150 /* fake codes start at very end of our range */
  151 #define NUM_FAKE_L_SHIFT    0xff
  152 #define NUM_FAKE_R_SHIFT    0xfe
  153 #define NUM_PRTSCR      0xfd
  154 #define NUM_SYSRQ       0xfc
  155 #define NUM_PAUSE       0xfb
  156 #define NUM_BREAK       0xfa
  157 #define NUM_KEY_NUMS      256 /* actually it's less... */
  158 
  159 extern t_keynum validate_keynum(t_keynum key);
  160 
  161 #endif /* keynum_h */