defkeymap.c 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /* Do not edit this file! It was automatically generated by */
  2. /* loadkeys --mktable defkeymap.map > defkeymap.c */
  3. #include <linux/types.h>
  4. #include <linux/keyboard.h>
  5. #include <linux/kd.h>
  6. #include <linux/kbd_kern.h>
  7. #include <linux/kbd_diacr.h>
  8. u_short plain_map[NR_KEYS] = {
  9. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  10. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  11. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  12. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  13. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  14. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  15. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  16. 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000,
  17. 0xf020, 0xf000, 0xf0e2, 0xf0e4, 0xf0e0, 0xf0e1, 0xf0e3, 0xf0e5,
  18. 0xf0e7, 0xf0f1, 0xf0a2, 0xf02e, 0xf03c, 0xf028, 0xf02b, 0xf07c,
  19. 0xf026, 0xf0e9, 0xf0e2, 0xf0eb, 0xf0e8, 0xf0ed, 0xf0ee, 0xf0ef,
  20. 0xf0ec, 0xf0df, 0xf021, 0xf024, 0xf02a, 0xf029, 0xf03b, 0xf0ac,
  21. 0xf02d, 0xf02f, 0xf0c2, 0xf0c4, 0xf0c0, 0xf0c1, 0xf0c3, 0xf0c5,
  22. 0xf0c7, 0xf0d1, 0xf0a6, 0xf02c, 0xf025, 0xf05f, 0xf03e, 0xf03f,
  23. 0xf0f8, 0xf0c9, 0xf0ca, 0xf0cb, 0xf0c8, 0xf0cd, 0xf0ce, 0xf0cf,
  24. 0xf0cc, 0xf060, 0xf03a, 0xf023, 0xf040, 0xf027, 0xf03d, 0xf022,
  25. };
  26. static u_short shift_map[NR_KEYS] = {
  27. 0xf0d8, 0xf061, 0xf062, 0xf063, 0xf064, 0xf065, 0xf066, 0xf067,
  28. 0xf068, 0xf069, 0xf0ab, 0xf0bb, 0xf0f0, 0xf0fd, 0xf0fe, 0xf0b1,
  29. 0xf0b0, 0xf06a, 0xf06b, 0xf06c, 0xf06d, 0xf06e, 0xf06f, 0xf070,
  30. 0xf071, 0xf072, 0xf000, 0xf000, 0xf0e6, 0xf0b8, 0xf0c6, 0xf0a4,
  31. 0xf0b5, 0xf07e, 0xf073, 0xf074, 0xf075, 0xf076, 0xf077, 0xf078,
  32. 0xf079, 0xf07a, 0xf0a1, 0xf0bf, 0xf0d0, 0xf0dd, 0xf0de, 0xf0ae,
  33. 0xf402, 0xf0a3, 0xf0a5, 0xf0b7, 0xf0a9, 0xf0a7, 0xf0b6, 0xf0bc,
  34. 0xf0bd, 0xf0be, 0xf05b, 0xf05d, 0xf000, 0xf0a8, 0xf0b4, 0xf0d7,
  35. 0xf07b, 0xf041, 0xf042, 0xf043, 0xf044, 0xf045, 0xf046, 0xf047,
  36. 0xf048, 0xf049, 0xf000, 0xf0f4, 0xf0f6, 0xf0f2, 0xf0f3, 0xf0f5,
  37. 0xf07d, 0xf04a, 0xf04b, 0xf04c, 0xf04d, 0xf04e, 0xf04f, 0xf050,
  38. 0xf051, 0xf052, 0xf0b9, 0xf0fb, 0xf0fc, 0xf0f9, 0xf0fa, 0xf0ff,
  39. 0xf05c, 0xf0f7, 0xf053, 0xf054, 0xf055, 0xf056, 0xf057, 0xf058,
  40. 0xf059, 0xf05a, 0xf0b2, 0xf0d4, 0xf0d6, 0xf0d2, 0xf0d3, 0xf0d5,
  41. 0xf030, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, 0xf037,
  42. 0xf038, 0xf039, 0xf0b3, 0xf0db, 0xf0dc, 0xf0d9, 0xf0da, 0xf000,
  43. };
  44. static u_short ctrl_map[NR_KEYS] = {
  45. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  46. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  47. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  48. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  49. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  50. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  51. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  52. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  53. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  54. 0xf200, 0xf200, 0xf11f, 0xf120, 0xf121, 0xf200, 0xf200, 0xf200,
  55. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  56. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  57. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  58. 0xf200, 0xf200, 0xf200, 0xf01a, 0xf003, 0xf212, 0xf004, 0xf200,
  59. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  60. 0xf200, 0xf200, 0xf109, 0xf10a, 0xf206, 0xf00a, 0xf200, 0xf200,
  61. };
  62. static u_short shift_ctrl_map[NR_KEYS] = {
  63. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  64. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  65. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  66. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  67. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  68. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  69. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  70. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  71. 0xf200, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110, 0xf111, 0xf112,
  72. 0xf113, 0xf11e, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  73. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  74. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  75. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  76. 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  77. 0xf200, 0xf100, 0xf101, 0xf211, 0xf103, 0xf104, 0xf105, 0xf20b,
  78. 0xf20a, 0xf108, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
  79. };
  80. ushort *key_maps[MAX_NR_KEYMAPS] = {
  81. plain_map, shift_map, NULL, NULL,
  82. ctrl_map, shift_ctrl_map, NULL,
  83. };
  84. unsigned int keymap_count = 4;
  85. /*
  86. * Philosophy: most people do not define more strings, but they who do
  87. * often want quite a lot of string space. So, we statically allocate
  88. * the default and allocate dynamically in chunks of 512 bytes.
  89. */
  90. char func_buf[] = {
  91. '\033', '[', '[', 'A', 0,
  92. '\033', '[', '[', 'B', 0,
  93. '\033', '[', '[', 'C', 0,
  94. '\033', '[', '[', 'D', 0,
  95. '\033', '[', '[', 'E', 0,
  96. '\033', '[', '1', '7', '~', 0,
  97. '\033', '[', '1', '8', '~', 0,
  98. '\033', '[', '1', '9', '~', 0,
  99. '\033', '[', '2', '0', '~', 0,
  100. '\033', '[', '2', '1', '~', 0,
  101. '\033', '[', '2', '3', '~', 0,
  102. '\033', '[', '2', '4', '~', 0,
  103. '\033', '[', '2', '5', '~', 0,
  104. '\033', '[', '2', '6', '~', 0,
  105. '\033', '[', '2', '8', '~', 0,
  106. '\033', '[', '2', '9', '~', 0,
  107. '\033', '[', '3', '1', '~', 0,
  108. '\033', '[', '3', '2', '~', 0,
  109. '\033', '[', '3', '3', '~', 0,
  110. '\033', '[', '3', '4', '~', 0,
  111. };
  112. char *funcbufptr = func_buf;
  113. int funcbufsize = sizeof(func_buf);
  114. int funcbufleft = 0; /* space left */
  115. char *func_table[MAX_NR_FUNC] = {
  116. func_buf + 0,
  117. func_buf + 5,
  118. func_buf + 10,
  119. func_buf + 15,
  120. func_buf + 20,
  121. func_buf + 25,
  122. func_buf + 31,
  123. func_buf + 37,
  124. func_buf + 43,
  125. func_buf + 49,
  126. func_buf + 55,
  127. func_buf + 61,
  128. func_buf + 67,
  129. func_buf + 73,
  130. func_buf + 79,
  131. func_buf + 85,
  132. func_buf + 91,
  133. func_buf + 97,
  134. func_buf + 103,
  135. func_buf + 109,
  136. NULL,
  137. };
  138. struct kbdiacruc accent_table[MAX_DIACR] = {
  139. {'^', 'c', 0003}, {'^', 'd', 0004},
  140. {'^', 'z', 0032}, {'^', 0012, 0000},
  141. };
  142. unsigned int accent_table_size = 4;