home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / keyboard / enh_kbd.inf < prev    next >
Internet Message Format  |  1994-03-07  |  3KB

  1. Date: Wednesday, 18 January 1989  13:31-MST
  2. From: Rich Kennerly <LVL@CORNELLA.CIT.CORNELL.EDU>
  3. Newsgroups: comp.sys.ibm.pc
  4. Re:   Enhanced keyboards
  5.  
  6.    Here is a list of the extra keys on an enhanced keyboard:
  7.  
  8. Enhanced Keyboard key:                  BIOS value:
  9.                                         base    shift   cntrl   alt
  10. F11                                     8500    8700    8900    8b00
  11. F12                                     8600    8800    8A00    8C00
  12. kp-Enter                                E00D    E00D    E00D    A600
  13. KP-/                                    E02F    E02F    9500    A400
  14. KP-*                                    372A    372A    9600    3700
  15.  
  16. HOME                                    47E0    47E0    77E0    9700
  17. UP ARROW                                48E0    48E0    8DE0    9800
  18. PAGE UP                                 49E0    49E0    84E0    9900
  19. LEFT ARROW                              4BE0    4BE0    73E0    9B00
  20. RIGHT ARROW                             4DE0    4DE0    74E0    9D00
  21. END                                     4FE0    4FE0    75E0    9F00
  22. DOWN ARROW                              50E0    50E0    91E0    A000
  23. PAGE DOWN                               51E0    51E0    76E0    A100
  24. INSERT                                  52E0    52E0    92E0    A200
  25. DELETE                                  53E0    53E0    93E0    A300
  26.  
  27. Note that you cannot get these values with the old BIOS interrupt,
  28. it will remove the E0's to be compatible with the old keyboard.  See
  29. the following code fragments that use the old and new BIOS calls.
  30.  
  31.  
  32. getkey_     PROC   NEAR         ; get key code for standard keyboard
  33.             mov    ah,01H
  34.             int    16h
  35.             jnz    GOTAKEY
  36.             mov    ax,00H
  37.             ret
  38. GOTAKEY:
  39.             mov    ah,00H
  40.             int    16h
  41.             ret
  42. getkey_     ENDP
  43.  
  44. getxkey_    PROC   NEAR         ; get key code for enhanced keyboard
  45.             mov    ah,11H
  46.             int    16h
  47.             jnz    GOTXKEY
  48.             mov    ax,0
  49.             ret
  50. GOTXKEY:
  51.             mov    ah,10H
  52.             int    16h
  53.             ret
  54. getxkey_    ENDP
  55.  
  56. I have found that an AT with old keyboard and old BIOS (you need the
  57. new BIOS to fully appreciate the enhanced keyboard) will get very
  58. upset if you try to use the new BIOS function calls with it.  Here
  59. is a routine that will look into the BIOS data area to see if BIOS
  60. found an enhanced keyboard at INIT time.  Note that this approach is
  61. not ideal since IBM and others can change the layout of BIOS at
  62. will; fortunately they never seem to.  In any case there is no
  63. interrupt call that will tell you this (if there is let me know
  64. please).
  65.  
  66. ; gkybdtype returns 0 for standard 84 key kybd, 10H for enhanced keyboard
  67.  
  68.         KB_FLAG_3       equ 096H        ; address of keyboard flag byte
  69.         KBX             equ 00010000B   ; enhanced keyboard flag bit
  70.  
  71. gkybdtype_      proc near
  72.         push    es
  73.         mov     ax,40H
  74.         mov     es, ax
  75.         mov     ax,es:[KB_FLAG_3]
  76.         and     ax,KBX
  77.         pop     es
  78.         ret
  79. gkybdtype_      endp
  80.  
  81.  
  82. RICH KENNERLY - LVL@CORNELLA.CIT.CORNELL.EDU
  83. CIT - Network Development
  84. 125 Caldwell Hall
  85. 607-255-7342
  86.