daily pastebin goal
44%
SHARE
TWEET

PS/2 keyboard map for scancode set 2

a guest Sep 27th, 2012 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Copyright (c) 2012 Jordan "Earlz" Earls  <http://lastyearswishes.com>
  2. All rights reserved.
  3.  
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions
  6. are met:
  7.  
  8. 1. Redistributions of source code must retain the above copyright
  9.    notice, this list of conditions and the following disclaimer.
  10. 2. Redistributions in binary form must reproduce the above copyright
  11.    notice, this list of conditions and the following disclaimer in the
  12.    documentation and/or other materials provided with the distribution.
  13. 3. The name of the author may not be used to endorse or promote products
  14.    derived from this software without specific prior written permission.
  15.    
  16. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
  17. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  18. AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
  19. THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  20. EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26.  
  27.  
  28. const char kbdus[0x84] =
  29. {
  30.     0,
  31.     0, //1 F9
  32.     0, //2 ?
  33.     0, //3 f5
  34.     0, //4 f3
  35.     0, //5 F1
  36.     0, //6 F2
  37.     0, //7 F12
  38.     0, //8 ?
  39.     0, //9 F10
  40.     0, //A F8
  41.     0, //B F6
  42.     0, //C F4
  43.     '\t',
  44.     '`',
  45.     0, //F ?
  46.     0, //10 ?
  47.     0, //11 L alt
  48.     0, //L shift
  49.     0, //13 ?
  50.     0, //14 L CTRL
  51.     'q', '1',
  52.     0, 0, 0, //17-19 ?
  53.     'z', 's', 'a', 'w', '2',
  54.     0, 0, //1F-20 ?
  55.     'c', 'x', 'd', 'e', '4', '3',
  56.     0, 0, //27-28 ?
  57.     ' ', 'v', 'f', 't', 'r', '5',
  58.     0, 0, //2F-30 ?
  59.     'n', 'b', 'h', 'g', 'y', '6',
  60.     0, 0, 0, //37-39 ?
  61.     'm','j', 'u', '7', '8',
  62.     0, 0, //3F-40 ?
  63.     ',', 'k', 'i', 'o', '0', '9',
  64.     0, 0, //47-48 ?
  65.     '.', '/', 'l', ';', 'p', '-',
  66.     0, 0, 0, //4f-51 ?
  67.     '\'',
  68.     0, //53 ?
  69.     '[', '=',
  70.     0, 0, //56-57 ?
  71.     0, //58 caplock
  72.     0, //59 R shift
  73.     '\n', //5A enter
  74.     ']',
  75.     0, //5C ?
  76.     '\\',
  77.     0, 0, 0, 0, 0, 0, 0, 0, //5E-65 ?
  78.     '\b', //backspace
  79.     0, 0, //67-68
  80.     0, //69 End 1
  81.     0, //6a ?
  82.     '4', //6b left 4
  83.     0, //6c home 7
  84.     0, 0, 0, //6d-6f ?
  85.     '0', //70 ins 0
  86.     0, //71 del .
  87.     '2', //72 down 2
  88.     '5', //73 5
  89.     '6', //74 right 6
  90.     '8', //75 up 8
  91.     27, //76 esc
  92.     0, //77 numlock
  93.     0, //78 f11
  94.     '+', //79 +
  95.     '3', //7A pagedown 3
  96.     '-', //7B
  97.     '*', //7C
  98.     '9', //7D pageup 9
  99.     '0', //7E scroll lock
  100.     0, 0, 0, 0, //7F-82 ?
  101.     0, //83 F7
  102. };
  103.  
  104.  
  105. const char kbdus_caps[0x84] =
  106. {
  107.     0,
  108.     0, //1 F9
  109.     0, //2 ?
  110.     0, //3 f5
  111.     0, //4 f3
  112.     0, //5 F1
  113.     0, //6 F2
  114.     0, //7 F12
  115.     0, //8 ?
  116.     0, //9 F10
  117.     0, //A F8
  118.     0, //B F6
  119.     0, //C F4
  120.     '\t',
  121.     '~',
  122.     0, //F ?
  123.     0, //10 ?
  124.     0, //11 L alt
  125.     0, //L shift
  126.     0, //13 ?
  127.     0, //14 L CTRL
  128.     'Q', '!',
  129.     0, 0, 0, //17-19 ?
  130.     'Z', 'S', 'A', 'W', '@',
  131.     0, 0, //1F-20 ?
  132.     'C', 'X', 'D', 'E', '#', '$',
  133.     0, 0, //27-28 ?
  134.     ' ', 'V', 'F', 'T', 'R', '%',
  135.     0, 0, //2F-30 ?
  136.     'N', 'B', 'H', 'G', 'Y', '^',
  137.     0, 0, 0, //37-39 ?
  138.     'M','J', 'U', '&', '*',
  139.     0, 0, //3F-40 ?
  140.     '<', 'K', 'I', 'O', ')', '(',
  141.     0, 0, //47-48 ?
  142.     '>', '?', 'L', ':', 'P', '_',
  143.     0, 0, 0, //4f-51 ?
  144.     '\"',
  145.     0, //53 ?
  146.     '{', '+',
  147.     0, 0, //56-57 ?
  148.     0, //58 caplock
  149.     0, //59 R shift
  150.     '\n', //5A enter
  151.     '}',
  152.     0, //5C ?
  153.     '|',
  154.     0, 0, 0, 0, 0, 0, 0, 0, //5E-65 ?
  155.     '\b', //backspace
  156.     0, 0, //67-68
  157.     0, //69 End 1
  158.     0, //6a ?
  159.     '4', //6b left 4
  160.     0, //6c home 7
  161.     0, 0, 0, //6d-6f ?
  162.     '0', //70 ins 0
  163.     0, //71 del .
  164.     '2', //72 down 2
  165.     '5', //73 5
  166.     '6', //74 right 6
  167.     '8', //75 up 8
  168.     27, //76 esc
  169.     0, //77 numlock
  170.     0, //78 f11
  171.     '+', //79 +
  172.     '3', //7A pagedown 3
  173.     '-', //7B
  174.     '*', //7C
  175.     '9', //7D pageup 9
  176.     '0', //7E scroll lock
  177.     0, 0, 0, 0, //7F-82 ?
  178.     0, //83 F7
  179. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top