17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate /* 237c478bd9Sstevel@tonic-gate * Copyright (c) 1999 by Sun Microsystems, Inc. 247c478bd9Sstevel@tonic-gate * All rights reserved. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate /* 287c478bd9Sstevel@tonic-gate * This file contains generic keytable information across all 297c478bd9Sstevel@tonic-gate * keyboard hardware. 307c478bd9Sstevel@tonic-gate */ 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #include <sys/param.h> 337c478bd9Sstevel@tonic-gate #include <sys/kbd.h> 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate /* 367c478bd9Sstevel@tonic-gate * Keyboard String Table 377c478bd9Sstevel@tonic-gate * 387c478bd9Sstevel@tonic-gate * This defines the strings sent by various keys (as selected in the 397c478bd9Sstevel@tonic-gate * tables above). 407c478bd9Sstevel@tonic-gate * The first byte of each string is its length, the rest is data. 417c478bd9Sstevel@tonic-gate */ 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate #ifdef __STDC__ 447c478bd9Sstevel@tonic-gate #define kstescinit(c) "\033[" #c 457c478bd9Sstevel@tonic-gate #else /* __STDC__ */ 467c478bd9Sstevel@tonic-gate #define kstescinit(c) {'\033', '[', 'c', '\0'} 477c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 487c478bd9Sstevel@tonic-gate char keystringtab[16][KTAB_STRLEN] = { 497c478bd9Sstevel@tonic-gate kstescinit(H) /* home */, 507c478bd9Sstevel@tonic-gate kstescinit(A) /* up */, 517c478bd9Sstevel@tonic-gate kstescinit(B) /* down */, 527c478bd9Sstevel@tonic-gate kstescinit(D) /* left */, 537c478bd9Sstevel@tonic-gate kstescinit(C) /* right */, 547c478bd9Sstevel@tonic-gate }; 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate /* 587c478bd9Sstevel@tonic-gate * Compose Key Sequence Table 597c478bd9Sstevel@tonic-gate * 607c478bd9Sstevel@tonic-gate * Taken from Suncompose.h of openwindows. 617c478bd9Sstevel@tonic-gate * 627c478bd9Sstevel@tonic-gate * The idea here is to create a simple index into a table of 637c478bd9Sstevel@tonic-gate * compose key sequences. The purpose is to provide a fast 647c478bd9Sstevel@tonic-gate * lookup mechanism using as little space as possible (while 657c478bd9Sstevel@tonic-gate * still using a table of triplets). 667c478bd9Sstevel@tonic-gate * 677c478bd9Sstevel@tonic-gate * For reference, here is the set of all composable characters: 687c478bd9Sstevel@tonic-gate * SP !\"\'*+,-./01234:<>?ACDEHILNOPRSTUXY\\^_`acdehilnoprstuxy|~ 697c478bd9Sstevel@tonic-gate * 707c478bd9Sstevel@tonic-gate * if ascii_char[i] is not composable, 717c478bd9Sstevel@tonic-gate * kb_compose_map[i] is -1 727c478bd9Sstevel@tonic-gate * else 737c478bd9Sstevel@tonic-gate * if ascii_char[i] appears as a first char in compose_table, 747c478bd9Sstevel@tonic-gate * kb_compose_map[i] is the index of it's first appearance 757c478bd9Sstevel@tonic-gate * else 767c478bd9Sstevel@tonic-gate * kb_compose_map[i] is 112 (end of table) 777c478bd9Sstevel@tonic-gate */ 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate signed char kb_compose_map[ASCII_SET_SIZE] = { 807c478bd9Sstevel@tonic-gate -1, /* 000 (^@) */ 817c478bd9Sstevel@tonic-gate -1, /* 001 (^A) */ 827c478bd9Sstevel@tonic-gate -1, /* 002 (^B) */ 837c478bd9Sstevel@tonic-gate -1, /* 003 (^C) */ 847c478bd9Sstevel@tonic-gate -1, /* 004 (^D) */ 857c478bd9Sstevel@tonic-gate -1, /* 005 (^E) */ 867c478bd9Sstevel@tonic-gate -1, /* 006 (^F) */ 877c478bd9Sstevel@tonic-gate -1, /* 007 (^G) */ 887c478bd9Sstevel@tonic-gate -1, /* 008 (^H) */ 897c478bd9Sstevel@tonic-gate -1, /* 009 (^I) */ 907c478bd9Sstevel@tonic-gate -1, /* 010 (^J) */ 917c478bd9Sstevel@tonic-gate -1, /* 011 (^K) */ 927c478bd9Sstevel@tonic-gate -1, /* 012 (^L) */ 937c478bd9Sstevel@tonic-gate -1, /* 013 (^M) */ 947c478bd9Sstevel@tonic-gate -1, /* 014 (^N) */ 957c478bd9Sstevel@tonic-gate -1, /* 015 (^O) */ 967c478bd9Sstevel@tonic-gate -1, /* 016 (^P) */ 977c478bd9Sstevel@tonic-gate -1, /* 017 (^Q) */ 987c478bd9Sstevel@tonic-gate -1, /* 018 (^R) */ 997c478bd9Sstevel@tonic-gate -1, /* 019 (^S) */ 1007c478bd9Sstevel@tonic-gate -1, /* 020 (^T) */ 1017c478bd9Sstevel@tonic-gate -1, /* 021 (^U) */ 1027c478bd9Sstevel@tonic-gate -1, /* 022 (^V) */ 1037c478bd9Sstevel@tonic-gate -1, /* 023 (^W) */ 1047c478bd9Sstevel@tonic-gate -1, /* 024 (^X) */ 1057c478bd9Sstevel@tonic-gate -1, /* 025 (^Y) */ 1067c478bd9Sstevel@tonic-gate -1, /* 026 (^Z) */ 1077c478bd9Sstevel@tonic-gate -1, /* 027 (^[) */ 1087c478bd9Sstevel@tonic-gate -1, /* 028 (^\) */ 1097c478bd9Sstevel@tonic-gate -1, /* 029 (^]) */ 1107c478bd9Sstevel@tonic-gate -1, /* 030 (^^) */ 1117c478bd9Sstevel@tonic-gate -1, /* 031 (^_) */ 1127c478bd9Sstevel@tonic-gate 0, /* 032 (SP) */ 1137c478bd9Sstevel@tonic-gate 1, /* 033 (!) */ 1147c478bd9Sstevel@tonic-gate 4, /* 034 (") */ 1157c478bd9Sstevel@tonic-gate -1, /* 035 (#) */ 1167c478bd9Sstevel@tonic-gate -1, /* 036 ($) */ 1177c478bd9Sstevel@tonic-gate -1, /* 037 (%) */ 1187c478bd9Sstevel@tonic-gate -1, /* 038 (&) */ 1197c478bd9Sstevel@tonic-gate 16, /* 039 (') */ 1207c478bd9Sstevel@tonic-gate -1, /* 040 (() */ 1217c478bd9Sstevel@tonic-gate -1, /* 041 ()) */ 1227c478bd9Sstevel@tonic-gate 28, /* 042 (*) */ 1237c478bd9Sstevel@tonic-gate 31, /* 043 (+) */ 1247c478bd9Sstevel@tonic-gate 32, /* 044 (,) */ 1257c478bd9Sstevel@tonic-gate 36, /* 045 (-) */ 1267c478bd9Sstevel@tonic-gate 48, /* 046 (.) */ 1277c478bd9Sstevel@tonic-gate 49, /* 047 (/) */ 1287c478bd9Sstevel@tonic-gate 54, /* 048 (0) */ 1297c478bd9Sstevel@tonic-gate 57, /* 049 (1) */ 1307c478bd9Sstevel@tonic-gate 60, /* 050 (2) */ 1317c478bd9Sstevel@tonic-gate 61, /* 051 (3) */ 1327c478bd9Sstevel@tonic-gate 112, /* 052 (4) */ 1337c478bd9Sstevel@tonic-gate -1, /* 053 (5) */ 1347c478bd9Sstevel@tonic-gate -1, /* 054 (6) */ 1357c478bd9Sstevel@tonic-gate -1, /* 055 (7) */ 1367c478bd9Sstevel@tonic-gate -1, /* 056 (8) */ 1377c478bd9Sstevel@tonic-gate -1, /* 057 (9) */ 1387c478bd9Sstevel@tonic-gate 112, /* 058 (:) */ 1397c478bd9Sstevel@tonic-gate -1, /* 059 (;) */ 1407c478bd9Sstevel@tonic-gate 63, /* 060 (<) */ 1417c478bd9Sstevel@tonic-gate -1, /* 061 (=) */ 1427c478bd9Sstevel@tonic-gate 64, /* 062 (>) */ 1437c478bd9Sstevel@tonic-gate 65, /* 063 (?) */ 1447c478bd9Sstevel@tonic-gate -1, /* 064 (@) */ 1457c478bd9Sstevel@tonic-gate 66, /* 065 (A) */ 1467c478bd9Sstevel@tonic-gate -1, /* 066 (B) */ 1477c478bd9Sstevel@tonic-gate 70, /* 067 (C) */ 1487c478bd9Sstevel@tonic-gate 112, /* 068 (D) */ 1497c478bd9Sstevel@tonic-gate 71, /* 069 (E) */ 1507c478bd9Sstevel@tonic-gate -1, /* 070 (F) */ 1517c478bd9Sstevel@tonic-gate -1, /* 071 (G) */ 1527c478bd9Sstevel@tonic-gate 73, /* 072 (H) */ 1537c478bd9Sstevel@tonic-gate 74, /* 073 (I) */ 1547c478bd9Sstevel@tonic-gate -1, /* 074 (J) */ 1557c478bd9Sstevel@tonic-gate -1, /* 075 (K) */ 1567c478bd9Sstevel@tonic-gate 112, /* 076 (L) */ 1577c478bd9Sstevel@tonic-gate -1, /* 077 (M) */ 1587c478bd9Sstevel@tonic-gate 76, /* 078 (N) */ 1597c478bd9Sstevel@tonic-gate 77, /* 079 (O) */ 1607c478bd9Sstevel@tonic-gate 84, /* 080 (P) */ 1617c478bd9Sstevel@tonic-gate -1, /* 081 (Q) */ 1627c478bd9Sstevel@tonic-gate 112, /* 082 (R) */ 1637c478bd9Sstevel@tonic-gate 112, /* 083 (S) */ 1647c478bd9Sstevel@tonic-gate 112, /* 084 (T) */ 1657c478bd9Sstevel@tonic-gate 85, /* 085 (U) */ 1667c478bd9Sstevel@tonic-gate -1, /* 086 (V) */ 1677c478bd9Sstevel@tonic-gate -1, /* 087 (W) */ 1687c478bd9Sstevel@tonic-gate 112, /* 088 (X) */ 1697c478bd9Sstevel@tonic-gate 112, /* 089 (Y) */ 1707c478bd9Sstevel@tonic-gate -1, /* 090 (Z) */ 1717c478bd9Sstevel@tonic-gate -1, /* 091 ([) */ 1727c478bd9Sstevel@tonic-gate 87, /* 092 (\) */ 1737c478bd9Sstevel@tonic-gate -1, /* 093 (]) */ 1747c478bd9Sstevel@tonic-gate 88, /* 094 (^) */ 1757c478bd9Sstevel@tonic-gate 93, /* 095 (_) */ 1767c478bd9Sstevel@tonic-gate 94, /* 096 (`) */ 1777c478bd9Sstevel@tonic-gate 99, /* 097 (a) */ 1787c478bd9Sstevel@tonic-gate -1, /* 098 (b) */ 1797c478bd9Sstevel@tonic-gate 101, /* 099 (c) */ 1807c478bd9Sstevel@tonic-gate 112, /* 100 (d) */ 1817c478bd9Sstevel@tonic-gate 112, /* 101 (e) */ 1827c478bd9Sstevel@tonic-gate -1, /* 102 (f) */ 1837c478bd9Sstevel@tonic-gate -1, /* 103 (g) */ 1847c478bd9Sstevel@tonic-gate 102, /* 104 (h) */ 1857c478bd9Sstevel@tonic-gate 112, /* 105 (i) */ 1867c478bd9Sstevel@tonic-gate -1, /* 106 (j) */ 1877c478bd9Sstevel@tonic-gate -1, /* 107 (k) */ 1887c478bd9Sstevel@tonic-gate 112, /* 108 (l) */ 1897c478bd9Sstevel@tonic-gate -1, /* 109 (m) */ 1907c478bd9Sstevel@tonic-gate 103, /* 110 (n) */ 1917c478bd9Sstevel@tonic-gate 104, /* 111 (o) */ 1927c478bd9Sstevel@tonic-gate 108, /* 112 (p) */ 1937c478bd9Sstevel@tonic-gate -1, /* 113 (q) */ 1947c478bd9Sstevel@tonic-gate 112, /* 114 (r) */ 1957c478bd9Sstevel@tonic-gate 109, /* 115 (s) */ 1967c478bd9Sstevel@tonic-gate 112, /* 116 (t) */ 1977c478bd9Sstevel@tonic-gate 112, /* 117 (u) */ 1987c478bd9Sstevel@tonic-gate -1, /* 118 (v) */ 1997c478bd9Sstevel@tonic-gate -1, /* 119 (w) */ 2007c478bd9Sstevel@tonic-gate 110, /* 120 (x) */ 2017c478bd9Sstevel@tonic-gate 112, /* 121 (y) */ 2027c478bd9Sstevel@tonic-gate -1, /* 122 (z) */ 2037c478bd9Sstevel@tonic-gate -1, /* 123 ({) */ 2047c478bd9Sstevel@tonic-gate 111, /* 124 (|) */ 2057c478bd9Sstevel@tonic-gate -1, /* 125 (}) */ 2067c478bd9Sstevel@tonic-gate 112, /* 126 (~) */ 2077c478bd9Sstevel@tonic-gate -1, /* 127 (DEL) */ 2087c478bd9Sstevel@tonic-gate }; 2097c478bd9Sstevel@tonic-gate 2107c478bd9Sstevel@tonic-gate /* 2117c478bd9Sstevel@tonic-gate * IMPORTANT NOTE: This table MUST be kept in proper sorted order: 2127c478bd9Sstevel@tonic-gate * The first and second characters in each entry must be in ASCII 2137c478bd9Sstevel@tonic-gate * collating sequence (left to right). 2147c478bd9Sstevel@tonic-gate * The table must be in ASCII collating sequence by first character 2157c478bd9Sstevel@tonic-gate * (top to bottom). 2167c478bd9Sstevel@tonic-gate */ 2177c478bd9Sstevel@tonic-gate 218*adc2b73dSToomas Soome /* COMPOSE + first character + second character => UTF-8 character */ 2197c478bd9Sstevel@tonic-gate 2207c478bd9Sstevel@tonic-gate struct compose_sequence_t kb_compose_table[] = { 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate {' ', ' ', 0xA0}, /* 000 */ /* NBSP (non-breaking space) */ 2237c478bd9Sstevel@tonic-gate {'!', '!', 0xA1}, /* 001 */ /* inverted ! */ 2247c478bd9Sstevel@tonic-gate {'!', 'P', 0xB6}, /* 002 */ /* paragraph mark */ 2257c478bd9Sstevel@tonic-gate {'!', 'p', 0xB6}, /* 003 */ /* paragraph mark */ 2267c478bd9Sstevel@tonic-gate {'"', '"', 0xA8}, /* 004 */ /* diaresis */ 2277c478bd9Sstevel@tonic-gate {'"', 'A', 0xC4}, /* 005 */ /* A with diaresis */ 2287c478bd9Sstevel@tonic-gate {'"', 'E', 0xCB}, /* 006 */ /* E with diaresis */ 2297c478bd9Sstevel@tonic-gate {'"', 'I', 0xCF}, /* 007 */ /* I with diaresis */ 2307c478bd9Sstevel@tonic-gate {'"', 'O', 0xD6}, /* 008 */ /* O with diaresis */ 2317c478bd9Sstevel@tonic-gate {'"', 'U', 0xDC}, /* 009 */ /* U with diaresis */ 2327c478bd9Sstevel@tonic-gate {'"', 'a', 0xE4}, /* 010 */ /* a with diaresis */ 2337c478bd9Sstevel@tonic-gate {'"', 'e', 0xEB}, /* 011 */ /* e with diaresis */ 2347c478bd9Sstevel@tonic-gate {'"', 'i', 0xEF}, /* 012 */ /* i with diaresis */ 2357c478bd9Sstevel@tonic-gate {'"', 'o', 0xF6}, /* 013 */ /* o with diaresis */ 2367c478bd9Sstevel@tonic-gate {'"', 'u', 0xFC}, /* 014 */ /* u with diaresis */ 2377c478bd9Sstevel@tonic-gate {'"', 'y', 0xFF}, /* 015 */ /* y with diaresis */ 2387c478bd9Sstevel@tonic-gate {'\'', 'A', 0xC1}, /* 016 */ /* A with acute accent */ 2397c478bd9Sstevel@tonic-gate {'\'', 'E', 0xC9}, /* 017 */ /* E with acute accent */ 2407c478bd9Sstevel@tonic-gate {'\'', 'I', 0xCD}, /* 018 */ /* I with acute accent */ 2417c478bd9Sstevel@tonic-gate {'\'', 'O', 0xD3}, /* 019 */ /* O with acute accent */ 2427c478bd9Sstevel@tonic-gate {'\'', 'U', 0xDA}, /* 020 */ /* U with acute accent */ 2437c478bd9Sstevel@tonic-gate {'\'', 'Y', 0xDD}, /* 021 */ /* Y with acute accent */ 2447c478bd9Sstevel@tonic-gate {'\'', 'a', 0xE1}, /* 022 */ /* a with acute accent */ 2457c478bd9Sstevel@tonic-gate {'\'', 'e', 0xE9}, /* 023 */ /* e with acute accent */ 2467c478bd9Sstevel@tonic-gate {'\'', 'i', 0xED}, /* 024 */ /* i with acute accent */ 2477c478bd9Sstevel@tonic-gate {'\'', 'o', 0xF3}, /* 025 */ /* o with acute accent */ 2487c478bd9Sstevel@tonic-gate {'\'', 'u', 0xFA}, /* 026 */ /* u with acute accent */ 2497c478bd9Sstevel@tonic-gate {'\'', 'y', 0xFD}, /* 027 */ /* y with acute accent */ 2507c478bd9Sstevel@tonic-gate {'*', 'A', 0xC5}, /* 028 */ /* A with ring */ 2517c478bd9Sstevel@tonic-gate {'*', '^', 0xB0}, /* 029 */ /* degree */ 2527c478bd9Sstevel@tonic-gate {'*', 'a', 0xE5}, /* 030 */ /* a with ring */ 2537c478bd9Sstevel@tonic-gate {'+', '-', 0xB1}, /* 031 */ /* plus/minus */ 2547c478bd9Sstevel@tonic-gate {',', ',', 0xB8}, /* 032 */ /* cedilla */ 2557c478bd9Sstevel@tonic-gate {',', '-', 0xAC}, /* 033 */ /* not sign */ 2567c478bd9Sstevel@tonic-gate {',', 'C', 0xC7}, /* 034 */ /* C with cedilla */ 2577c478bd9Sstevel@tonic-gate {',', 'c', 0xE7}, /* 035 */ /* c with cedilla */ 2587c478bd9Sstevel@tonic-gate {'-', '-', 0xAD}, /* 036 */ /* soft hyphen */ 2597c478bd9Sstevel@tonic-gate {'-', ':', 0xF7}, /* 037 */ /* division sign */ 2607c478bd9Sstevel@tonic-gate {'-', 'A', 0xAA}, /* 038 */ /* feminine superior numeral */ 2617c478bd9Sstevel@tonic-gate {'-', 'D', 0xD0}, /* 039 */ /* Upper-case eth */ 2627c478bd9Sstevel@tonic-gate {'-', 'L', 0xA3}, /* 040 */ /* pounds sterling */ 2637c478bd9Sstevel@tonic-gate {'-', 'Y', 0xA5}, /* 041 */ /* yen */ 2647c478bd9Sstevel@tonic-gate {'-', '^', 0xAF}, /* 042 */ /* macron */ 2657c478bd9Sstevel@tonic-gate {'-', 'a', 0xAA}, /* 043 */ /* feminine superior numeral */ 2667c478bd9Sstevel@tonic-gate {'-', 'd', 0xF0}, /* 044 */ /* Lower-case eth */ 2677c478bd9Sstevel@tonic-gate {'-', 'l', 0xA3}, /* 045 */ /* pounds sterling */ 2687c478bd9Sstevel@tonic-gate {'-', 'y', 0xA5}, /* 046 */ /* yen */ 2697c478bd9Sstevel@tonic-gate {'-', '|', 0xAC}, /* 047 */ /* not sign */ 2707c478bd9Sstevel@tonic-gate {'.', '^', 0xB7}, /* 048 */ /* centered dot */ 2717c478bd9Sstevel@tonic-gate {'/', 'C', 0xA2}, /* 049 */ /* cent sign */ 2727c478bd9Sstevel@tonic-gate {'/', 'O', 0xD8}, /* 050 */ /* O with slash */ 2737c478bd9Sstevel@tonic-gate {'/', 'c', 0xA2}, /* 051 */ /* cent sign */ 2747c478bd9Sstevel@tonic-gate {'/', 'o', 0xF8}, /* 052 */ /* o with slash */ 2757c478bd9Sstevel@tonic-gate {'/', 'u', 0xB5}, /* 053 */ /* mu */ 2767c478bd9Sstevel@tonic-gate {'0', 'X', 0xA4}, /* 054 */ /* currency symbol */ 2777c478bd9Sstevel@tonic-gate {'0', '^', 0xB0}, /* 055 */ /* degree */ 2787c478bd9Sstevel@tonic-gate {'0', 'x', 0xA4}, /* 056 */ /* currency symbol */ 2797c478bd9Sstevel@tonic-gate {'1', '2', 0xBD}, /* 057 */ /* 1/2 */ 2807c478bd9Sstevel@tonic-gate {'1', '4', 0xBC}, /* 058 */ /* 1/4 */ 2817c478bd9Sstevel@tonic-gate {'1', '^', 0xB9}, /* 059 */ /* superior '1' */ 2827c478bd9Sstevel@tonic-gate {'2', '^', 0xB2}, /* 060 */ /* superior '2' */ 2837c478bd9Sstevel@tonic-gate {'3', '4', 0xBE}, /* 061 */ /* 3/4 */ 2847c478bd9Sstevel@tonic-gate {'3', '^', 0xB3}, /* 062 */ /* superior '3' */ 2857c478bd9Sstevel@tonic-gate {'<', '<', 0xAB}, /* 063 */ /* left guillemot */ 2867c478bd9Sstevel@tonic-gate {'>', '>', 0xBB}, /* 064 */ /* right guillemot */ 2877c478bd9Sstevel@tonic-gate {'?', '?', 0xBF}, /* 065 */ /* inverted ? */ 2887c478bd9Sstevel@tonic-gate {'A', 'E', 0xC6}, /* 066 */ /* AE dipthong */ 2897c478bd9Sstevel@tonic-gate {'A', '^', 0xC2}, /* 067 */ /* A with circumflex accent */ 2907c478bd9Sstevel@tonic-gate {'A', '`', 0xC0}, /* 068 */ /* A with grave accent */ 2917c478bd9Sstevel@tonic-gate {'A', '~', 0xC3}, /* 069 */ /* A with tilde */ 2927c478bd9Sstevel@tonic-gate {'C', 'O', 0xA9}, /* 060 */ /* copyright */ 2937c478bd9Sstevel@tonic-gate {'E', '^', 0xCA}, /* 071 */ /* E with circumflex accent */ 2947c478bd9Sstevel@tonic-gate {'E', '`', 0xC8}, /* 072 */ /* E with grave accent */ 2957c478bd9Sstevel@tonic-gate {'H', 'T', 0xDE}, /* 073 */ /* Upper-case thorn */ 2967c478bd9Sstevel@tonic-gate {'I', '^', 0xCE}, /* 074 */ /* I with circumflex accent */ 2977c478bd9Sstevel@tonic-gate {'I', '`', 0xCC}, /* 075 */ /* I with grave accent */ 2987c478bd9Sstevel@tonic-gate {'N', '~', 0xD1}, /* 076 */ /* N with tilde */ 2997c478bd9Sstevel@tonic-gate {'O', 'R', 0xAE}, /* 077 */ /* registered */ 3007c478bd9Sstevel@tonic-gate {'O', 'S', 0xA7}, /* 078 */ /* section mark */ 3017c478bd9Sstevel@tonic-gate {'O', 'X', 0xA4}, /* 079 */ /* currency symbol */ 3027c478bd9Sstevel@tonic-gate {'O', '^', 0xD4}, /* 080 */ /* O with circumflex accent */ 3037c478bd9Sstevel@tonic-gate {'O', '_', 0xBA}, /* 081 */ /* masculine superior numeral */ 3047c478bd9Sstevel@tonic-gate {'O', '`', 0xD2}, /* 082 */ /* O with grave accent */ 3057c478bd9Sstevel@tonic-gate {'O', '~', 0xD5}, /* 083 */ /* O with tilde */ 3067c478bd9Sstevel@tonic-gate {'P', '|', 0xDE}, /* 084 */ /* Upper-case thorn */ 3077c478bd9Sstevel@tonic-gate {'U', '^', 0xDB}, /* 085 */ /* U with circumflex accent */ 3087c478bd9Sstevel@tonic-gate {'U', '`', 0xD9}, /* 086 */ /* U with grave accent */ 3097c478bd9Sstevel@tonic-gate {'\\', '\\', 0xB4}, /* 087 */ /* acute accent */ 3107c478bd9Sstevel@tonic-gate {'^', 'a', 0xE2}, /* 088 */ /* a with circumflex accent */ 3117c478bd9Sstevel@tonic-gate {'^', 'e', 0xEA}, /* 089 */ /* e with circumflex accent */ 3127c478bd9Sstevel@tonic-gate {'^', 'i', 0xEE}, /* 090 */ /* i with circumflex accent */ 3137c478bd9Sstevel@tonic-gate {'^', 'o', 0xF4}, /* 091 */ /* o with circumflex accent */ 3147c478bd9Sstevel@tonic-gate {'^', 'u', 0xFB}, /* 092 */ /* u with circumflex accent */ 3157c478bd9Sstevel@tonic-gate {'_', 'o', 0xBA}, /* 093 */ /* masculine superior numeral */ 3167c478bd9Sstevel@tonic-gate {'`', 'a', 0xE0}, /* 094 */ /* a with grave accent */ 3177c478bd9Sstevel@tonic-gate {'`', 'e', 0xE8}, /* 095 */ /* e with grave accent */ 3187c478bd9Sstevel@tonic-gate {'`', 'i', 0xEC}, /* 096 */ /* i with grave accent */ 3197c478bd9Sstevel@tonic-gate {'`', 'o', 0xF2}, /* 097 */ /* o with grave accent */ 3207c478bd9Sstevel@tonic-gate {'`', 'u', 0xF9}, /* 098 */ /* u with grave accent */ 3217c478bd9Sstevel@tonic-gate {'a', 'e', 0xE6}, /* 099 */ /* ae dipthong */ 3227c478bd9Sstevel@tonic-gate {'a', '~', 0xE3}, /* 100 */ /* a with tilde */ 3237c478bd9Sstevel@tonic-gate {'c', 'o', 0xA9}, /* 101 */ /* copyright */ 3247c478bd9Sstevel@tonic-gate {'h', 't', 0xFE}, /* 102 */ /* Lower-case thorn */ 3257c478bd9Sstevel@tonic-gate {'n', '~', 0xF1}, /* 103 */ /* n with tilde */ 3267c478bd9Sstevel@tonic-gate {'o', 'r', 0xAE}, /* 104 */ /* registered */ 3277c478bd9Sstevel@tonic-gate {'o', 's', 0xA7}, /* 105 */ /* section mark */ 3287c478bd9Sstevel@tonic-gate {'o', 'x', 0xA4}, /* 106 */ /* currency symbol */ 3297c478bd9Sstevel@tonic-gate {'o', '~', 0xF5}, /* 107 */ /* o with tilde */ 3307c478bd9Sstevel@tonic-gate {'p', '|', 0xFE}, /* 108 */ /* Lower-case thorn */ 3317c478bd9Sstevel@tonic-gate {'s', 's', 0xDF}, /* 109 */ /* German double-s */ 3327c478bd9Sstevel@tonic-gate {'x', 'x', 0xD7}, /* 110 */ /* multiplication sign */ 3337c478bd9Sstevel@tonic-gate {'|', '|', 0xA6}, /* 111 */ /* broken bar */ 3347c478bd9Sstevel@tonic-gate 3357c478bd9Sstevel@tonic-gate {0, 0, 0}, /* end of table */ 3367c478bd9Sstevel@tonic-gate }; 3377c478bd9Sstevel@tonic-gate 3387c478bd9Sstevel@tonic-gate /* 3397c478bd9Sstevel@tonic-gate * Floating Accent Sequence Table 3407c478bd9Sstevel@tonic-gate */ 3417c478bd9Sstevel@tonic-gate 342*adc2b73dSToomas Soome /* FA + ASCII character => UTF-8 character */ 3437c478bd9Sstevel@tonic-gate struct fltaccent_sequence_t kb_fltaccent_table[] = { 3447c478bd9Sstevel@tonic-gate 345*adc2b73dSToomas Soome {FA_UMLAUT, ' ', 0xA8}, /* umlaut/diaresis */ 3467c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'A', 0xC4}, /* A with umlaut */ 3477c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'E', 0xCB}, /* E with umlaut */ 3487c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'I', 0xCF}, /* I with umlaut */ 3497c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'O', 0xD6}, /* O with umlaut */ 3507c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'U', 0xDC}, /* U with umlaut */ 3517c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'a', 0xE4}, /* a with umlaut */ 3527c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'e', 0xEB}, /* e with umlaut */ 3537c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'i', 0xEF}, /* i with umlaut */ 3547c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'o', 0xF6}, /* o with umlaut */ 3557c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'u', 0xFC}, /* u with umlaut */ 3567c478bd9Sstevel@tonic-gate {FA_UMLAUT, 'y', 0xFF}, /* y with umlaut */ 3577c478bd9Sstevel@tonic-gate 3587c478bd9Sstevel@tonic-gate {FA_CFLEX, 'A', 0xC2}, /* A with circumflex */ 3597c478bd9Sstevel@tonic-gate {FA_CFLEX, 'E', 0xCA}, /* E with circumflex */ 3607c478bd9Sstevel@tonic-gate {FA_CFLEX, 'I', 0xCE}, /* I with circumflex */ 3617c478bd9Sstevel@tonic-gate {FA_CFLEX, 'O', 0xD4}, /* O with circumflex */ 3627c478bd9Sstevel@tonic-gate {FA_CFLEX, 'U', 0xDB}, /* U with circumflex */ 3637c478bd9Sstevel@tonic-gate {FA_CFLEX, 'a', 0xE2}, /* a with circumflex */ 3647c478bd9Sstevel@tonic-gate {FA_CFLEX, 'e', 0xEA}, /* e with circumflex */ 3657c478bd9Sstevel@tonic-gate {FA_CFLEX, 'i', 0xEE}, /* i with circumflex */ 3667c478bd9Sstevel@tonic-gate {FA_CFLEX, 'o', 0xF4}, /* o with circumflex */ 3677c478bd9Sstevel@tonic-gate {FA_CFLEX, 'u', 0xFB}, /* u with circumflex */ 3687c478bd9Sstevel@tonic-gate 369*adc2b73dSToomas Soome {FA_TILDE, ' ', '~'}, /* tilde */ 3707c478bd9Sstevel@tonic-gate {FA_TILDE, 'A', 0xC3}, /* A with tilde */ 3717c478bd9Sstevel@tonic-gate {FA_TILDE, 'N', 0xD1}, /* N with tilde */ 3727c478bd9Sstevel@tonic-gate {FA_TILDE, 'O', 0xD5}, /* O with tilde */ 3737c478bd9Sstevel@tonic-gate {FA_TILDE, 'a', 0xE3}, /* a with tilde */ 3747c478bd9Sstevel@tonic-gate {FA_TILDE, 'n', 0xF1}, /* n with tilde */ 3757c478bd9Sstevel@tonic-gate {FA_TILDE, 'o', 0xF5}, /* o with tilde */ 3767c478bd9Sstevel@tonic-gate 377*adc2b73dSToomas Soome {FA_CEDILLA, ' ', 0xB8}, /* cedilla */ 3787c478bd9Sstevel@tonic-gate {FA_CEDILLA, 'C', 0xC7}, /* C with cedilla */ 3797c478bd9Sstevel@tonic-gate {FA_CEDILLA, 'c', 0xE7}, /* c with cedilla */ 3807c478bd9Sstevel@tonic-gate 381*adc2b73dSToomas Soome {FA_ACUTE, ' ', '\''}, /* apostrophe */ 3827c478bd9Sstevel@tonic-gate {FA_ACUTE, 'A', 0xC1}, /* A with acute accent */ 3837c478bd9Sstevel@tonic-gate {FA_ACUTE, 'E', 0xC9}, /* E with acute accent */ 3847c478bd9Sstevel@tonic-gate {FA_ACUTE, 'I', 0xCD}, /* I with acute accent */ 3857c478bd9Sstevel@tonic-gate {FA_ACUTE, 'O', 0xD3}, /* O with acute accent */ 3867c478bd9Sstevel@tonic-gate {FA_ACUTE, 'U', 0xDA}, /* U with acute accent */ 3877c478bd9Sstevel@tonic-gate {FA_ACUTE, 'a', 0xE1}, /* a with acute accent */ 3887c478bd9Sstevel@tonic-gate {FA_ACUTE, 'e', 0xE9}, /* e with acute accent */ 3897c478bd9Sstevel@tonic-gate {FA_ACUTE, 'i', 0xED}, /* i with acute accent */ 3907c478bd9Sstevel@tonic-gate {FA_ACUTE, 'o', 0xF3}, /* o with acute accent */ 3917c478bd9Sstevel@tonic-gate {FA_ACUTE, 'u', 0xFA}, /* u with acute accent */ 3927c478bd9Sstevel@tonic-gate {FA_ACUTE, 'y', 0xFD}, /* y with acute accent */ 3937c478bd9Sstevel@tonic-gate 394*adc2b73dSToomas Soome {FA_GRAVE, ' ', '`'}, /* grave accent */ 3957c478bd9Sstevel@tonic-gate {FA_GRAVE, 'A', 0xC0}, /* A with grave accent */ 3967c478bd9Sstevel@tonic-gate {FA_GRAVE, 'E', 0xC8}, /* E with grave accent */ 3977c478bd9Sstevel@tonic-gate {FA_GRAVE, 'I', 0xCC}, /* I with grave accent */ 3987c478bd9Sstevel@tonic-gate {FA_GRAVE, 'O', 0xD2}, /* O with grave accent */ 3997c478bd9Sstevel@tonic-gate {FA_GRAVE, 'U', 0xD9}, /* U with grave accent */ 4007c478bd9Sstevel@tonic-gate {FA_GRAVE, 'a', 0xE0}, /* a with grave accent */ 4017c478bd9Sstevel@tonic-gate {FA_GRAVE, 'e', 0xE8}, /* e with grave accent */ 4027c478bd9Sstevel@tonic-gate {FA_GRAVE, 'i', 0xEC}, /* i with grave accent */ 4037c478bd9Sstevel@tonic-gate {FA_GRAVE, 'o', 0xF2}, /* o with grave accent */ 4047c478bd9Sstevel@tonic-gate {FA_GRAVE, 'u', 0xF9}, /* u with grave accent */ 4057c478bd9Sstevel@tonic-gate 406*adc2b73dSToomas Soome {FA_MACRON, ' ', 0xAF}, /* macron */ 407*adc2b73dSToomas Soome 408*adc2b73dSToomas Soome {FA_BREVE, ' ', 0x306}, /* combining breve */ 409*adc2b73dSToomas Soome 410*adc2b73dSToomas Soome {FA_DOT, ' ', 0x307}, /* combining dot above */ 411*adc2b73dSToomas Soome 412*adc2b73dSToomas Soome {FA_SLASH, 0, 0}, /* slash, invalid entry */ 413*adc2b73dSToomas Soome 414*adc2b73dSToomas Soome {FA_RING, ' ', 0x30A}, /* combining ring above */ 415*adc2b73dSToomas Soome 416*adc2b73dSToomas Soome {FA_APOSTROPHE, ' ', '\''}, /* apostrophe */ 417*adc2b73dSToomas Soome 418*adc2b73dSToomas Soome {FA_DACUTE, ' ', 0x30B}, /* combining double acute */ 419*adc2b73dSToomas Soome 420*adc2b73dSToomas Soome {FA_OGONEK, ' ', 0x328}, /* combining ogonek */ 421*adc2b73dSToomas Soome 422*adc2b73dSToomas Soome {FA_CARON, ' ', 0x2C7}, /* caron */ 423*adc2b73dSToomas Soome {FA_CARON, 'C', 0x10C}, /* C with caron */ 424*adc2b73dSToomas Soome {FA_CARON, 'S', 0x160}, /* S with caron */ 425*adc2b73dSToomas Soome {FA_CARON, 'Z', 0x17D}, /* Z with caron */ 426*adc2b73dSToomas Soome {FA_CARON, 'c', 0x10D}, /* c with caron */ 427*adc2b73dSToomas Soome {FA_CARON, 's', 0x161}, /* s with caron */ 428*adc2b73dSToomas Soome {FA_CARON, 'z', 0x17E}, /* z with caron */ 429*adc2b73dSToomas Soome 4307c478bd9Sstevel@tonic-gate {0, 0, 0}, /* end of table */ 4317c478bd9Sstevel@tonic-gate }; 4327c478bd9Sstevel@tonic-gate 4337c478bd9Sstevel@tonic-gate /* 4347c478bd9Sstevel@tonic-gate * Num Lock Table 4357c478bd9Sstevel@tonic-gate */ 4367c478bd9Sstevel@tonic-gate 4377c478bd9Sstevel@tonic-gate /* Num Lock: pad key entry & 0x1F => ASCII character */ 4387c478bd9Sstevel@tonic-gate uchar_t kb_numlock_table[] = { 4397c478bd9Sstevel@tonic-gate '=', 4407c478bd9Sstevel@tonic-gate '/', 4417c478bd9Sstevel@tonic-gate '*', 4427c478bd9Sstevel@tonic-gate '-', 4437c478bd9Sstevel@tonic-gate ',', 4447c478bd9Sstevel@tonic-gate 4457c478bd9Sstevel@tonic-gate '7', 4467c478bd9Sstevel@tonic-gate '8', 4477c478bd9Sstevel@tonic-gate '9', 4487c478bd9Sstevel@tonic-gate '+', 4497c478bd9Sstevel@tonic-gate 4507c478bd9Sstevel@tonic-gate '4', 4517c478bd9Sstevel@tonic-gate '5', 4527c478bd9Sstevel@tonic-gate '6', 4537c478bd9Sstevel@tonic-gate 4547c478bd9Sstevel@tonic-gate '1', 4557c478bd9Sstevel@tonic-gate '2', 4567c478bd9Sstevel@tonic-gate '3', 4577c478bd9Sstevel@tonic-gate 4587c478bd9Sstevel@tonic-gate '0', 4597c478bd9Sstevel@tonic-gate '.', 4607c478bd9Sstevel@tonic-gate '\n', /* Enter */ 4617c478bd9Sstevel@tonic-gate }; 462