sunkbdmap.c 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177
  1. /* $OpenBSD: sunkbdmap.c,v 1.6 2014/01/26 17:48:08 miod Exp $ */
  2. /*
  3. * Copyright (c) 2002, 2003 Miodrag Vallat.
  4. * Copyright (c) 2002 Jason L. Wright (jason@thought.net)
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  17. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
  20. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  22. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  23. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  24. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  25. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  26. * POSSIBILITY OF SUCH DAMAGE.
  27. *
  28. * Effort sponsored in part by the Defense Advanced Research Projects
  29. * Agency (DARPA) and Air Force Research Laboratory, Air Force
  30. * Materiel Command, USAF, under agreement number F30602-01-2-0537.
  31. *
  32. */
  33. #include <sys/param.h>
  34. #include <sys/systm.h>
  35. #include <sys/device.h>
  36. #include <sys/kernel.h>
  37. #include <sys/timeout.h>
  38. #include <dev/wscons/wsconsio.h>
  39. #include <dev/wscons/wskbdvar.h>
  40. #include <dev/wscons/wsksymdef.h>
  41. #include <dev/wscons/wsksymvar.h>
  42. #include <dev/sun/sunkbdreg.h>
  43. #include <dev/sun/sunkbdvar.h>
  44. #ifdef WSDISPLAY_COMPAT_RAWKBD
  45. #include <dev/wscons/wskbdraw.h>
  46. /*
  47. * Translate Sun keycodes to US keyboard XT scancodes, for proper
  48. * X11-over-wsmux operation.
  49. */
  50. const u_int8_t sunkbd_rawmap[0x80] = {
  51. RAWKEY_Null,
  52. RAWKEY_L1,
  53. RAWKEY_AudioLower,
  54. RAWKEY_L2,
  55. RAWKEY_AudioRaise,
  56. RAWKEY_f1,
  57. RAWKEY_f2,
  58. RAWKEY_f10,
  59. RAWKEY_f3,
  60. RAWKEY_f11,
  61. RAWKEY_f4,
  62. RAWKEY_f12,
  63. RAWKEY_f5,
  64. RAWKEY_Alt_R,
  65. RAWKEY_f6,
  66. RAWKEY_Null,
  67. RAWKEY_f7,
  68. RAWKEY_f8,
  69. RAWKEY_f9,
  70. RAWKEY_Alt_L,
  71. RAWKEY_Up,
  72. RAWKEY_Pause,
  73. RAWKEY_Print_Screen,
  74. RAWKEY_Hold_Screen,
  75. RAWKEY_Left,
  76. RAWKEY_L3,
  77. RAWKEY_L4,
  78. RAWKEY_Down,
  79. RAWKEY_Right,
  80. RAWKEY_Escape,
  81. RAWKEY_1,
  82. RAWKEY_2,
  83. RAWKEY_3,
  84. RAWKEY_4,
  85. RAWKEY_5,
  86. RAWKEY_6,
  87. RAWKEY_7,
  88. RAWKEY_8,
  89. RAWKEY_9,
  90. RAWKEY_0,
  91. RAWKEY_minus,
  92. RAWKEY_equal,
  93. RAWKEY_grave,
  94. RAWKEY_BackSpace,
  95. RAWKEY_Insert,
  96. RAWKEY_KP_Equal, /* type 4 only */
  97. RAWKEY_KP_Divide,
  98. RAWKEY_KP_Multiply,
  99. RAWKEY_Null,
  100. RAWKEY_L5,
  101. RAWKEY_KP_Delete,
  102. RAWKEY_L6,
  103. RAWKEY_Home,
  104. RAWKEY_Tab,
  105. RAWKEY_q,
  106. RAWKEY_w,
  107. RAWKEY_e,
  108. RAWKEY_r,
  109. RAWKEY_t,
  110. RAWKEY_y,
  111. RAWKEY_u,
  112. RAWKEY_i,
  113. RAWKEY_o,
  114. RAWKEY_p,
  115. RAWKEY_bracketleft,
  116. RAWKEY_bracketright,
  117. RAWKEY_Delete,
  118. RAWKEY_Compose,
  119. RAWKEY_KP_Home,
  120. RAWKEY_KP_Up,
  121. RAWKEY_KP_Prior,
  122. RAWKEY_KP_Subtract,
  123. RAWKEY_L7,
  124. RAWKEY_L8,
  125. RAWKEY_End,
  126. RAWKEY_Null,
  127. RAWKEY_Control_L,
  128. RAWKEY_a,
  129. RAWKEY_s,
  130. RAWKEY_d,
  131. RAWKEY_f,
  132. RAWKEY_g,
  133. RAWKEY_h,
  134. RAWKEY_j,
  135. RAWKEY_k,
  136. RAWKEY_l,
  137. RAWKEY_semicolon,
  138. RAWKEY_apostrophe,
  139. RAWKEY_backslash,
  140. RAWKEY_Return,
  141. RAWKEY_KP_Enter,
  142. RAWKEY_KP_Left,
  143. RAWKEY_KP_Begin,
  144. RAWKEY_KP_Right,
  145. RAWKEY_KP_Insert,
  146. RAWKEY_L9,
  147. RAWKEY_Prior,
  148. RAWKEY_L10,
  149. RAWKEY_Num_Lock,
  150. RAWKEY_Shift_L,
  151. RAWKEY_z,
  152. RAWKEY_x,
  153. RAWKEY_c,
  154. RAWKEY_v,
  155. RAWKEY_b,
  156. RAWKEY_n,
  157. RAWKEY_m,
  158. RAWKEY_comma,
  159. RAWKEY_period,
  160. RAWKEY_slash,
  161. RAWKEY_Shift_R,
  162. RAWKEY_Null, /* KS_Linefeed on type 3/4 */
  163. RAWKEY_KP_End,
  164. RAWKEY_KP_Down,
  165. RAWKEY_KP_Next,
  166. RAWKEY_Null,
  167. RAWKEY_Null,
  168. RAWKEY_Null,
  169. RAWKEY_Help,
  170. RAWKEY_Caps_Lock,
  171. RAWKEY_Meta_L,
  172. RAWKEY_space,
  173. RAWKEY_Meta_R,
  174. RAWKEY_Next,
  175. RAWKEY_Null,
  176. RAWKEY_KP_Add,
  177. RAWKEY_Null,
  178. RAWKEY_AudioMute /* type 5 remapped 0x2d */
  179. };
  180. #endif
  181. #define KC(n) KS_KEYCODE(n)
  182. /* 000/021/022 US English type 4/5 keyboard */
  183. const keysym_t sunkbd_keydesc_us[] = {
  184. KC(0x01), KS_Cmd,
  185. KC(0x02), KS_Cmd_BrightnessDown,
  186. KC(0x03), KS_Again,
  187. KC(0x04), KS_Cmd_BrightnessUp,
  188. KC(0x05), KS_f1,
  189. KC(0x06), KS_f2,
  190. KC(0x07), KS_f10,
  191. KC(0x08), KS_f3,
  192. KC(0x09), KS_f11,
  193. KC(0x0a), KS_f4,
  194. KC(0x0b), KS_f12,
  195. KC(0x0c), KS_f5,
  196. KC(0x0d), KS_Alt_R,
  197. KC(0x0e), KS_f6,
  198. KC(0x10), KS_f7,
  199. KC(0x11), KS_f8,
  200. KC(0x12), KS_f9,
  201. KC(0x13), KS_Alt_L,
  202. KC(0x14), KS_Up,
  203. KC(0x15), KS_Pause,
  204. KC(0x16), KS_Print_Screen,
  205. KC(0x17), KS_Hold_Screen,
  206. KC(0x18), KS_Left,
  207. KC(0x19), KS_Props,
  208. KC(0x1a), KS_Undo,
  209. KC(0x1b), KS_Down,
  210. KC(0x1c), KS_Right,
  211. KC(0x1d), KS_Escape,
  212. KC(0x1e), KS_1, KS_exclam,
  213. KC(0x1f), KS_2, KS_at,
  214. KC(0x20), KS_3, KS_numbersign,
  215. KC(0x21), KS_4, KS_dollar,
  216. KC(0x22), KS_5, KS_percent,
  217. KC(0x23), KS_6, KS_asciicircum,
  218. KC(0x24), KS_7, KS_ampersand,
  219. KC(0x25), KS_8, KS_asterisk,
  220. KC(0x26), KS_9, KS_parenleft,
  221. KC(0x27), KS_0, KS_parenright,
  222. KC(0x28), KS_minus, KS_underscore,
  223. KC(0x29), KS_equal, KS_plus,
  224. KC(0x2a), KS_grave, KS_asciitilde,
  225. KC(0x2b), KS_Delete,
  226. KC(0x2c), KS_Insert,
  227. KC(0x2d), KS_KP_Equal, /* type 4 */
  228. KC(0x2e), KS_KP_Divide,
  229. KC(0x2f), KS_KP_Multiply,
  230. KC(0x31), KS_Front,
  231. KC(0x32), KS_KP_Delete, KS_KP_Decimal,
  232. KC(0x33), KS_Copy,
  233. KC(0x34), KS_Home,
  234. KC(0x35), KS_Tab,
  235. KC(0x36), KS_q,
  236. KC(0x37), KS_w,
  237. KC(0x38), KS_e,
  238. KC(0x39), KS_r,
  239. KC(0x3a), KS_t,
  240. KC(0x3b), KS_y,
  241. KC(0x3c), KS_u,
  242. KC(0x3d), KS_i,
  243. KC(0x3e), KS_o,
  244. KC(0x3f), KS_p,
  245. KC(0x40), KS_bracketleft, KS_braceleft,
  246. KC(0x41), KS_bracketright,KS_braceright,
  247. KC(0x42), KS_Delete,
  248. KC(0x43), KS_Multi_key,
  249. KC(0x44), KS_KP_Home, KS_KP_7,
  250. KC(0x45), KS_KP_Up, KS_KP_8,
  251. KC(0x46), KS_KP_Prior, KS_KP_9,
  252. KC(0x47), KS_KP_Subtract,
  253. KC(0x48), KS_Open,
  254. KC(0x49), KS_Paste,
  255. KC(0x4a), KS_End,
  256. KC(0x4c), KS_Control_L,
  257. KC(0x4d), KS_Cmd_Debugger, KS_a,
  258. KC(0x4e), KS_s,
  259. KC(0x4f), KS_d,
  260. KC(0x50), KS_f,
  261. KC(0x51), KS_g,
  262. KC(0x52), KS_h,
  263. KC(0x53), KS_j,
  264. KC(0x54), KS_k,
  265. KC(0x55), KS_l,
  266. KC(0x56), KS_semicolon, KS_colon,
  267. KC(0x57), KS_apostrophe, KS_quotedbl,
  268. KC(0x58), KS_backslash, KS_bar,
  269. KC(0x59), KS_Return,
  270. KC(0x5a), KS_KP_Enter,
  271. KC(0x5b), KS_KP_Left, KS_KP_4,
  272. KC(0x5c), KS_KP_Begin, KS_KP_5,
  273. KC(0x5d), KS_KP_Right, KS_KP_6,
  274. KC(0x5e), KS_KP_Insert, KS_KP_0,
  275. KC(0x5f), KS_Find,
  276. KC(0x60), KS_Prior,
  277. KC(0x61), KS_Cut,
  278. KC(0x62), KS_Num_Lock,
  279. KC(0x63), KS_Shift_L,
  280. KC(0x64), KS_z,
  281. KC(0x65), KS_x,
  282. KC(0x66), KS_c,
  283. KC(0x67), KS_v,
  284. KC(0x68), KS_b,
  285. KC(0x69), KS_n,
  286. KC(0x6a), KS_m,
  287. KC(0x6b), KS_comma, KS_less,
  288. KC(0x6c), KS_period, KS_greater,
  289. KC(0x6d), KS_slash, KS_question,
  290. KC(0x6e), KS_Shift_R,
  291. KC(0x6f), KS_Linefeed,
  292. KC(0x70), KS_KP_End, KS_KP_1,
  293. KC(0x71), KS_KP_Down, KS_KP_2,
  294. KC(0x72), KS_KP_Next, KS_KP_3,
  295. KC(0x76), KS_Help,
  296. KC(0x77), KS_Caps_Lock,
  297. KC(0x78), KS_Meta_L,
  298. KC(0x79), KS_space,
  299. KC(0x7a), KS_Meta_R,
  300. KC(0x7b), KS_Next,
  301. KC(0x7d), KS_KP_Add,
  302. KC(0x7f), KS_AudioMute, /* type 5 KC(0x2d) */
  303. };
  304. /* 002 French/Belgian type 4 keyboard */
  305. const keysym_t sunkbd_keydesc_befr[] = {
  306. KC(0x0d), KS_Caps_Lock,
  307. KC(0x0f), KS_bracketright,KS_braceright, KS_guillemotright,
  308. KC(0x1e), KS_ampersand, KS_1,
  309. KC(0x1f), KS_eacute, KS_2, KS_twosuperior,
  310. KC(0x20), KS_quotedbl, KS_3, KS_threesuperior,
  311. KC(0x21), KS_apostrophe, KS_4,
  312. KC(0x22), KS_parenleft, KS_5,
  313. KC(0x23), KS_section, KS_6,
  314. KC(0x24), KS_egrave, KS_7,
  315. KC(0x25), KS_exclam, KS_8, KS_sterling,
  316. KC(0x26), KS_ccedilla, KS_9, KS_backslash,
  317. KC(0x27), KS_agrave, KS_0,
  318. KC(0x28), KS_parenright, KS_degree, KS_asciitilde,
  319. KC(0x29), KS_minus, KS_underscore, KS_numbersign,
  320. KC(0x2a), KS_asterisk, KS_bar, KS_currency,
  321. KC(0x36), KS_a,
  322. KC(0x37), KS_z,
  323. KC(0x40), KS_dead_circumflex,KS_dead_diaeresis,
  324. KC(0x41), KS_grave, KS_dollar, KS_at,
  325. KC(0x4d), KS_Cmd_Debugger, KS_q,
  326. KC(0x56), KS_m, KS_M, KS_mu,
  327. KC(0x57), KS_ugrave, KS_percent,
  328. KC(0x58), KS_bracketleft, KS_braceleft, KS_guillemotleft,
  329. KC(0x64), KS_w,
  330. KC(0x6a), KS_comma, KS_question,
  331. KC(0x6b), KS_semicolon, KS_period,
  332. KC(0x6c), KS_colon, KS_slash,
  333. KC(0x6d), KS_equal, KS_plus,
  334. KC(0x77), KS_Mode_switch,
  335. KC(0x7c), KS_less, KS_greater,
  336. };
  337. /* 023 French type 5 keyboard */
  338. const keysym_t sunkbd5_keydesc_fr[] = {
  339. KC(0x0d), KS_Mode_switch,
  340. KC(0x1e), KS_ampersand, KS_1,
  341. KC(0x1f), KS_eacute, KS_2, KS_asciitilde,
  342. KC(0x20), KS_quotedbl, KS_3, KS_numbersign,
  343. KC(0x21), KS_apostrophe, KS_4, KS_braceleft,
  344. KC(0x22), KS_parenleft, KS_5, KS_bracketleft,
  345. KC(0x23), KS_minus, KS_6, KS_bar,
  346. KC(0x24), KS_egrave, KS_7, KS_grave,
  347. KC(0x25), KS_underscore, KS_8, KS_backslash,
  348. KC(0x26), KS_ccedilla, KS_9, KS_asciicircum,
  349. KC(0x27), KS_agrave, KS_0, KS_at,
  350. KC(0x28), KS_parenright, KS_degree, KS_bracketright,
  351. KC(0x29), KS_equal, KS_plus, KS_braceright,
  352. KC(0x2a), KS_twosuperior,
  353. KC(0x36), KS_a,
  354. KC(0x37), KS_z,
  355. KC(0x40), KS_dead_circumflex,KS_dead_diaeresis,
  356. KC(0x41), KS_dollar, KS_sterling, KS_currency,
  357. KC(0x4d), KS_Cmd_Debugger, KS_q,
  358. KC(0x56), KS_m,
  359. KC(0x57), KS_ugrave, KS_percent,
  360. KC(0x58), KS_asterisk, KS_mu,
  361. KC(0x64), KS_w,
  362. KC(0x6a), KS_comma, KS_question,
  363. KC(0x6b), KS_semicolon, KS_period,
  364. KC(0x6c), KS_colon, KS_slash,
  365. KC(0x6d), KS_exclam, KS_section,
  366. KC(0x7c), KS_less, KS_greater,
  367. };
  368. /* 004 Danish type 4 keyboard */
  369. const keysym_t sunkbd_keydesc_dk[] = {
  370. KC(0x0d), KS_Multi_key,
  371. KC(0x0f), KS_asciitilde, KS_asciicircum,
  372. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  373. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  374. KC(0x21), KS_4, KS_currency, KS_dollar,
  375. KC(0x23), KS_6, KS_ampersand,
  376. KC(0x24), KS_7, KS_slash, KS_braceleft,
  377. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  378. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  379. KC(0x27), KS_0, KS_equal, KS_braceright,
  380. KC(0x28), KS_plus, KS_question,
  381. KC(0x29), KS_dead_acute, KS_dead_grave, KS_bar,
  382. KC(0x2a), KS_apostrophe, KS_asterisk, KS_grave,
  383. KC(0x40), KS_aring,
  384. KC(0x41), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  385. KC(0x43), KS_Mode_switch,
  386. KC(0x4c), KS_Caps_Lock,
  387. KC(0x56), KS_ae,
  388. KC(0x57), KS_oslash,
  389. KC(0x58), KS_onehalf, KS_section,
  390. KC(0x6b), KS_comma, KS_semicolon,
  391. KC(0x6c), KS_period, KS_colon,
  392. KC(0x6d), KS_minus, KS_underscore,
  393. KC(0x77), KS_Control_L,
  394. KC(0x7c), KS_less, KS_greater, KS_backslash,
  395. };
  396. /* 024 Danish type 5 keyboard */
  397. const keysym_t sunkbd5_keydesc_dk[] = {
  398. KC(0x0d), KS_Mode_switch,
  399. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  400. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  401. KC(0x21), KS_4, KS_currency, KS_dollar,
  402. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  403. KC(0x23), KS_6, KS_ampersand, KS_asciicircum,
  404. KC(0x24), KS_7, KS_slash, KS_braceleft,
  405. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  406. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  407. KC(0x27), KS_0, KS_equal, KS_braceright,
  408. KC(0x28), KS_plus, KS_question,
  409. KC(0x29), KS_dead_acute, KS_dead_grave, KS_bar,
  410. KC(0x2a), KS_onehalf, KS_asterisk, KS_grave,
  411. KC(0x40), KS_aring,
  412. KC(0x41), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  413. KC(0x56), KS_ae,
  414. KC(0x57), KS_oslash,
  415. KC(0x58), KS_backslash, KS_asterisk, KS_grave,
  416. KC(0x6b), KS_comma, KS_semicolon,
  417. KC(0x6c), KS_period, KS_colon,
  418. KC(0x6d), KS_minus, KS_underscore,
  419. KC(0x7c), KS_less, KS_greater, KS_backslash,
  420. };
  421. /* 005 German type 4 keyboard */
  422. const keysym_t sunkbd_keydesc_de[] = {
  423. KC(0x0d), KS_Alt_L,
  424. KC(0x0f), KS_bracketright,KS_braceright, KS_guillemotright,
  425. KC(0x13), KS_Mode_switch,
  426. KC(0x1f), KS_2, KS_quotedbl, KS_twosuperior,
  427. KC(0x20), KS_3, KS_section, KS_threesuperior,
  428. KC(0x23), KS_6, KS_ampersand,
  429. KC(0x24), KS_7, KS_slash, KS_degree,
  430. KC(0x25), KS_8, KS_parenleft, KS_grave,
  431. KC(0x26), KS_9, KS_parenright, KS_apostrophe,
  432. KC(0x27), KS_0, KS_equal, KS_bar,
  433. KC(0x28), KS_ssharp, KS_question, KS_backslash,
  434. KC(0x29), KS_dead_acute, KS_dead_grave,
  435. KC(0x2a), KS_numbersign, KS_asciicircum, KS_at,
  436. KC(0x3b), KS_z,
  437. KC(0x40), KS_udiaeresis,
  438. KC(0x41), KS_plus, KS_asterisk, KS_asciitilde,
  439. KC(0x4c), KS_Caps_Lock,
  440. KC(0x56), KS_odiaeresis,
  441. KC(0x57), KS_adiaeresis,
  442. KC(0x58), KS_bracketleft, KS_braceleft, KS_guillemotleft,
  443. KC(0x64), KS_y,
  444. KC(0x6a), KS_m, KS_M, KS_mu,
  445. KC(0x6b), KS_comma, KS_semicolon,
  446. KC(0x6c), KS_period, KS_colon,
  447. KC(0x6d), KS_minus, KS_underscore,
  448. KC(0x77), KS_Control_L,
  449. KC(0x7c), KS_less, KS_greater,
  450. };
  451. /* 025 German type 5 keyboard */
  452. const keysym_t sunkbd5_keydesc_de[] = {
  453. KC(0x0d), KS_Mode_switch,
  454. KC(0x1f), KS_2, KS_quotedbl, KS_twosuperior,
  455. KC(0x20), KS_3, KS_section, KS_threesuperior,
  456. KC(0x23), KS_6, KS_ampersand,
  457. KC(0x24), KS_7, KS_slash, KS_braceleft,
  458. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  459. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  460. KC(0x27), KS_0, KS_equal, KS_braceright,
  461. KC(0x28), KS_ssharp, KS_question, KS_backslash,
  462. KC(0x29), KS_dead_acute, KS_dead_grave,
  463. KC(0x2a), KS_asciicircum, KS_degree,
  464. KC(0x36), KS_q, KS_Q, KS_at,
  465. KC(0x3b), KS_z,
  466. KC(0x40), KS_udiaeresis,
  467. KC(0x41), KS_plus, KS_asterisk, KS_asciitilde,
  468. KC(0x56), KS_odiaeresis,
  469. KC(0x57), KS_adiaeresis,
  470. KC(0x58), KS_numbersign, KS_apostrophe, KS_grave,
  471. KC(0x64), KS_y,
  472. KC(0x6a), KS_m, KS_M, KS_mu,
  473. KC(0x6b), KS_comma, KS_semicolon,
  474. KC(0x6c), KS_period, KS_colon,
  475. KC(0x6d), KS_minus, KS_underscore,
  476. KC(0x7c), KS_less, KS_greater, KS_bar,
  477. };
  478. /* 006 Italian type 4 keyboard */
  479. const keysym_t sunkbd_keydesc_it[] = {
  480. KC(0x0d), KS_Mode_switch,
  481. KC(0x0f), KS_bracketright,KS_braceright, KS_guillemotright,
  482. KC(0x1f), KS_2, KS_quotedbl, KS_twosuperior,
  483. KC(0x20), KS_3, KS_sterling, KS_threesuperior,
  484. KC(0x23), KS_6, KS_ampersand, KS_notsign,
  485. KC(0x24), KS_7, KS_slash,
  486. KC(0x25), KS_8, KS_parenleft,
  487. KC(0x26), KS_9, KS_parenright, KS_backslash,
  488. KC(0x27), KS_0, KS_equal, KS_bar,
  489. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  490. KC(0x29), KS_igrave, KS_asciicircum,
  491. KC(0x2a), KS_ugrave, KS_section,
  492. KC(0x40), KS_egrave, KS_eacute,
  493. KC(0x41), KS_plus, KS_asterisk, KS_asciitilde,
  494. KC(0x4c), KS_Caps_Lock,
  495. KC(0x56), KS_ograve, KS_ccedilla, KS_at,
  496. KC(0x57), KS_agrave, KS_degree, KS_numbersign,
  497. KC(0x58), KS_bracketleft, KS_braceleft, KS_guillemotleft,
  498. KC(0x6b), KS_comma, KS_semicolon,
  499. KC(0x6c), KS_period, KS_colon,
  500. KC(0x6d), KS_minus, KS_underscore,
  501. KC(0x77), KS_Control_L,
  502. KC(0x7c), KS_less, KS_greater,
  503. };
  504. /* 026 Italian type 5 keyboard */
  505. const keysym_t sunkbd5_keydesc_it[] = {
  506. KC(0x0d), KS_Mode_switch,
  507. KC(0x1f), KS_2, KS_quotedbl,
  508. KC(0x20), KS_3, KS_sterling,
  509. KC(0x23), KS_6, KS_ampersand,
  510. KC(0x24), KS_7, KS_slash,
  511. KC(0x25), KS_8, KS_parenleft, KS_braceleft,
  512. KC(0x26), KS_9, KS_parenright, KS_braceright,
  513. KC(0x27), KS_0, KS_equal,
  514. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  515. KC(0x29), KS_igrave, KS_asciicircum,
  516. KC(0x2a), KS_backslash, KS_bar,
  517. KC(0x40), KS_egrave, KS_eacute, KS_bracketleft,
  518. KC(0x41), KS_plus, KS_asterisk, KS_bracketright,
  519. KC(0x56), KS_ograve, KS_ccedilla, KS_at,
  520. KC(0x57), KS_agrave, KS_degree, KS_numbersign,
  521. KC(0x58), KS_ugrave, KS_section, KS_asciitilde,
  522. KC(0x6b), KS_comma, KS_semicolon,
  523. KC(0x6c), KS_period, KS_colon,
  524. KC(0x6d), KS_minus, KS_underscore,
  525. KC(0x7c), KS_less, KS_greater,
  526. };
  527. /* 007 Dutch type 4 keyboard */
  528. const keysym_t sunkbd_keydesc_nl[] = {
  529. KC(0x0d), KS_Caps_Lock,
  530. KC(0x0f), KS_backslash, KS_bar,
  531. KC(0x1e), KS_1, KS_exclam, KS_onesuperior,
  532. KC(0x1f), KS_2, KS_quotedbl, KS_twosuperior,
  533. KC(0x20), KS_3, KS_numbersign, KS_threesuperior,
  534. KC(0x21), KS_4, KS_dollar, KS_onequarter,
  535. KC(0x22), KS_5, KS_percent, KS_onehalf,
  536. KC(0x23), KS_6, KS_ampersand, KS_threequarters,
  537. KC(0x24), KS_7, KS_underscore, KS_sterling,
  538. KC(0x25), KS_8, KS_parenleft, KS_braceleft,
  539. KC(0x26), KS_9, KS_parenright, KS_braceright,
  540. KC(0x27), KS_0, KS_apostrophe, KS_grave,
  541. KC(0x28), KS_slash, KS_question,
  542. KC(0x29), KS_degree, KS_dead_tilde, KS_dead_abovering,
  543. KC(0x2a), KS_less, KS_greater,
  544. KC(0x40), KS_dead_diaeresis,KS_dead_circumflex,
  545. KC(0x41), KS_asterisk, KS_brokenbar, KS_asciitilde,
  546. KC(0x4e), KS_s, KS_S, KS_ssharp,
  547. KC(0x56), KS_plus, KS_plusminus,
  548. KC(0x57), KS_dead_acute, KS_dead_grave,
  549. KC(0x58), KS_at, KS_section, KS_notsign,
  550. KC(0x64), KS_z, KS_Z, KS_guillemotleft,
  551. KC(0x65), KS_x, KS_X, KS_guillemotright,
  552. KC(0x66), KS_c, KS_C, KS_cent,
  553. KC(0x6a), KS_m, KS_M, KS_mu,
  554. KC(0x6b), KS_comma, KS_semicolon,
  555. KC(0x6c), KS_period, KS_colon,
  556. KC(0x6d), KS_minus, KS_equal,
  557. KC(0x77), KS_Mode_switch,
  558. KC(0x7d), KS_bracketright,KS_bracketleft,
  559. };
  560. /* 027 Dutch type 5 keyboard */
  561. const keysym_t sunkbd5_keydesc_nl[] = {
  562. KC(0x0d), KS_Mode_switch,
  563. KC(0x1e), KS_1, KS_exclam, KS_onesuperior,
  564. KC(0x1f), KS_2, KS_quotedbl, KS_twosuperior,
  565. KC(0x20), KS_3, KS_numbersign, KS_threesuperior,
  566. KC(0x21), KS_4, KS_dollar, KS_onequarter,
  567. KC(0x22), KS_5, KS_percent, KS_onehalf,
  568. KC(0x23), KS_6, KS_ampersand, KS_threequarters,
  569. KC(0x24), KS_7, KS_underscore, KS_sterling,
  570. KC(0x25), KS_8, KS_parenleft, KS_braceleft,
  571. KC(0x26), KS_9, KS_parenright, KS_braceright,
  572. KC(0x27), KS_0, KS_apostrophe, KS_grave,
  573. KC(0x28), KS_slash, KS_question, KS_backslash,
  574. KC(0x29), KS_degree, KS_dead_tilde, KS_dead_abovering,
  575. KC(0x2a), KS_at, KS_section, KS_notsign,
  576. KC(0x40), KS_dead_diaeresis,KS_dead_circumflex,
  577. KC(0x41), KS_asterisk, KS_bar, KS_asciitilde,
  578. KC(0x4e), KS_s, KS_S, KS_ssharp,
  579. KC(0x56), KS_plus, KS_plusminus,
  580. KC(0x57), KS_dead_acute, KS_dead_grave,
  581. KC(0x58), KS_less, KS_greater, KS_asciicircum,
  582. KC(0x64), KS_z, KS_Z, KS_guillemotleft,
  583. KC(0x65), KS_x, KS_X, KS_guillemotright,
  584. KC(0x66), KS_c, KS_C, KS_cent,
  585. KC(0x6a), KS_m, KS_M, KS_mu,
  586. KC(0x6b), KS_comma, KS_semicolon,
  587. KC(0x6c), KS_period, KS_colon, KS_hyphen,
  588. KC(0x6d), KS_minus, KS_equal,
  589. KC(0x7d), KS_bracketright,KS_bracketleft, KS_brokenbar,
  590. };
  591. /* 008 Norwegian type 4 keyboard */
  592. const keysym_t sunkbd_keydesc_no[] = {
  593. KC(0x0d), KS_Mode_switch,
  594. KC(0x0f), KS_asciitilde, KS_asciicircum,
  595. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  596. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  597. KC(0x21), KS_4, KS_currency, KS_dollar,
  598. KC(0x23), KS_6, KS_ampersand,
  599. KC(0x24), KS_7, KS_slash, KS_braceleft,
  600. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  601. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  602. KC(0x27), KS_0, KS_equal, KS_braceright,
  603. KC(0x28), KS_plus, KS_question,
  604. KC(0x29), KS_backslash, KS_dead_grave, KS_dead_acute,
  605. KC(0x2a), KS_apostrophe, KS_asterisk, KS_grave,
  606. KC(0x40), KS_aring,
  607. KC(0x41), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  608. KC(0x4c), KS_Caps_Lock,
  609. KC(0x56), KS_oslash,
  610. KC(0x57), KS_ae,
  611. KC(0x58), KS_bar, KS_section,
  612. KC(0x6b), KS_comma, KS_semicolon,
  613. KC(0x6c), KS_period, KS_colon,
  614. KC(0x6d), KS_minus, KS_underscore,
  615. KC(0x77), KS_Control_L,
  616. KC(0x7d), KS_less, KS_greater,
  617. };
  618. /* 028 Norwegian type 5 keyboard */
  619. const keysym_t sunkbd5_keydesc_no[] = {
  620. KC(0x0d), KS_Mode_switch,
  621. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  622. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  623. KC(0x21), KS_4, KS_currency, KS_dollar,
  624. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  625. KC(0x23), KS_6, KS_ampersand, KS_asciicircum,
  626. KC(0x24), KS_7, KS_slash, KS_braceleft,
  627. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  628. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  629. KC(0x27), KS_0, KS_equal, KS_braceright,
  630. KC(0x28), KS_plus, KS_question,
  631. KC(0x29), KS_backslash, KS_dead_grave, KS_dead_acute,
  632. KC(0x2a), KS_bar, KS_section,
  633. KC(0x40), KS_aring,
  634. KC(0x41), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  635. KC(0x56), KS_oslash,
  636. KC(0x57), KS_ae,
  637. KC(0x58), KS_apostrophe, KS_asterisk, KS_grave,
  638. KC(0x6b), KS_comma, KS_semicolon,
  639. KC(0x6c), KS_period, KS_colon,
  640. KC(0x6d), KS_minus, KS_underscore,
  641. KC(0x7d), KS_less, KS_greater,
  642. };
  643. /* 009 Portuguese type 4 keyboard */
  644. const keysym_t sunkbd_keydesc_pt[] = {
  645. KC(0x0d), KS_Mode_switch,
  646. KC(0x0f), KS_bracketright,KS_braceright, KS_guillemotright,
  647. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  648. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  649. KC(0x21), KS_4, KS_dollar, KS_section,
  650. KC(0x23), KS_6, KS_ampersand, KS_notsign,
  651. KC(0x24), KS_7, KS_slash,
  652. KC(0x25), KS_8, KS_parenleft,
  653. KC(0x26), KS_9, KS_parenright, KS_backslash,
  654. KC(0x27), KS_0, KS_equal, KS_bar,
  655. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  656. KC(0x29), KS_exclamdown, KS_questiondown,
  657. KC(0x2a), KS_dead_tilde, KS_dead_circumflex,KS_asciicircum,
  658. KC(0x40), KS_dead_diaeresis,KS_asterisk, KS_plus,
  659. KC(0x41), KS_dead_acute, KS_dead_grave, KS_asciitilde,
  660. KC(0x4c), KS_Caps_Lock,
  661. KC(0x56), KS_ccedilla,
  662. KC(0x57), KS_masculine, KS_ordfeminine,
  663. KC(0x58), KS_bracketleft, KS_braceleft, KS_guillemotleft,
  664. KC(0x6b), KS_comma, KS_semicolon,
  665. KC(0x6c), KS_period, KS_colon,
  666. KC(0x6d), KS_minus, KS_underscore,
  667. KC(0x77), KS_Control_L,
  668. KC(0x7d), KS_less, KS_greater,
  669. };
  670. /* 029 Portuguese type 4 keyboard */
  671. const keysym_t sunkbd5_keydesc_pt[] = {
  672. KC(0x0d), KS_Mode_switch,
  673. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  674. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  675. KC(0x21), KS_4, KS_dollar, KS_section,
  676. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  677. KC(0x23), KS_6, KS_ampersand, KS_asciicircum,
  678. KC(0x24), KS_7, KS_slash, KS_braceleft,
  679. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  680. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  681. KC(0x27), KS_0, KS_equal, KS_braceright,
  682. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  683. KC(0x29), KS_guillemotleft,KS_guillemotright,
  684. KC(0x2a), KS_backslash, KS_bar,
  685. KC(0x40), KS_plus, KS_asterisk, KS_dead_diaeresis,
  686. KC(0x41), KS_dead_acute, KS_dead_grave,
  687. KC(0x56), KS_ccedilla,
  688. KC(0x57), KS_masculine, KS_ordfeminine,
  689. KC(0x58), KS_dead_tilde, KS_dead_circumflex,
  690. KC(0x6b), KS_comma, KS_semicolon,
  691. KC(0x6c), KS_period, KS_colon,
  692. KC(0x6d), KS_minus, KS_underscore,
  693. KC(0x7d), KS_less, KS_greater,
  694. };
  695. /* 00a Spanish type 4 keyboard */
  696. const keysym_t sunkbd_keydesc_es[] = {
  697. KC(0x0d), KS_Mode_switch,
  698. KC(0x0f), KS_bracketright,KS_braceright, KS_guillemotright,
  699. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  700. KC(0x20), KS_3, KS_hyphen, KS_numbersign,
  701. KC(0x22), KS_5, KS_percent, KS_degree,
  702. KC(0x23), KS_6, KS_ampersand, KS_notsign,
  703. KC(0x24), KS_7, KS_slash,
  704. KC(0x25), KS_8, KS_parenleft,
  705. KC(0x26), KS_9, KS_parenright, KS_backslash,
  706. KC(0x27), KS_0, KS_equal, KS_bar,
  707. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  708. KC(0x29), KS_exclamdown, KS_questiondown,
  709. KC(0x2a), KS_ccedilla,
  710. KC(0x3e), KS_o, KS_O, KS_masculine,
  711. KC(0x40), KS_dead_grave, KS_dead_circumflex,KS_asciicircum,
  712. KC(0x41), KS_plus, KS_asterisk, KS_asciitilde,
  713. KC(0x4c), KS_Caps_Lock,
  714. KC(0x4d), KS_a, KS_A, KS_ordfeminine,
  715. KC(0x56), KS_ntilde,
  716. KC(0x57), KS_dead_acute, KS_dead_diaeresis,
  717. KC(0x58), KS_bracketleft, KS_braceleft, KS_guillemotleft,
  718. KC(0x6b), KS_comma, KS_semicolon,
  719. KC(0x6c), KS_period, KS_colon,
  720. KC(0x6d), KS_minus, KS_underscore,
  721. KC(0x77), KS_Control_L,
  722. KC(0x7d), KS_less, KS_greater,
  723. };
  724. /* 02a Spanish type 5 keyboard */
  725. const keysym_t sunkbd5_keydesc_es[] = {
  726. KC(0x0d), KS_Mode_switch,
  727. KC(0x1e), KS_1, KS_exclam, KS_bar,
  728. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  729. KC(0x20), KS_3, KS_hyphen, KS_numbersign,
  730. KC(0x21), KS_4, KS_dollar, KS_asciicircum,
  731. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  732. KC(0x23), KS_6, KS_ampersand, KS_notsign,
  733. KC(0x24), KS_7, KS_slash,
  734. KC(0x25), KS_8, KS_parenleft,
  735. KC(0x26), KS_9, KS_parenright,
  736. KC(0x27), KS_0, KS_equal,
  737. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  738. KC(0x29), KS_exclamdown, KS_questiondown,
  739. KC(0x2a), KS_masculine, KS_ordfeminine, KS_backslash,
  740. KC(0x40), KS_dead_grave, KS_dead_circumflex,KS_bracketleft,
  741. KC(0x41), KS_plus, KS_asterisk, KS_bracketright,
  742. KC(0x56), KS_ntilde,
  743. KC(0x57), KS_dead_acute, KS_dead_diaeresis,KS_braceleft,
  744. KC(0x58), KS_ccedilla, KS_Ccedilla, KS_braceright,
  745. KC(0x6b), KS_comma, KS_semicolon,
  746. KC(0x6c), KS_period, KS_colon,
  747. KC(0x6d), KS_minus, KS_underscore,
  748. KC(0x7d), KS_less, KS_greater,
  749. };
  750. /* 00b Swedish/Finnish type 4 keyboard */
  751. const keysym_t sunkbd_keydesc_sv[] = {
  752. KC(0x0d), KS_Multi_key,
  753. KC(0x0f), KS_asciitilde, KS_asciicircum,
  754. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  755. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  756. KC(0x21), KS_4, KS_currency, KS_dollar,
  757. KC(0x23), KS_6, KS_ampersand,
  758. KC(0x24), KS_7, KS_slash, KS_braceleft,
  759. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  760. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  761. KC(0x27), KS_0, KS_equal, KS_braceright,
  762. KC(0x28), KS_plus, KS_question, KS_backslash,
  763. KC(0x29), KS_dead_acute, KS_dead_grave,
  764. KC(0x2a), KS_apostrophe, KS_asterisk, KS_grave,
  765. KC(0x40), KS_aring,
  766. KC(0x41), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  767. KC(0x43), KS_Mode_switch,
  768. KC(0x4c), KS_Caps_Lock,
  769. KC(0x56), KS_odiaeresis,
  770. KC(0x57), KS_adiaeresis,
  771. KC(0x58), KS_section, KS_onehalf,
  772. KC(0x6b), KS_comma, KS_semicolon,
  773. KC(0x6c), KS_period, KS_colon,
  774. KC(0x6d), KS_minus, KS_underscore,
  775. KC(0x77), KS_Control_L,
  776. KC(0x7c), KS_less, KS_greater, KS_bar,
  777. };
  778. const keysym_t sunkbd_keydesc_sv_nodead[] = {
  779. KC(0x29), KS_apostrophe, KS_grave,
  780. KC(0x41), KS_diaeresis, KS_asciicircum, KS_asciitilde,
  781. };
  782. /* 02b Swedish type 5 keyboard */
  783. const keysym_t sunkbd5_keydesc_sv[] = {
  784. KC(0x0d), KS_Mode_switch,
  785. KC(0x0f), KS_asciitilde, KS_asciicircum,
  786. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  787. KC(0x20), KS_3, KS_numbersign, KS_sterling,
  788. KC(0x21), KS_4, KS_currency, KS_dollar,
  789. KC(0x23), KS_6, KS_ampersand,
  790. KC(0x24), KS_7, KS_slash, KS_braceleft,
  791. KC(0x25), KS_8, KS_parenleft, KS_bracketleft,
  792. KC(0x26), KS_9, KS_parenright, KS_bracketright,
  793. KC(0x27), KS_0, KS_equal, KS_braceright,
  794. KC(0x28), KS_plus, KS_question, KS_backslash,
  795. KC(0x29), KS_dead_acute, KS_dead_grave,
  796. KC(0x2a), KS_section, KS_onehalf,
  797. KC(0x40), KS_aring,
  798. KC(0x41), KS_dead_diaeresis,KS_dead_circumflex,KS_dead_tilde,
  799. KC(0x43), KS_Multi_key,
  800. KC(0x4c), KS_Control_L,
  801. KC(0x56), KS_odiaeresis,
  802. KC(0x57), KS_adiaeresis,
  803. KC(0x58), KS_apostrophe, KS_asterisk, KS_grave,
  804. KC(0x6b), KS_comma, KS_semicolon,
  805. KC(0x6c), KS_period, KS_colon,
  806. KC(0x6d), KS_minus, KS_underscore,
  807. KC(0x77), KS_Caps_Lock,
  808. KC(0x7c), KS_less, KS_greater, KS_bar,
  809. };
  810. /* 00c Swiss-French type 4 keyboard */
  811. const keysym_t sunkbd_keydesc_sf[] = {
  812. KC(0x0d), KS_Multi_key,
  813. KC(0x0f), KS_greater, KS_braceright,
  814. KC(0x1e), KS_1, KS_plus, KS_exclam,
  815. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  816. KC(0x20), KS_3, KS_asterisk, KS_numbersign,
  817. KC(0x21), KS_4, KS_ccedilla, KS_cent,
  818. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  819. KC(0x23), KS_6, KS_ampersand, KS_section,
  820. KC(0x24), KS_7, KS_slash, KS_bar,
  821. KC(0x25), KS_8, KS_parenleft, KS_degree,
  822. KC(0x26), KS_9, KS_parenright, KS_backslash,
  823. KC(0x27), KS_0, KS_equal, KS_asciicircum,
  824. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  825. KC(0x29), KS_dead_circumflex,KS_dead_grave,
  826. KC(0x2a), KS_dollar, KS_dead_tilde, KS_sterling,
  827. KC(0x3b), KS_z,
  828. KC(0x40), KS_egrave, KS_udiaeresis,
  829. KC(0x41), KS_dead_diaeresis,KS_dead_acute,
  830. KC(0x43), KS_Mode_switch,
  831. KC(0x4c), KS_Caps_Lock,
  832. KC(0x56), KS_eacute, KS_odiaeresis,
  833. KC(0x57), KS_agrave, KS_adiaeresis,
  834. KC(0x58), KS_less, KS_braceleft,
  835. KC(0x64), KS_y,
  836. KC(0x6a), KS_m, KS_M, KS_mu,
  837. KC(0x6b), KS_comma, KS_semicolon,
  838. KC(0x6c), KS_period, KS_colon,
  839. KC(0x6d), KS_minus, KS_underscore,
  840. KC(0x77), KS_Control_L,
  841. KC(0x7c), KS_bracketright,KS_bracketleft, KS_backslash,
  842. };
  843. /* 02c Swiss-French type 5 keyboard */
  844. const keysym_t sunkbd5_keydesc_sf[] = {
  845. KC(0x0d), KS_Mode_switch,
  846. KC(0x1e), KS_1, KS_plus, KS_bar,
  847. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  848. KC(0x20), KS_3, KS_asterisk, KS_numbersign,
  849. KC(0x21), KS_4, KS_ccedilla, KS_asciicircum,
  850. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  851. KC(0x23), KS_6, KS_ampersand,
  852. KC(0x24), KS_7, KS_slash,
  853. KC(0x25), KS_8, KS_parenleft,
  854. KC(0x26), KS_9, KS_parenright,
  855. KC(0x27), KS_0, KS_equal, KS_grave,
  856. KC(0x28), KS_apostrophe, KS_question, KS_dead_acute,
  857. KC(0x29), KS_dead_circumflex,KS_dead_grave,KS_dead_tilde,
  858. KC(0x2a), KS_dollar, KS_degree,
  859. KC(0x3b), KS_z,
  860. KC(0x40), KS_egrave, KS_udiaeresis, KS_bracketleft,
  861. KC(0x41), KS_dead_diaeresis,KS_exclam, KS_bracketright,
  862. KC(0x56), KS_eacute, KS_odiaeresis,
  863. KC(0x57), KS_agrave, KS_adiaeresis, KS_braceleft,
  864. KC(0x58), KS_dollar, KS_sterling, KS_braceright,
  865. KC(0x64), KS_y,
  866. KC(0x6b), KS_comma, KS_semicolon,
  867. KC(0x6c), KS_period, KS_colon,
  868. KC(0x6d), KS_minus, KS_underscore,
  869. KC(0x7c), KS_less, KS_greater, KS_backslash,
  870. };
  871. /* 00d Swiss-German type 4 keyboard */
  872. const keysym_t sunkbd_keydesc_sg[] = {
  873. KC(0x0d), KS_Multi_key,
  874. KC(0x0f), KS_greater, KS_braceright,
  875. KC(0x1e), KS_1, KS_plus, KS_exclam,
  876. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  877. KC(0x20), KS_3, KS_asterisk, KS_numbersign,
  878. KC(0x21), KS_4, KS_ccedilla, KS_cent,
  879. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  880. KC(0x23), KS_6, KS_ampersand, KS_section,
  881. KC(0x24), KS_7, KS_slash, KS_bar,
  882. KC(0x25), KS_8, KS_parenleft, KS_degree,
  883. KC(0x26), KS_9, KS_parenright, KS_backslash,
  884. KC(0x27), KS_0, KS_equal, KS_asciicircum,
  885. KC(0x28), KS_apostrophe, KS_question, KS_grave,
  886. KC(0x29), KS_dead_circumflex,KS_dead_grave,
  887. KC(0x2a), KS_dollar, KS_dead_tilde, KS_sterling,
  888. KC(0x3b), KS_z,
  889. KC(0x40), KS_udiaeresis, KS_egrave,
  890. KC(0x41), KS_dead_diaeresis,KS_dead_acute,
  891. KC(0x43), KS_Mode_switch,
  892. KC(0x4c), KS_Caps_Lock,
  893. KC(0x56), KS_odiaeresis, KS_eacute,
  894. KC(0x57), KS_adiaeresis, KS_agrave,
  895. KC(0x58), KS_less, KS_braceleft,
  896. KC(0x64), KS_y,
  897. KC(0x6a), KS_m, KS_M, KS_mu,
  898. KC(0x6b), KS_comma, KS_semicolon,
  899. KC(0x6c), KS_period, KS_colon,
  900. KC(0x6d), KS_minus, KS_underscore,
  901. KC(0x77), KS_Control_L,
  902. KC(0x7c), KS_bracketright,KS_bracketleft, KS_backslash,
  903. };
  904. /* 02d Swiss-German type 5 keyboard */
  905. const keysym_t sunkbd5_keydesc_sg[] = {
  906. KC(0x0d), KS_Mode_switch,
  907. KC(0x1e), KS_1, KS_plus, KS_bar,
  908. KC(0x1f), KS_2, KS_quotedbl, KS_at,
  909. KC(0x20), KS_3, KS_asterisk, KS_numbersign,
  910. KC(0x21), KS_4, KS_ccedilla, KS_asciicircum,
  911. KC(0x22), KS_5, KS_percent, KS_asciitilde,
  912. KC(0x23), KS_6, KS_ampersand,
  913. KC(0x24), KS_7, KS_slash,
  914. KC(0x25), KS_8, KS_parenleft,
  915. KC(0x26), KS_9, KS_parenright,
  916. KC(0x27), KS_0, KS_equal, KS_grave,
  917. KC(0x28), KS_apostrophe, KS_question, KS_dead_acute,
  918. KC(0x29), KS_dead_circumflex,KS_dead_grave,KS_dead_tilde,
  919. KC(0x2a), KS_dollar, KS_degree,
  920. KC(0x3b), KS_z,
  921. KC(0x40), KS_udiaeresis, KS_egrave, KS_bracketleft,
  922. KC(0x41), KS_dead_diaeresis,KS_exclam, KS_bracketright,
  923. KC(0x56), KS_odiaeresis, KS_eacute,
  924. KC(0x57), KS_adiaeresis, KS_agrave, KS_braceleft,
  925. KC(0x58), KS_dollar, KS_sterling, KS_braceright,
  926. KC(0x64), KS_y,
  927. KC(0x6b), KS_comma, KS_semicolon,
  928. KC(0x6c), KS_period, KS_colon,
  929. KC(0x6d), KS_minus, KS_underscore,
  930. KC(0x7c), KS_less, KS_greater, KS_backslash,
  931. };
  932. /* 00e UK English type 4 keyboard */
  933. const keysym_t sunkbd_keydesc_uk[] = {
  934. KC(0x1e), KS_1, KS_exclam, KS_bar,
  935. KC(0x21), KS_3, KS_sterling, KS_numbersign,
  936. KC(0x28), KS_minus, KS_underscore, KS_notsign,
  937. KC(0x43), KS_Mode_switch,
  938. };
  939. /* 02e UK English type 5 keyboard */
  940. const keysym_t sunkbd5_keydesc_uk[] = {
  941. KC(0x0d), KS_Mode_switch,
  942. KC(0x1f), KS_2, KS_quotedbl,
  943. KC(0x20), KS_3, KS_sterling,
  944. KC(0x2a), KS_grave, KS_notsign, KS_brokenbar,
  945. KC(0x57), KS_apostrophe, KS_at,
  946. KC(0x58), KS_numbersign, KS_asciitilde,
  947. KC(0x7c), KS_backslash, KS_bar,
  948. };
  949. /* 031 Japan type 5 keyboard */
  950. const keysym_t sunkbd5_keydesc_jp[] = {
  951. KC(0x1f), KS_2, KS_quotedbl,
  952. KC(0x23), KS_6, KS_ampersand,
  953. KC(0x24), KS_7, KS_apostrophe,
  954. KC(0x25), KS_8, KS_parenleft,
  955. KC(0x26), KS_9, KS_parenright,
  956. KC(0x27), KS_0,
  957. KC(0x28), KS_minus, KS_equal,
  958. KC(0x29), KS_asciicircum, KS_asciitilde,
  959. KC(0x2a), KS_yen, KS_bar,
  960. KC(0x40), KS_at, KS_grave,
  961. KC(0x41), KS_bracketleft, KS_braceleft,
  962. KC(0x56), KS_semicolon, KS_plus,
  963. KC(0x57), KS_colon, KS_asterisk,
  964. KC(0x58), KS_bracketright,KS_braceright,
  965. KC(0x7c), KS_backslash, KS_underscore,
  966. };
  967. #define KBD_MAP(name, base, map) \
  968. { name, base, sizeof(map)/sizeof(keysym_t), map }
  969. /* Supported type 4 keyboard layouts */
  970. const struct wscons_keydesc sunkbd_keydesctab[] = {
  971. KBD_MAP(KB_US, 0, sunkbd_keydesc_us),
  972. KBD_MAP(KB_BE, KB_US, sunkbd_keydesc_befr),
  973. KBD_MAP(KB_DE, KB_US, sunkbd_keydesc_de),
  974. KBD_MAP(KB_DK, KB_US, sunkbd_keydesc_dk),
  975. KBD_MAP(KB_ES, KB_US, sunkbd_keydesc_es),
  976. KBD_MAP(KB_FR, KB_US, sunkbd_keydesc_befr),
  977. KBD_MAP(KB_IT, KB_US, sunkbd_keydesc_it),
  978. KBD_MAP(KB_NL, KB_US, sunkbd_keydesc_nl),
  979. KBD_MAP(KB_NO, KB_US, sunkbd_keydesc_no),
  980. KBD_MAP(KB_PT, KB_US, sunkbd_keydesc_pt),
  981. KBD_MAP(KB_SF, KB_US, sunkbd_keydesc_sf),
  982. KBD_MAP(KB_SG, KB_US, sunkbd_keydesc_sg),
  983. KBD_MAP(KB_SV, KB_US, sunkbd_keydesc_sv),
  984. KBD_MAP(KB_SV | KB_NODEAD, KB_SV, sunkbd_keydesc_sv_nodead),
  985. KBD_MAP(KB_UK, KB_US, sunkbd_keydesc_uk),
  986. {0, 0, 0, 0},
  987. };
  988. /* Supported type 5 keyboard layouts */
  989. const struct wscons_keydesc sunkbd5_keydesctab[] = {
  990. KBD_MAP(KB_US, 0, sunkbd_keydesc_us),
  991. KBD_MAP(KB_DE, KB_US, sunkbd5_keydesc_de),
  992. KBD_MAP(KB_DK, KB_US, sunkbd5_keydesc_dk),
  993. KBD_MAP(KB_ES, KB_US, sunkbd5_keydesc_es),
  994. KBD_MAP(KB_FR, KB_US, sunkbd5_keydesc_fr),
  995. KBD_MAP(KB_IT, KB_US, sunkbd5_keydesc_it),
  996. KBD_MAP(KB_JP, KB_US, sunkbd5_keydesc_jp),
  997. KBD_MAP(KB_NL, KB_US, sunkbd5_keydesc_nl),
  998. KBD_MAP(KB_NO, KB_US, sunkbd5_keydesc_no),
  999. KBD_MAP(KB_PT, KB_US, sunkbd5_keydesc_pt),
  1000. KBD_MAP(KB_SF, KB_US, sunkbd5_keydesc_sf),
  1001. KBD_MAP(KB_SG, KB_US, sunkbd5_keydesc_sg),
  1002. KBD_MAP(KB_SV, KB_US, sunkbd5_keydesc_sv),
  1003. KBD_MAP(KB_SV | KB_NODEAD, KB_SV, sunkbd_keydesc_sv_nodead),
  1004. KBD_MAP(KB_UK, KB_US, sunkbd5_keydesc_uk),
  1005. {0, 0, 0, 0},
  1006. };
  1007. /*
  1008. * Keyboard layout to ID table
  1009. * References:
  1010. * Sun Type 5 Keyboard Supplement Installation Guide, May 1992
  1011. * http://docs.sun.com/db/doc/806-6642/6jfipqu57?a=view
  1012. * http://jp.sunsolve.sun.com/handbook_pub/Systems/SSVygr/INPUT_Compact1_Keyboard.html
  1013. */
  1014. const int sunkbd_layouts[MAXSUNLAYOUT] = {
  1015. /* Type 4 layouts */
  1016. KB_US, /* 000 USA */
  1017. KB_US, /* 001 same as 000 */
  1018. KB_BE, /* 002 Belgium/French */
  1019. -1, /* 003 Canada */
  1020. KB_DK, /* 004 Denmark */
  1021. KB_DE, /* 005 Germany */
  1022. KB_IT, /* 006 Italy */
  1023. KB_NL, /* 007 The Netherlands */
  1024. KB_NO, /* 008 Norway */
  1025. KB_PT, /* 009 Portugal */
  1026. KB_ES, /* 00a Latin America/Spanish */
  1027. KB_SV, /* 00b Sweden */
  1028. KB_SF, /* 00c Switzerland/French */
  1029. KB_SG, /* 00d Switzerland/German */
  1030. KB_UK, /* 00e Great Britain */
  1031. -1, /* 00f unaffected */
  1032. -1, /* 010 Korea */
  1033. -1, /* 011 Taiwan */
  1034. -1, /* 012 unaffected */
  1035. -1, /* 013 unaffected */
  1036. -1, /* 014 VT220 */
  1037. -1, /* 015 VT220 Switzerland/French */
  1038. -1, /* 016 VT220 Switzerland/German */
  1039. -1, /* 017 VT220 Switzerland/Italian */
  1040. -1, /* 018 unaffected */
  1041. -1, /* 019 Belgium */
  1042. -1, /* 01a unaffected */
  1043. -1, /* 01b unaffected */
  1044. -1, /* 01c unaffected */
  1045. -1, /* 01d unaffected */
  1046. -1, /* 01e unaffected */
  1047. -1, /* 01f unaffected */
  1048. -1, /* 020 Japan */
  1049. /* Type 5 layouts */
  1050. KB_US, /* 021 USA */
  1051. KB_US, /* 022 UNIX */
  1052. KB_FR, /* 023 France */
  1053. KB_DK, /* 024 Denmark */
  1054. KB_DE, /* 025 Germany */
  1055. KB_IT, /* 026 Italy */
  1056. KB_NL, /* 027 The Netherlands */
  1057. KB_NO, /* 028 Norway */
  1058. KB_PT, /* 029 Portugal */
  1059. KB_ES, /* 02a Spain */
  1060. KB_SV, /* 02b Sweden */
  1061. KB_SF, /* 02c Switzerland/French */
  1062. KB_SG, /* 02d Switzerland/German */
  1063. KB_UK, /* 02e Great Britain */
  1064. -1, /* 02f Korea */
  1065. -1, /* 030 Taiwan */
  1066. KB_JP, /* 031 Japan */
  1067. -1, /* 032 Canada/French */
  1068. -1, /* 033 Hungary */
  1069. -1, /* 034 Poland */
  1070. -1, /* 035 Czech */
  1071. -1, /* 036 Russia */
  1072. -1, /* 037 Latvia */
  1073. -1, /* 038 Turkey-Q5 */
  1074. -1, /* 039 Greece */
  1075. -1, /* 03a Arabic */
  1076. -1, /* 03b Lithuania */
  1077. -1, /* 03c Belgium */
  1078. -1, /* 03d unaffected */
  1079. -1, /* 03e Turkey-F5 */
  1080. -1, /* 03f Canada/French */
  1081. /* Not affected range */
  1082. -1, /* 040 */
  1083. -1, /* 041 */
  1084. -1, /* 042 */
  1085. -1, /* 043 */
  1086. -1, /* 044 */
  1087. -1, /* 045 */
  1088. -1, /* 046 */
  1089. -1, /* 047 */
  1090. -1, /* 048 */
  1091. -1, /* 049 */
  1092. -1, /* 04a */
  1093. -1, /* 04b */
  1094. -1, /* 04c */
  1095. -1, /* 04d */
  1096. -1, /* 04e */
  1097. -1, /* 04f */
  1098. /* ``Compact-1'' layouts */
  1099. KB_US, /* 050 USA */
  1100. KB_US, /* 051 UNIX */
  1101. KB_FR, /* 052 France */
  1102. KB_DK, /* 053 Denmark */
  1103. KB_DE, /* 054 Germany */
  1104. KB_IT, /* 055 Italy */
  1105. KB_NL, /* 056 The Netherlands */
  1106. KB_NO, /* 057 Norway */
  1107. KB_PT, /* 058 Portugal */
  1108. KB_ES, /* 059 Spain */
  1109. KB_SV, /* 05a Sweden */
  1110. KB_SF, /* 05b Switzerland/French */
  1111. KB_SG, /* 05c Switzerland/German */
  1112. KB_UK, /* 05d Great Britain */
  1113. -1, /* 05e Korea */
  1114. -1, /* 05f Taiwan */
  1115. KB_JP, /* 060 Japan */
  1116. -1, /* 061 Canada/French */
  1117. };
  1118. struct wskbd_mapdata sunkbd_keymapdata = {
  1119. sunkbd_keydesctab,
  1120. #ifdef SUNKBD_LAYOUT
  1121. SUNKBD_LAYOUT,
  1122. #else
  1123. KB_US | KB_DEFAULT,
  1124. #endif
  1125. };
  1126. struct wskbd_mapdata sunkbd5_keymapdata = {
  1127. sunkbd5_keydesctab,
  1128. #ifdef SUNKBD5_LAYOUT
  1129. SUNKBD5_LAYOUT,
  1130. #else
  1131. KB_US | KB_DEFAULT,
  1132. #endif
  1133. };