2 Copyright 2018 Jun Wako <wakojun@gmail.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include <avr/pgmspace.h>
25 /* Mapping PC88 scan codes to UNIMAP layout codes
28 * ,---. ,---. ,------------------------. ,------------------------. ,-------.
29 * | 60| | 61| | 62 | 63 | 64 | 65 | 66 | | 67 | 68 | 69 | 6A | 6B | | 36| 37|
30 * `---' `---' `------------------------' `------------------------' `-------'
31 * ,---------------------------------------------------------------. ,-------. ,---------------.
32 * | 00 | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E | | 38| 39| | 3E| 3F| 4D| 41|
33 * |---------------------------------------------------------------| `-------' |---------------|
34 * | 0F | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| | | 42| 43| 44| 45|
35 * |--------------------------------------------------------` 1C | ,-------. |---------------|
36 * | 74| 71| 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| | | 3A | | 46| 47| 48| 49|
37 * |---------------------------------------------------------------| |-------| |---------------|
38 * | 70 | 29| 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 78 | | 3B| 3C| | 4A| 4B| 4C| 4D|
39 * `---------------------------------------------------------------' |-------| |---------------|
40 * | 72| 73| 51 | 34 | 35 | 7A| 7B| | 3D | | 4E| 4F| 50| 79|
41 * `-------------------------------------------' `-------' `---------------'
45 const uint8_t PROGMEM unimap_trans[MATRIX_ROWS][MATRIX_COLS] = {
46 { UNIMAP_ESC, UNIMAP_1, UNIMAP_2, UNIMAP_3, UNIMAP_4, UNIMAP_5, UNIMAP_6, UNIMAP_7 }, /* 00-07 */
47 { UNIMAP_8, UNIMAP_9, UNIMAP_0, UNIMAP_MINS, UNIMAP_EQL, UNIMAP_JYEN, UNIMAP_BSPC, UNIMAP_TAB }, /* 08-0F */
48 { UNIMAP_Q, UNIMAP_W, UNIMAP_E, UNIMAP_R, UNIMAP_T, UNIMAP_Y, UNIMAP_U, UNIMAP_I }, /* 10-17 */
49 { UNIMAP_O, UNIMAP_P, UNIMAP_LBRC, UNIMAP_RBRC, UNIMAP_ENT, UNIMAP_A, UNIMAP_S, UNIMAP_D }, /* 18-1F */
50 { UNIMAP_F, UNIMAP_G, UNIMAP_H, UNIMAP_J, UNIMAP_K, UNIMAP_L, UNIMAP_SCLN, UNIMAP_QUOT }, /* 20-27 */
51 { UNIMAP_BSLS, UNIMAP_Z, UNIMAP_X, UNIMAP_C, UNIMAP_V, UNIMAP_B, UNIMAP_N, UNIMAP_M }, /* 28-2F */
52 { UNIMAP_COMM, UNIMAP_DOT, UNIMAP_SLSH, UNIMAP_RO, UNIMAP_SPC, UNIMAP_HENK, UNIMAP_PGDN, UNIMAP_PGUP }, /* 30-37 */
53 { UNIMAP_INS, UNIMAP_DEL, UNIMAP_UP, UNIMAP_LEFT, UNIMAP_RGHT, UNIMAP_DOWN, UNIMAP_HOME, UNIMAP_END }, /* 38-3F */
54 { UNIMAP_PMNS, UNIMAP_PSLS, UNIMAP_P7, UNIMAP_P8, UNIMAP_P9, UNIMAP_PAST, UNIMAP_P4, UNIMAP_P5 }, /* 40-47 */
55 { UNIMAP_P6, UNIMAP_PPLS, UNIMAP_P1, UNIMAP_P2, UNIMAP_P3, UNIMAP_PEQL, UNIMAP_P0, UNIMAP_PCMM }, /* 48-4F */
56 { UNIMAP_PDOT, UNIMAP_MHEN, UNIMAP_F11, UNIMAP_F12, UNIMAP_F13, UNIMAP_F14, UNIMAP_F15, UNIMAP_NO }, /* 50-57 */
57 { UNIMAP_F21, UNIMAP_F22, UNIMAP_F23, UNIMAP_F24, UNIMAP_NO, UNIMAP_NO, UNIMAP_APP, UNIMAP_NO }, /* 58-5F */
58 { UNIMAP_PAUS, UNIMAP_PSCR, UNIMAP_F1, UNIMAP_F2, UNIMAP_F3, UNIMAP_F4, UNIMAP_F5, UNIMAP_F6 }, /* 60-67 */
59 { UNIMAP_F7, UNIMAP_F8, UNIMAP_F9, UNIMAP_F10, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO }, /* 68-6F */
60 { UNIMAP_LSFT, UNIMAP_CAPS, UNIMAP_KANA, UNIMAP_LALT, UNIMAP_LCTL, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO }, /* 70-77 */
61 { UNIMAP_RSFT, UNIMAP_PENT, UNIMAP_RGUI, UNIMAP_GRV, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO, UNIMAP_NO } /* 78-7F */