akbdmap.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. /* $OpenBSD: akbdmap.h,v 1.10 2014/09/06 10:18:34 mpi Exp $ */
  2. /* $NetBSD: akbdmap.h,v 1.7 2005/05/05 22:29:41 abs Exp $ */
  3. /*-
  4. * Copyright (c) 1997 The NetBSD Foundation, Inc.
  5. * All rights reserved.
  6. *
  7. * This code is derived from software contributed to The NetBSD Foundation
  8. * by Juergen Hannken-Illjes.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in the
  17. * documentation and/or other materials provided with the distribution.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  21. * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  22. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  23. * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  24. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  25. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  27. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  28. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  29. * POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. #ifdef WSDISPLAY_COMPAT_RAWKBD
  32. #include <dev/wscons/wskbdraw.h>
  33. unsigned char keyboard[128] = {
  34. RAWKEY_a,
  35. RAWKEY_s,
  36. RAWKEY_d,
  37. RAWKEY_f,
  38. RAWKEY_h,
  39. RAWKEY_g,
  40. RAWKEY_z,
  41. RAWKEY_x,
  42. RAWKEY_c,
  43. RAWKEY_v,
  44. RAWKEY_less,
  45. RAWKEY_b,
  46. RAWKEY_q,
  47. RAWKEY_w,
  48. RAWKEY_e,
  49. RAWKEY_r,
  50. RAWKEY_y,
  51. RAWKEY_t,
  52. RAWKEY_1,
  53. RAWKEY_2,
  54. RAWKEY_3,
  55. RAWKEY_4,
  56. RAWKEY_6,
  57. RAWKEY_5,
  58. RAWKEY_equal,
  59. RAWKEY_9,
  60. RAWKEY_7,
  61. RAWKEY_minus,
  62. RAWKEY_8,
  63. RAWKEY_0,
  64. RAWKEY_bracketright,
  65. RAWKEY_o,
  66. RAWKEY_u,
  67. RAWKEY_bracketleft,
  68. RAWKEY_i,
  69. RAWKEY_p,
  70. RAWKEY_Return,
  71. RAWKEY_l,
  72. RAWKEY_j,
  73. RAWKEY_apostrophe,
  74. RAWKEY_k,
  75. RAWKEY_semicolon,
  76. RAWKEY_backslash,
  77. RAWKEY_comma,
  78. RAWKEY_slash,
  79. RAWKEY_n,
  80. RAWKEY_m,
  81. RAWKEY_period,
  82. RAWKEY_Tab,
  83. RAWKEY_space,
  84. RAWKEY_grave,
  85. RAWKEY_BackSpace,
  86. RAWKEY_KP_Enter,
  87. RAWKEY_Escape,
  88. RAWKEY_Control_L,
  89. 219, /* Command -> Win */
  90. RAWKEY_Shift_L,
  91. RAWKEY_Caps_Lock,
  92. RAWKEY_Alt_L, /* Option -> Alt */
  93. RAWKEY_Left,
  94. RAWKEY_Right,
  95. RAWKEY_Down,
  96. RAWKEY_Up,
  97. 0, /* Fn */
  98. 0,
  99. RAWKEY_KP_Delete,
  100. 0,
  101. RAWKEY_KP_Multiply,
  102. 0,
  103. RAWKEY_KP_Add,
  104. 0,
  105. RAWKEY_Num_Lock,
  106. 0,
  107. 0,
  108. 0,
  109. RAWKEY_KP_Divide,
  110. RAWKEY_KP_Enter,
  111. 0,
  112. RAWKEY_KP_Subtract,
  113. 0,
  114. 0,
  115. RAWKEY_KP_Equal,
  116. RAWKEY_KP_Insert,
  117. RAWKEY_KP_End,
  118. RAWKEY_KP_Down,
  119. RAWKEY_KP_Next,
  120. RAWKEY_KP_Left,
  121. RAWKEY_KP_Begin,
  122. RAWKEY_KP_Right,
  123. RAWKEY_KP_Home,
  124. 0,
  125. RAWKEY_KP_Up,
  126. RAWKEY_KP_Prior,
  127. 0,
  128. 0,
  129. RAWKEY_KP_Delete,
  130. RAWKEY_f5,
  131. RAWKEY_f6,
  132. RAWKEY_f7,
  133. RAWKEY_f3,
  134. RAWKEY_f8,
  135. RAWKEY_f9,
  136. 0,
  137. RAWKEY_f11,
  138. 0,
  139. RAWKEY_Print_Screen,
  140. RAWKEY_KP_Enter,
  141. RAWKEY_Hold_Screen,
  142. 0,
  143. RAWKEY_f10,
  144. 0,
  145. RAWKEY_f12,
  146. 0,
  147. RAWKEY_Pause,
  148. RAWKEY_Insert,
  149. RAWKEY_Home,
  150. RAWKEY_Prior,
  151. RAWKEY_Delete,
  152. RAWKEY_f4,
  153. RAWKEY_End,
  154. RAWKEY_f2,
  155. RAWKEY_Next,
  156. RAWKEY_f1,
  157. 0,
  158. 0,
  159. 0,
  160. 0,
  161. 0
  162. };
  163. #endif /* WSDISPLAY_COMPAT_RAWKBD */
  164. /* XXX This list is incomplete. */
  165. #define KC(n) KS_KEYCODE(n)
  166. static const keysym_t akbd_keydesc_us[] = {
  167. /* pos command normal shifted */
  168. KC(0), KS_a,
  169. KC(1), KS_s,
  170. KC(2), KS_d,
  171. KC(3), KS_f,
  172. KC(4), KS_h,
  173. KC(5), KS_g,
  174. KC(6), KS_z,
  175. KC(7), KS_x,
  176. KC(8), KS_c,
  177. KC(9), KS_v,
  178. KC(11), KS_b,
  179. KC(12), KS_q,
  180. KC(13), KS_w,
  181. KC(14), KS_e,
  182. KC(15), KS_r,
  183. KC(16), KS_y,
  184. KC(17), KS_t,
  185. KC(18), KS_1, KS_exclam,
  186. KC(19), KS_2, KS_at,
  187. KC(20), KS_3, KS_numbersign,
  188. KC(21), KS_4, KS_dollar,
  189. KC(22), KS_6, KS_asciicircum,
  190. KC(23), KS_5, KS_percent,
  191. KC(24), KS_equal, KS_plus,
  192. KC(25), KS_9, KS_parenleft,
  193. KC(26), KS_7, KS_ampersand,
  194. KC(27), KS_minus, KS_underscore,
  195. KC(28), KS_8, KS_asterisk,
  196. KC(29), KS_0, KS_parenright,
  197. KC(30), KS_bracketright, KS_braceright,
  198. KC(31), KS_o,
  199. KC(32), KS_u,
  200. KC(33), KS_bracketleft, KS_braceleft,
  201. KC(34), KS_i,
  202. KC(35), KS_p,
  203. KC(36), KS_Return,
  204. KC(37), KS_l,
  205. KC(38), KS_j,
  206. KC(39), KS_apostrophe, KS_quotedbl,
  207. KC(40), KS_k,
  208. KC(41), KS_semicolon, KS_colon,
  209. KC(42), KS_backslash, KS_bar,
  210. KC(43), KS_comma, KS_less,
  211. KC(44), KS_slash, KS_question,
  212. KC(45), KS_n,
  213. KC(46), KS_m,
  214. KC(47), KS_period, KS_greater,
  215. KC(48), KS_Tab,
  216. KC(49), KS_space,
  217. KC(50), KS_grave, KS_asciitilde,
  218. KC(51), KS_Cmd_ResetEmul, KS_Delete,
  219. KC(52), KS_KP_Enter,
  220. KC(53), KS_Cmd_Debugger, KS_Escape,
  221. KC(54), KS_Cmd1, KS_Control_L,
  222. KC(55), KS_Cmd2, KS_Alt_L, /* Command */
  223. KC(56), KS_Shift_L,
  224. KC(57), KS_Caps_Lock,
  225. KC(58), KS_Cmd2, KS_Alt_R, /* Option */
  226. KC(59), KS_Left,
  227. KC(60), KS_Right,
  228. KC(61), KS_Down,
  229. KC(62), KS_Up,
  230. KC(65), KS_KP_Decimal,
  231. KC(67), KS_KP_Multiply,
  232. KC(69), KS_KP_Add,
  233. KC(71), KS_Num_Lock, KS_Clear,
  234. KC(75), KS_KP_Divide,
  235. KC(76), KS_KP_Enter,
  236. KC(78), KS_KP_Subtract,
  237. KC(81), KS_KP_Equal,
  238. KC(82), KS_KP_0, KS_KP_Insert,
  239. KC(83), KS_KP_1, KS_KP_End,
  240. KC(84), KS_KP_2, KS_KP_Down,
  241. KC(85), KS_KP_3, KS_KP_Next,
  242. KC(86), KS_KP_4, KS_KP_Left,
  243. KC(87), KS_KP_5, KS_KP_Begin,
  244. KC(88), KS_KP_6, KS_KP_Right,
  245. KC(89), KS_KP_7, KS_KP_Home,
  246. KC(91), KS_KP_8, KS_KP_Up,
  247. KC(92), KS_KP_9, KS_KP_Prior,
  248. KC(95), KS_KP_Decimal, KS_KP_Delete,
  249. KC(96), KS_Cmd_Screen4, KS_f5,
  250. KC(97), KS_Cmd_Screen5, KS_f6,
  251. KC(98), KS_Cmd_Screen6, KS_f7,
  252. KC(99), KS_Cmd_Screen2, KS_f3,
  253. KC(100), KS_Cmd_Screen7, KS_f8,
  254. KC(101), KS_Cmd_Screen8, KS_f9,
  255. KC(103), KS_Cmd_Screen10, KS_f11,
  256. KC(105), KS_f13, KS_Print_Screen,
  257. KC(106), KS_KP_Enter,
  258. KC(107), KS_f14, KS_Hold_Screen,
  259. KC(109), KS_Cmd_Screen9, KS_f10,
  260. KC(111), KS_Cmd_Screen11, KS_f12,
  261. KC(113), KS_f15, KS_Pause,
  262. KC(114), KS_Insert,
  263. KC(115), KS_Home,
  264. KC(116), KS_Cmd_ScrollBack, KS_Prior,
  265. KC(117), KS_Cmd_ResetEmul, KS_Delete,
  266. KC(118), KS_Cmd_Screen3, KS_f4,
  267. KC(119), KS_End,
  268. KC(120), KS_Cmd_Screen1, KS_f2,
  269. KC(121), KS_Cmd_ScrollFwd, KS_Next,
  270. KC(122), KS_Cmd_Screen0, KS_f1,
  271. KC(127), KS_Cmd_Debugger,
  272. };
  273. static const keysym_t akbd_keydesc_fr[] = {
  274. /* pos normal shifted altgr shift-altgr */
  275. KC(0), KS_q,
  276. KC(1), KS_s, KS_S, KS_Ograve,
  277. KC(4), KS_h, KS_H, KS_Igrave, KS_Icircumflex,
  278. KC(6), KS_w, KS_W, KS_less, KS_greater,
  279. KC(8), KS_c, KS_C, KS_copyright, KS_cent,
  280. KC(10), KS_less, KS_greater,
  281. KC(11), KS_b, KS_B, KS_ssharp,
  282. KC(12), KS_a, KS_A, KS_ae, KS_AE,
  283. KC(13), KS_z, KS_Z, KS_Acircumflex, KS_Aring,
  284. KC(14), KS_e, KS_E, KS_ecircumflex, KS_Ecircumflex,
  285. KC(15), KS_r, KS_R, KS_registered, KS_comma,
  286. KC(16), KS_y, KS_Y, KS_Uacute,
  287. KC(18), KS_ampersand, KS_1, KS_voidSymbol, KS_dead_acute,
  288. KC(19), KS_eacute, KS_2, KS_ediaeresis,
  289. KC(20), KS_quotedbl, KS_3,
  290. KC(21), KS_apostrophe, KS_4, KS_braceleft, KS_bracketleft,
  291. KC(22), KS_section, KS_6, KS_paragraph, KS_aring,
  292. KC(23), KS_parenleft, KS_5, KS_braceleft, KS_bracketleft,
  293. KC(24), KS_minus, KS_underscore, KS_braceright,
  294. KC(25), KS_ccedilla, KS_9, KS_Ccedilla, KS_Aacute,
  295. KC(26), KS_egrave, KS_7, KS_guillemotleft,
  296. KS_guillemotright,
  297. KC(27), KS_parenright, KS_degree, KS_braceright, KS_bracketright,
  298. KC(28), KS_exclam, KS_8, KS_exclamdown, KS_Ucircumflex,
  299. KC(29), KS_agrave, KS_0, KS_oslash, KS_Ooblique,
  300. KC(30), KS_dollar, KS_asterisk, KS_cent, KS_yen,
  301. KC(33), KS_dead_circumflex, KS_dead_diaeresis,
  302. KS_ocircumflex, KS_Ocircumflex,
  303. KC(34), KS_i, KS_I, KS_icircumflex, KS_idiaeresis,
  304. KC(37), KS_l, KS_L, KS_notsign, KS_bar,
  305. KC(38), KS_j, KS_J, KS_Idiaeresis, KS_Iacute,
  306. KC(39), KS_ugrave, KS_percent, KS_Ugrave,
  307. KC(40), KS_k, KS_K, KS_Egrave, KS_Ediaeresis,
  308. KC(41), KS_m, KS_M, KS_mu, KS_Oacute,
  309. KC(42), KS_dead_grave, KS_sterling, KS_at, KS_numbersign,
  310. KC(43), KS_semicolon, KS_period,
  311. KC(44), KS_equal, KS_plus, KS_voidSymbol, KS_plusminus,
  312. KC(45), KS_n, KS_N, KS_dead_tilde,
  313. KC(46), KS_comma, KS_question, KS_voidSymbol, KS_questiondown,
  314. KC(47), KS_colon, KS_slash, KS_division, KS_backslash,
  315. KC(50), KS_at, KS_numbersign,
  316. KC(58), KS_Mode_switch, KS_Multi_key, /* Option */
  317. };
  318. static const keysym_t akbd_keydesc_fr_nodead[] = {
  319. KC(18), KS_ampersand, KS_1, KS_voidSymbol, KS_acute,
  320. KC(33), KS_asciicircum, KS_diaeresis, KS_ocircumflex, KS_Ocircumflex,
  321. KC(42), KS_grave, KS_sterling, KS_at, KS_numbersign,
  322. KC(45), KS_n, KS_N, KS_asciitilde,
  323. };
  324. static const keysym_t akbd_keydesc_jp[] = {
  325. /* pos command normal shifted */
  326. KC(19), KS_2, KS_quotedbl,
  327. KC(22), KS_6, KS_ampersand,
  328. KC(24), KS_asciicircum, KS_asciitilde,
  329. KC(25), KS_9, KS_parenright,
  330. KC(26), KS_7, KS_apostrophe,
  331. KC(27), KS_minus, KS_equal,
  332. KC(28), KS_8, KS_parenleft,
  333. KC(29), KS_0,
  334. KC(30), KS_bracketleft, KS_braceleft,
  335. KC(33), KS_at, KS_grave,
  336. KC(39), KS_colon, KS_asterisk,
  337. KC(41), KS_semicolon, KS_plus,
  338. KC(42), KS_bracketright,KS_braceright,
  339. KC(93), KS_backslash, KS_bar,
  340. KC(94), KS_underscore,
  341. };
  342. static const keysym_t akbd_keydesc_uk[] = {
  343. /* pos normal shifted altgr shift-altgr */
  344. KC(20), KS_3, KS_sterling, KS_numbersign,
  345. KC(50), KS_section, KS_plusminus,
  346. KC(58), KS_Mode_switch, KS_Multi_key, /* Option */
  347. };
  348. static const keysym_t akbd_keydesc_sv[] = {
  349. /* pos normal shifted altgr shift-altgr */
  350. KC(10), KS_less, KS_greater, KS_bar,
  351. KC(19), KS_2, KS_quotedbl, KS_at,
  352. KC(21), KS_4, KS_dollar,
  353. KC(22), KS_6, KS_ampersand,
  354. KC(24), KS_dead_acute, KS_dead_grave,
  355. KC(25), KS_9, KS_parenright, KS_bracketright,
  356. KC(26), KS_7, KS_slash, KS_braceleft,
  357. KC(27), KS_plus, KS_question, KS_backslash,
  358. KC(28), KS_8, KS_parenleft, KS_bracketleft,
  359. KC(29), KS_0, KS_equal, KS_braceright,
  360. KC(30), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  361. KC(33), KS_aring,
  362. KC(39), KS_adiaeresis,
  363. KC(41), KS_odiaeresis,
  364. KC(42), KS_apostrophe, KS_asterisk,
  365. KC(43), KS_comma, KS_semicolon,
  366. KC(44), KS_minus, KS_underscore,
  367. KC(47), KS_period, KS_colon,
  368. KC(50), KS_section, KS_degree,
  369. KC(58), KS_Mode_switch, KS_Multi_key, /* Option */
  370. };
  371. static const keysym_t akbd_keydesc_sv_nodead[] = {
  372. /* pos normal shifted altgr shift-altgr */
  373. KC(24), KS_apostrophe, KS_grave,
  374. KC(30), KS_diaeresis, KS_asciicircum, KS_asciitilde,
  375. };
  376. static const keysym_t akbd_keydesc_de[] = {
  377. /* pos normal shifted altgr shift-altgr */
  378. KC(0), KS_a, KS_A, KS_aring, KS_Aring,
  379. KC(1), KS_s, KS_S, KS_voidSymbol, KS_Iacute,
  380. KC(3), KS_f, KS_F, KS_voidSymbol, KS_Idiaeresis,
  381. KC(4), KS_h, KS_H, KS_ordfeminine, KS_Oacute,
  382. KC(5), KS_g, KS_G, KS_copyright, KS_Igrave,
  383. KC(6), KS_y, KS_Y, KS_yen,
  384. KC(7), KS_x, KS_X, KS_voidSymbol, KS_Ugrave,
  385. KC(8), KS_c, KS_C, KS_ccedilla, KS_Ccedilla,
  386. KC(10), KS_less, KS_greater,
  387. KC(12), KS_q, KS_Q, KS_guillemotleft,KS_guillemotright,
  388. KC(15), KS_r, KS_R, KS_registered, KS_cedilla,
  389. KC(16), KS_z, KS_Z,
  390. KC(18), KS_1, KS_exclam, KS_exclamdown, KS_notsign,
  391. KC(19), KS_2, KS_quotedbl,
  392. KC(20), KS_3, KS_section, KS_paragraph, KS_numbersign,
  393. KC(21), KS_4, KS_dollar, KS_cent, KS_sterling,
  394. KC(22), KS_6, KS_ampersand, KS_bracketright,KS_dead_circumflex,
  395. KC(23), KS_5, KS_percent, KS_bracketleft,
  396. KC(24), KS_dead_acute, KS_dead_grave, KS_apostrophe,
  397. KC(25), KS_9, KS_parenright, KS_braceright, KS_periodcentered,
  398. KC(26), KS_7, KS_slash, KS_bar, KS_backslash,
  399. KC(27), KS_ssharp, KS_question, KS_questiondown,
  400. KC(28), KS_8, KS_parenleft, KS_braceleft,
  401. KC(29), KS_0, KS_equal, KS_voidSymbol, KS_macron,
  402. KC(30), KS_plus, KS_asterisk, KS_plusminus,
  403. KC(31), KS_o, KS_O, KS_oslash, KS_Ooblique,
  404. KC(32), KS_u, KS_U, KS_dead_diaeresis,KS_Aacute,
  405. KC(33), KS_udiaeresis, KS_Udiaeresis, KS_voidSymbol, KS_degree,
  406. KC(34), KS_i, KS_I, KS_voidSymbol, KS_Ucircumflex,
  407. KC(37), KS_l, KS_L, KS_at,
  408. KC(38), KS_j, KS_J, KS_masculine,
  409. KC(39), KS_adiaeresis, KS_Adiaeresis, KS_ae, KS_AE,
  410. KC(41), KS_odiaeresis, KS_Odiaeresis,
  411. KC(42), KS_numbersign, KS_apostrophe,
  412. KC(43), KS_comma, KS_semicolon,
  413. KC(44), KS_minus, KS_underscore,
  414. KC(45), KS_n, KS_N, KS_dead_tilde,
  415. KC(46), KS_m, KS_M, KS_mu,
  416. KC(47), KS_period, KS_colon,
  417. KC(50), KS_dead_circumflex,KS_degree,
  418. KC(58), KS_Mode_switch, KS_Multi_key, /* Option */
  419. };
  420. static const keysym_t akbd_keydesc_de_nodead[] = {
  421. /* pos normal shifted altgr shift-altgr */
  422. KC(22), KS_6, KS_ampersand, KS_bracketright,KS_asciicircum,
  423. KC(24), KS_acute, KS_grave, KS_apostrophe,
  424. KC(32), KS_u, KS_U, KS_diaeresis, KS_Aacute,
  425. KC(45), KS_n, KS_N, KS_asciitilde,
  426. KC(50), KS_asciicircum, KS_degree,
  427. };
  428. static const keysym_t akbd_keydesc_sf[] = {
  429. /* pos normal shifted altgr shift-altgr */
  430. KC(6), KS_y,
  431. KC(10), KS_less, KS_greater,
  432. KC(16), KS_z,
  433. KC(18), KS_plus, KS_1,
  434. KC(19), KS_quotedbl, KS_2,
  435. KC(20), KS_asterisk, KS_3,
  436. KC(21), KS_ccedilla, KS_4, KS_Ccedilla,
  437. KC(22), KS_ampersand, KS_6,
  438. KC(23), KS_percent, KS_5,
  439. KC(24), KS_dead_circumflex,KS_grave,
  440. KC(25), KS_parenright, KS_9,
  441. KC(26), KS_slash, KS_7,
  442. KC(27), KS_apostrophe, KS_question,
  443. KC(28), KS_parenleft, KS_8,
  444. KC(29), KS_equal, KS_0,
  445. KC(30), KS_dead_diaeresis,KS_exclam,
  446. KC(33), KS_egrave, KS_udiaeresis,
  447. KC(39), KS_agrave, KS_adiaeresis,
  448. KC(41), KS_eacute, KS_odiaeresis,
  449. KC(42), KS_dollar, KS_sterling,
  450. KC(43), KS_period, KS_colon,
  451. KC(46), KS_comma, KS_semicolon,
  452. KC(47), KS_minus, KS_underscore,
  453. KC(50), KS_paragraph, KS_degree,
  454. };
  455. static const keysym_t akbd_keydesc_es[] = {
  456. /* pos normal shifted altgr shift-altgr */
  457. KC(10), KS_less, KS_greater,
  458. KC(18), KS_1, KS_exclam, KS_bar,
  459. KC(19), KS_2, KS_quotedbl, KS_at,
  460. KC(20), KS_3, KS_periodcentered, KS_numbersign,
  461. KC(21), KS_4, KS_dollar, KS_asciitilde,
  462. KC(22), KS_6, KS_ampersand, KS_notsign,
  463. KC(23), KS_5, KS_percent,
  464. KC(24), KS_exclamdown, KS_questiondown,
  465. KC(25), KS_9, KS_parenright,
  466. KC(26), KS_7, KS_slash,
  467. KC(27), KS_apostrophe, KS_question,
  468. KC(28), KS_8, KS_parenleft,
  469. KC(29), KS_0, KS_equal,
  470. KC(30), KS_plus, KS_asterisk, KS_bracketright,
  471. KC(33), KS_dead_grave, KS_dead_circumflex, KS_bracketleft,
  472. KC(39), KS_dead_acute, KS_dead_diaeresis, KS_braceleft,
  473. KC(41), KS_ntilde,
  474. KC(42), KS_ccedilla, KS_Ccedilla, KS_braceright,
  475. KC(43), KS_comma, KS_semicolon,
  476. KC(44), KS_minus, KS_underscore,
  477. KC(47), KS_period, KS_colon,
  478. KC(50), KS_degree, KS_ordfeminine, KS_backslash,
  479. KC(58), KS_Mode_switch, KS_Multi_key, /* Option */
  480. };
  481. static const keysym_t akbd_keydesc_pt[] = {
  482. /* pos normal shifted altgr shift-altgr */
  483. KC(7), KS_x, KS_X, KS_guillemotleft, KS_guillemotright,
  484. KC(10), KS_less, KS_greater,
  485. KC(19), KS_2, KS_quotedbl, KS_at,
  486. KC(20), KS_3, KS_numbersign, KS_sterling,
  487. KC(22), KS_6, KS_ampersand,
  488. KC(24), KS_plus, KS_asterisk,
  489. KC(25), KS_9, KS_parenright, KS_bracketright, KS_braceright,
  490. KC(26), KS_7, KS_slash,
  491. KC(27), KS_apostrophe, KS_question,
  492. KC(28), KS_8, KS_parenleft, KS_bracketleft, KS_braceleft,
  493. KC(29), KS_0, KS_equal,
  494. KC(30), KS_dead_acute, KS_dead_grave,
  495. KC(33), KS_masculine, KS_ordfeminine,
  496. KC(39), KS_dead_tilde, KS_dead_circumflex,
  497. KC(41), KS_ccedilla, KS_Ccedilla,
  498. KC(43), KS_comma, KS_semicolon,
  499. KC(44), KS_minus, KS_underscore,
  500. KC(47), KS_period, KS_colon,
  501. KC(50), KS_section, KS_plusminus,
  502. KC(58), KS_Mode_switch, KS_Multi_key, /* Option */
  503. };
  504. static const keysym_t akbd_keydesc_us_dvorak[] = {
  505. /* pos command normal shifted */
  506. KC(1), KS_o,
  507. KC(2), KS_e,
  508. KC(3), KS_u,
  509. KC(4), KS_d,
  510. KC(5), KS_i,
  511. KC(6), KS_semicolon, KS_colon,
  512. KC(7), KS_q,
  513. KC(8), KS_j,
  514. KC(9), KS_k,
  515. KC(11), KS_x,
  516. KC(12), KS_apostrophe, KS_quotedbl,
  517. KC(13), KS_comma, KS_less,
  518. KC(14), KS_period, KS_greater,
  519. KC(15), KS_p,
  520. KC(16), KS_f,
  521. KC(17), KS_y,
  522. KC(24), KS_bracketright, KS_braceright,
  523. KC(27), KS_bracketleft, KS_braceleft,
  524. KC(30), KS_equal, KS_plus,
  525. KC(31), KS_r,
  526. KC(32), KS_g,
  527. KC(33), KS_slash, KS_question,
  528. KC(34), KS_c,
  529. KC(35), KS_l,
  530. KC(37), KS_n,
  531. KC(38), KS_h,
  532. KC(39), KS_minus, KS_underscore,
  533. KC(40), KS_t,
  534. KC(41), KS_s,
  535. KC(43), KS_w,
  536. KC(44), KS_z,
  537. KC(45), KS_b,
  538. KC(47), KS_v,
  539. };
  540. static const keysym_t akbd_keydesc_sg[] = {
  541. /* pos normal shifted altgr shift-altgr */
  542. KC(0), KS_a, KS_A, KS_aring, KS_Aring,
  543. KC(1), KS_s, KS_S, KS_ssharp, KS_voidSymbol,
  544. KC(3), KS_f, KS_F, KS_section, KS_voidSymbol,
  545. KC(4), KS_h, KS_H, KS_ordfeminine, KS_periodcentered,
  546. KC(5), KS_g, KS_G, KS_at, KS_comma,
  547. KC(6), KS_y, KS_Y, KS_yen, KS_ydiaeresis,
  548. KC(7), KS_x, KS_X, KS_voidSymbol, KS_ydiaeresis,
  549. KC(8), KS_c, KS_C, KS_copyright,
  550. KC(10), KS_less, KS_greater,
  551. KC(12), KS_q, KS_Q,
  552. KC(15), KS_r, KS_R, KS_registered, KS_Egrave,
  553. KC(16), KS_z, KS_Z, KS_voidSymbol, KS_Aacute,
  554. KC(18), KS_1, KS_plus, KS_plusminus, KS_onesuperior,
  555. KC(19), KS_2, KS_quotedbl, KS_twosuperior,
  556. KC(20), KS_3, KS_asterisk, KS_numbersign, KS_threesuperior,
  557. KC(21), KS_4, KS_ccedilla, KS_Ccedilla,
  558. KC(22), KS_6, KS_ampersand, KS_bracketright,
  559. KC(23), KS_5, KS_percent, KS_bracketleft,
  560. KC(24), KS_dead_circumflex,KS_dead_grave,KS_dead_acute, KS_asciitilde,
  561. KC(25), KS_9, KS_parenright, KS_braceright, KS_Ocircumflex,
  562. KC(26), KS_7, KS_slash, KS_bar, KS_backslash,
  563. KC(27), KS_apostrophe, KS_question, KS_questiondown,
  564. KC(28), KS_8, KS_parenleft, KS_braceleft, KS_Ograve,
  565. KC(29), KS_0, KS_equal, KS_voidSymbol, KS_Uacute,
  566. KC(30), KS_dead_diaeresis,KS_exclam, KS_bracketright,
  567. KC(31), KS_o, KS_O, KS_oslash,
  568. KC(32), KS_u, KS_U, KS_degree, KS_Ugrave,
  569. KC(33), KS_udiaeresis, KS_egrave, KS_bracketleft,
  570. KC(34), KS_i, KS_I, KS_exclamdown,
  571. KC(37), KS_l, KS_L, KS_notsign,
  572. KC(38), KS_j, KS_J, KS_masculine,
  573. KC(39), KS_adiaeresis, KS_agrave, KS_ae, KS_AE,
  574. KC(41), KS_odiaeresis, KS_eacute, KS_cent,
  575. KC(42), KS_dollar, KS_sterling, KS_paragraph,
  576. KC(43), KS_comma, KS_semicolon, KS_guillemotleft,KS_guillemotright,
  577. KC(44), KS_minus, KS_underscore,
  578. KC(45), KS_n, KS_N, KS_dead_tilde,
  579. KC(46), KS_m, KS_M, KS_mu,
  580. KC(47), KS_period, KS_colon, KS_voidSymbol, KS_division,
  581. KC(50), KS_section, KS_degree,
  582. KC(58), KS_Mode_switch, KS_Multi_key, /* Option */
  583. };
  584. static const keysym_t akbd_keydesc_sg_nodead[] = {
  585. /* pos normal shifted altgr shift-altgr */
  586. KC(24), KS_asciicircum, KS_grave, KS_acute, KS_asciitilde,
  587. KC(30), KS_diaeresis, KS_exclam, KS_bracketright,KS_braceright,
  588. KC(45), KS_n, KS_N, KS_asciitilde,
  589. };
  590. #define KBD_MAP(name, base, map) \
  591. { name, base, sizeof(map)/sizeof(keysym_t), map }
  592. const struct wscons_keydesc akbd_keydesctab[] = {
  593. KBD_MAP(KB_US, 0, akbd_keydesc_us),
  594. KBD_MAP(KB_US | KB_DVORAK, KB_US, akbd_keydesc_us_dvorak),
  595. KBD_MAP(KB_DE, KB_US, akbd_keydesc_de),
  596. KBD_MAP(KB_DE | KB_NODEAD, KB_DE, akbd_keydesc_de_nodead),
  597. KBD_MAP(KB_ES, KB_US, akbd_keydesc_es),
  598. KBD_MAP(KB_FR, KB_US, akbd_keydesc_fr),
  599. KBD_MAP(KB_FR | KB_NODEAD, KB_FR, akbd_keydesc_fr_nodead),
  600. KBD_MAP(KB_JP, KB_US, akbd_keydesc_jp),
  601. KBD_MAP(KB_PT, KB_US, akbd_keydesc_pt),
  602. KBD_MAP(KB_SF, KB_US, akbd_keydesc_sf),
  603. KBD_MAP(KB_SG, KB_US, akbd_keydesc_sg),
  604. KBD_MAP(KB_SG | KB_NODEAD, KB_SG, akbd_keydesc_sg_nodead),
  605. KBD_MAP(KB_SV, KB_US, akbd_keydesc_sv),
  606. KBD_MAP(KB_SV | KB_NODEAD, KB_SV, akbd_keydesc_sv_nodead),
  607. KBD_MAP(KB_UK, KB_US, akbd_keydesc_uk),
  608. {0, 0, 0, 0}
  609. };
  610. #undef KBD_MAP
  611. #undef KC