nvec-keytable.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. /*
  2. * drivers/input/keyboard/tegra-nvec.c
  3. *
  4. * Keyboard class input driver for keyboards connected to an NvEc compliant
  5. * embedded controller
  6. *
  7. * Copyright (c) 2009, NVIDIA Corporation.
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful, but WITHOUT
  15. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  17. * more details.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write to the Free Software Foundation, Inc.,
  21. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  22. */
  23. static unsigned short code_tab_102us[] = {
  24. KEY_GRAVE, // 0x00
  25. KEY_ESC,
  26. KEY_1,
  27. KEY_2,
  28. KEY_3,
  29. KEY_4,
  30. KEY_5,
  31. KEY_6,
  32. KEY_7,
  33. KEY_8,
  34. KEY_9,
  35. KEY_0,
  36. KEY_MINUS,
  37. KEY_EQUAL,
  38. KEY_BACKSPACE,
  39. KEY_TAB,
  40. KEY_Q, // 0x10
  41. KEY_W,
  42. KEY_E,
  43. KEY_R,
  44. KEY_T,
  45. KEY_Y,
  46. KEY_U,
  47. KEY_I,
  48. KEY_O,
  49. KEY_P,
  50. KEY_LEFTBRACE,
  51. KEY_RIGHTBRACE,
  52. KEY_ENTER,
  53. KEY_LEFTCTRL,
  54. KEY_A,
  55. KEY_S,
  56. KEY_D, // 0x20
  57. KEY_F,
  58. KEY_G,
  59. KEY_H,
  60. KEY_J,
  61. KEY_K,
  62. KEY_L,
  63. KEY_SEMICOLON,
  64. KEY_APOSTROPHE,
  65. KEY_GRAVE,
  66. KEY_LEFTSHIFT,
  67. KEY_BACKSLASH,
  68. KEY_Z,
  69. KEY_X,
  70. KEY_C,
  71. KEY_V,
  72. KEY_B, // 0x30
  73. KEY_N,
  74. KEY_M,
  75. KEY_COMMA,
  76. KEY_DOT,
  77. KEY_SLASH,
  78. KEY_RIGHTSHIFT,
  79. KEY_KPASTERISK,
  80. KEY_LEFTALT,
  81. KEY_SPACE,
  82. KEY_CAPSLOCK,
  83. KEY_F1,
  84. KEY_F2,
  85. KEY_F3,
  86. KEY_F4,
  87. KEY_F5,
  88. KEY_F6, // 0x40
  89. KEY_F7,
  90. KEY_F8,
  91. KEY_F9,
  92. KEY_F10,
  93. KEY_FN,
  94. 0, //VK_SCROLL
  95. KEY_KP7,
  96. KEY_KP8,
  97. KEY_KP9,
  98. KEY_KPMINUS,
  99. KEY_KP4,
  100. KEY_KP5,
  101. KEY_KP6,
  102. KEY_KPPLUS,
  103. KEY_KP1,
  104. KEY_KP2, // 0x50
  105. KEY_KP3,
  106. KEY_KP0,
  107. KEY_KPDOT,
  108. KEY_MENU, //VK_SNAPSHOT
  109. KEY_POWER,
  110. KEY_102ND, //VK_OEM_102 henry+ 0x2B (43) BACKSLASH have been used,change to use 0X56 (86)
  111. KEY_F11, //VK_F11
  112. KEY_F12, //VK_F12
  113. 0,
  114. 0,
  115. 0,
  116. 0,
  117. 0,
  118. 0,
  119. 0,
  120. 0, // 60
  121. 0,
  122. 0,
  123. KEY_SEARCH, // add search key map
  124. 0,
  125. 0,
  126. 0,
  127. 0,
  128. 0,
  129. 0,
  130. 0,
  131. 0,
  132. 0,
  133. 0,
  134. 0,
  135. 0,
  136. 0, // 70
  137. 0,
  138. 0,
  139. KEY_KP5, //73 for JP keyboard '\' key, report 0x4c
  140. 0,
  141. 0,
  142. 0,
  143. 0,
  144. 0,
  145. 0,
  146. 0,
  147. 0,
  148. 0,
  149. KEY_KP9, //7d for JP keyboard '|' key, report 0x49
  150. };
  151. static unsigned short extcode_tab_us102[] = {
  152. 0,
  153. 0,
  154. 0,
  155. 0,
  156. 0,
  157. 0,
  158. 0,
  159. 0,
  160. 0,
  161. 0,
  162. 0,
  163. 0,
  164. 0,
  165. 0,
  166. 0,
  167. 0,
  168. 0, // 0xE0 0x10
  169. 0,
  170. 0,
  171. 0,
  172. 0,
  173. 0,
  174. 0,
  175. 0,
  176. 0,
  177. 0, //VK_MEDIA_NEXT_TRACK,
  178. 0,
  179. 0,
  180. 0, //VK_RETURN,
  181. KEY_RIGHTCTRL, //VK_RCONTROL,
  182. 0,
  183. 0,
  184. KEY_MUTE, // 0xE0 0x20
  185. 0, //VK_LAUNCH_APP1
  186. 0, //VK_MEDIA_PLAY_PAUSE
  187. 0,
  188. 0, //VK_MEDIA_STOP
  189. 0,
  190. 0,
  191. 0,
  192. 0,
  193. 0,
  194. 0,
  195. 0,
  196. 0,
  197. 0,
  198. 0,
  199. 0,
  200. KEY_VOLUMEUP, // 0xE0 0x30
  201. 0,
  202. 0, //VK_BROWSER_HOME
  203. 0,
  204. 0,
  205. KEY_KPSLASH, //VK_DIVIDE
  206. 0,
  207. KEY_SYSRQ, //VK_SNAPSHOT
  208. KEY_RIGHTALT, //VK_RMENU
  209. 0, //VK_OEM_NV_BACKLIGHT_UP
  210. 0, //VK_OEM_NV_BACKLIGHT_DN
  211. 0, //VK_OEM_NV_BACKLIGHT_AUTOTOGGLE
  212. 0, //VK_OEM_NV_POWER_INFO
  213. 0, //VK_OEM_NV_WIFI_TOGGLE
  214. 0, //VK_OEM_NV_DISPLAY_SELECT
  215. 0, //VK_OEM_NV_AIRPLANE_TOGGLE
  216. 0, //0xE0 0x40
  217. KEY_LEFT, //VK_OEM_NV_RESERVED henry+ for JP keyboard
  218. 0, //VK_OEM_NV_RESERVED
  219. 0, //VK_OEM_NV_RESERVED
  220. 0, //VK_OEM_NV_RESERVED
  221. 0, //VK_OEM_NV_RESERVED
  222. KEY_CANCEL,
  223. KEY_HOME,
  224. KEY_UP,
  225. KEY_PAGEUP, //VK_PRIOR
  226. 0,
  227. KEY_LEFT,
  228. 0,
  229. KEY_RIGHT,
  230. 0,
  231. KEY_END,
  232. KEY_DOWN, // 0xE0 0x50
  233. KEY_PAGEDOWN, //VK_NEXT
  234. KEY_INSERT,
  235. KEY_DELETE,
  236. 0,
  237. 0,
  238. 0,
  239. 0,
  240. 0,
  241. 0,
  242. 0,
  243. KEY_LEFTMETA, //VK_LWIN
  244. 0, //VK_RWIN
  245. KEY_ESC, //VK_APPS
  246. KEY_KPMINUS, //for power button workaround
  247. 0,
  248. 0,
  249. 0,
  250. 0,
  251. 0,
  252. 0,
  253. 0, //VK_BROWSER_SEARCH
  254. 0, //VK_BROWSER_FAVORITES
  255. 0, //VK_BROWSER_REFRESH
  256. 0, //VK_BROWSER_STOP
  257. 0, //VK_BROWSER_FORWARD
  258. 0, //VK_BROWSER_BACK
  259. 0, //VK_LAUNCH_APP2
  260. 0, //VK_LAUNCH_MAIL
  261. 0, //VK_LAUNCH_MEDIA_SELECT
  262. };
  263. static unsigned short* code_tabs[] = {code_tab_102us, extcode_tab_us102 };