home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c070 / 4.ddi / TOOLS.4 / TCTSRC1.EXE / KBSCANOF.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-03-31  |  2.9 KB  |  97 lines

  1. /**
  2. *
  3. * Name        kbscanof -- b_keycod -- Translation table from ASCII
  4. *                    codes to "most common" key
  5. *                    presses.
  6. *
  7. * Description    This table contains the IBM keyboard scan codes for
  8. *        the standard ASCII character set.  If the entry is
  9. *        equal to the constant KBNDEF, the only way to generate
  10. *        the given ASCII code on the keyboard is to enter the
  11. *        ASCII code on the numeric keypad while holding the ALT
  12. *        key down.
  13. *
  14. *        Generally it is expected that this table would be used
  15. *        by programs that needed to generate a keypress
  16. *        sequence from a given ASCII code.
  17. *
  18. *        Example of use:  The scan code for the character 'a',
  19. *        is the value
  20. *
  21. *               b_keycod[(int) 'a'].
  22. *
  23. * Version    6.00 (C)Copyright Blaise Computing Inc.  1987-1989
  24. *
  25. **/
  26.  
  27.  
  28. #include <bkeybrd.h>
  29. #include <bkeys.h>
  30.  
  31.  
  32. unsigned char b_keycod [] = {
  33.     KBNDEF,          KB_S_C_A,
  34.     KB_S_C_B,          KB_S_C_C,
  35.     KB_S_C_D,          KB_S_C_E,
  36.     KB_S_C_F,          KB_S_C_G,
  37.     KB_S_N_BACKSPACE, KB_S_N_TAB,
  38.     KB_S_C_J,          KB_S_C_K,
  39.     KB_S_C_L,          KB_S_N_ENTER,
  40.     KB_S_C_N,          KB_S_C_O,
  41.     KB_S_C_P,          KB_S_C_Q,
  42.     KB_S_C_R,          KB_S_C_S,
  43.     KB_S_C_T,          KB_S_C_U,
  44.     KB_S_C_V,          KB_S_C_W,
  45.     KB_S_C_X,          KB_S_C_Y,
  46.     KB_S_C_Z,          KB_S_N_ESC,
  47.     KB_S_C_BACKSLASH, KBNDEF,
  48.     KBNDEF,          KB_S_C_MINUS,
  49.     KB_S_N_SPACE,     KB_S_S_1,
  50.     KB_S_S_QUOTE,     KB_S_S_3,
  51.     KB_S_S_4,          KB_S_S_5,
  52.     KB_S_S_7,          KB_S_N_QUOTE,
  53.     KB_S_S_9,          KB_S_S_0,
  54.     KB_S_S_8,          KB_S_S_EQUALS,
  55.     KB_S_N_COMMA,     KB_S_N_MINUS,
  56.     KB_S_N_PERIOD,    KB_S_N_SLASH,
  57.     KB_S_N_0,          KB_S_N_1,
  58.     KB_S_N_2,          KB_S_N_3,
  59.     KB_S_N_4,          KB_S_N_5,
  60.     KB_S_N_6,          KB_S_N_7,
  61.     KB_S_N_8,          KB_S_N_9,
  62.     KB_S_S_SEMI,      KB_S_N_SEMI,
  63.     KB_S_S_COMMA,     KB_S_N_EQUALS,
  64.     KB_S_S_PERIOD,    KB_S_S_SLASH,
  65.     KB_S_S_2,          KB_S_S_A,
  66.     KB_S_S_B,          KB_S_S_C,
  67.     KB_S_S_D,          KB_S_S_E,
  68.     KB_S_S_F,          KB_S_S_G,
  69.     KB_S_S_H,          KB_S_S_I,
  70.     KB_S_S_J,          KB_S_S_K,
  71.     KB_S_S_L,          KB_S_S_M,
  72.     KB_S_S_N,          KB_S_S_O,
  73.     KB_S_S_P,          KB_S_S_Q,
  74.     KB_S_S_R,          KB_S_S_S,
  75.     KB_S_S_T,          KB_S_S_U,
  76.     KB_S_S_V,          KB_S_S_W,
  77.     KB_S_S_X,          KB_S_S_Y,
  78.     KB_S_S_Z,          KB_S_N_LBRACKET,
  79.     KB_S_N_BACKSLASH, KB_S_N_RBRACKET,
  80.     KB_S_S_6,          KBNDEF,
  81.     KB_S_N_BACKQUOTE, KB_S_N_A,
  82.     KB_S_N_B,          KB_S_N_C,
  83.     KB_S_N_D,          KB_S_N_E,
  84.     KB_S_N_F,          KB_S_N_G,
  85.     KB_S_N_H,          KB_S_N_I,
  86.     KB_S_N_J,          KB_S_N_K,
  87.     KB_S_N_L,          KB_S_N_M,
  88.     KB_S_N_N,          KB_S_N_O,
  89.     KB_S_N_P,          KB_S_N_Q,
  90.     KB_S_N_R,          KB_S_N_S,
  91.     KB_S_N_T,          KB_S_N_U,
  92.     KB_S_N_V,          KB_S_N_W,
  93.     KB_S_N_X,          KB_S_N_Y,
  94.     KB_S_N_Z,          KB_S_S_LBRACKET,
  95.     KB_S_S_BACKSLASH, KB_S_S_RBRACKET,
  96.     KB_S_S_BACKQUOTE, KB_S_C_BACKSPACE};
  97.