From 52ecc76e28bbcde9e35d35eb48a4d5b78aa204e2 Mon Sep 17 00:00:00 2001 From: Yann Hodique Date: Thu, 11 Oct 2018 15:26:56 -0700 Subject: [PATCH] port sun_usb converter from tmk initial import --- keyboards/converter/sun_usb/command_extra.c | 64 ++++++ keyboards/converter/sun_usb/config.h | 88 ++++++++ keyboards/converter/sun_usb/led.c | 32 +++ keyboards/converter/sun_usb/matrix.c | 197 ++++++++++++++++++ keyboards/converter/sun_usb/readme.md | 89 ++++++++ keyboards/converter/sun_usb/rules.mk | 42 ++++ .../sun_usb/type3/keymaps/default/keymap.c | 29 +++ keyboards/converter/sun_usb/type3/rules.mk | 0 keyboards/converter/sun_usb/type3/type3.h | 66 ++++++ .../sun_usb/type5/keymaps/default/keymap.c | 30 +++ keyboards/converter/sun_usb/type5/rules.mk | 0 keyboards/converter/sun_usb/type5/type5.h | 148 +++++++++++++ 12 files changed, 785 insertions(+) create mode 100644 keyboards/converter/sun_usb/command_extra.c create mode 100644 keyboards/converter/sun_usb/config.h create mode 100644 keyboards/converter/sun_usb/led.c create mode 100644 keyboards/converter/sun_usb/matrix.c create mode 100644 keyboards/converter/sun_usb/readme.md create mode 100644 keyboards/converter/sun_usb/rules.mk create mode 100644 keyboards/converter/sun_usb/type3/keymaps/default/keymap.c create mode 100644 keyboards/converter/sun_usb/type3/rules.mk create mode 100644 keyboards/converter/sun_usb/type3/type3.h create mode 100644 keyboards/converter/sun_usb/type5/keymaps/default/keymap.c create mode 100644 keyboards/converter/sun_usb/type5/rules.mk create mode 100644 keyboards/converter/sun_usb/type5/type5.h diff --git a/keyboards/converter/sun_usb/command_extra.c b/keyboards/converter/sun_usb/command_extra.c new file mode 100644 index 0000000000..756a9160bb --- /dev/null +++ b/keyboards/converter/sun_usb/command_extra.c @@ -0,0 +1,64 @@ +#include QMK_KEYBOARD_H +#include "protocol/serial.h" + +bool sun_bell = false; +bool sun_click = false; + + +bool command_extra(uint8_t code) +{ + switch (code) { + case KC_H: + case KC_SLASH: /* ? */ + print("\n\n----- Sun converter Help -----\n"); + print("Home: Toggle Bell\n"); + print("End: Toggle Click\n"); + print("PgUp: LED all On\n"); + print("PgDown: LED all Off\n"); + print("Insert: Layout\n"); + print("Delete: Reset\n"); + return false; + case KC_DEL: + print("Reset\n"); + serial_send(0x01); + break; + case KC_HOME: + sun_bell = !sun_bell; + if (sun_bell) { + print("Bell On\n"); + serial_send(0x02); + } else { + print("Bell Off\n"); + serial_send(0x03); + } + break; + case KC_END: + sun_click = !sun_click; + if (sun_click) { + print("Click On\n"); + serial_send(0x0A); + } else { + print("Click Off\n"); + serial_send(0x0B); + } + break; + case KC_PGUP: + print("LED all on\n"); + serial_send(0x0E); + serial_send(0xFF); + break; + case KC_PGDOWN: + print("LED all off\n"); + serial_send(0x0E); + serial_send(0x00); + break; + case KC_INSERT: + print("layout\n"); + serial_send(0x0F); + break; + default: + xprintf("Unknown extra command: %02X\n", code); + return false; + } + return true; +} diff --git a/keyboards/converter/sun_usb/config.h b/keyboards/converter/sun_usb/config.h new file mode 100644 index 0000000000..f7ad416393 --- /dev/null +++ b/keyboards/converter/sun_usb/config.h @@ -0,0 +1,88 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define CUSTOM_MATRIX 2 + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3333 +#define DEVICE_VER 0x0100 +#define MANUFACTURER QMK +#define PRODUCT Sun keyboard converter +#define DESCRIPTION USB converter for Sun type 5 keyboard + +/* matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ + keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + +/* Serial(USART) configuration + * asynchronous, negative logic, 1200baud, no flow control + * 1-start bit, 8-data bit, non parity, 1-stop bit + */ +#define SERIAL_SOFT_BAUD 1200 +#define SERIAL_SOFT_PARITY_NONE +#define SERIAL_SOFT_BIT_ORDER_LSB +#define SERIAL_SOFT_LOGIC_NEGATIVE +/* RXD Port */ +#define SERIAL_SOFT_RXD_ENABLE +#define SERIAL_SOFT_RXD_DDR DDRD +#define SERIAL_SOFT_RXD_PORT PORTD +#define SERIAL_SOFT_RXD_PIN PIND +#define SERIAL_SOFT_RXD_BIT 2 +#define SERIAL_SOFT_RXD_VECT INT2_vect +/* RXD Interupt */ +#define SERIAL_SOFT_RXD_INIT() do { \ + /* pin configuration: input with pull-up */ \ + SERIAL_SOFT_RXD_DDR &= ~(1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "protocol/serial.h" + +void led_set(uint8_t usb_led) +{ + uint8_t sun_led = 0; + if (usb_led & (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "protocol/serial.h" + +/* + * Matrix Array usage: + * + * ROW: 16(4bits) + * COL: 8(3bits) + * + * 8bit wide + * +---------+ + * 0|00 ... 07| + * 1|08 ... 0F| + * :| ... | + * :| ... | + * E|70 ... 77| + * F|78 ... 7F| + * +---------+ + */ +static uint8_t matrix[MATRIX_ROWS]; +#define ROW(code) ((code>>3)&0xF) +#define COL(code) (code&0x07) + +static bool is_modified = false; + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + /* DDRD |= (1<<6); */ + /* PORTD |= (1<<6); */ + debug_enable = true; + + serial_init(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; + + /* // wait for keyboard coming up */ + /* // otherwise LED status update fails */ + /* print("Reseting "); */ + /* while (1) { */ + /* print("."); */ + /* while (serial_recv()); */ + /* serial_send(0x01); */ + /* _delay_ms(500); */ + /* if (serial_recv() == 0xFF) { */ + /* _delay_ms(500); */ + /* if (serial_recv() == 0x04) */ + /* break; */ + /* } */ + /* } */ + /* print(" Done\n"); */ + + /* PORTD &= ~(1<<6); */ + + matrix_init_quantum(); + return; +} + +uint8_t matrix_scan(void) +{ + uint8_t code; + code = serial_recv(); + if (!code) return 0; + + debug_hex(code); debug(" "); + + switch (code) { + case 0xFF: // reset success: FF 04 + print("reset: "); + _delay_ms(500); + code = serial_recv(); + xprintf("%02X\n", code); + if (code == 0x04) { + // LED status + led_set(host_keyboard_leds()); + } + return 0; + case 0xFE: // layout: FE + print("layout: "); + _delay_ms(500); + xprintf("%02X\n", serial_recv()); + return 0; + case 0x7E: // reset fail: 7E 01 + print("reset fail: "); + _delay_ms(500); + xprintf("%02X\n", serial_recv()); + return 0; + case 0x7F: + // all keys up + for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; + return 0; + } + + if (code&0x80) { + // break code + if (matrix_is_on(ROW(code), COL(code))) { + matrix[ROW(code)] &= ~(1< + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_F10,KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, + KC_F12,KC_F13, KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSLS,KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, + KC_F14,KC_F15, KC_TAB, KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P, KC_LBRC,KC_RBRC, KC_DEL, KC_HOME, KC_UP, KC_PGUP, + KC_F16,KC_F17, KC_LCTL, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_LEFT,KC_INSERT,KC_RIGHT, + KC_F18,KC_F19, KC_LSFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_RCTL, KC_END, KC_DOWN,KC_PGDOWN, + KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI + ), +}; diff --git a/keyboards/converter/sun_usb/type3/rules.mk b/keyboards/converter/sun_usb/type3/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/converter/sun_usb/type3/type3.h b/keyboards/converter/sun_usb/type3/type3.h new file mode 100644 index 0000000000..f6f14f4eff --- /dev/null +++ b/keyboards/converter/sun_usb/type3/type3.h @@ -0,0 +1,66 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef TYPE3_H +#define TYPE3_H + +#include "quantum.h" + +/* Sun type 3 keyboard +,-------. ,-----------------------------------------------------------. ,-----------. +| 01| 03| | 05| 06| 08| 0A| 0C| 0E| 10| 11| 12| 2B| | 15| 16| 17| +|-------| |-----------------------------------------------------------| |-----------| +| 19| 1A| | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A| | 2D| 2E| 2F| +|-------| |-----------------------------------------------------------| |-----------| +| 31| 33| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 42 | | 44| 45| 46| +|-------| |-----------------------------------------------------------| |-----------| +| 48| 49| | 4C | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D| +|-------| |-----------------------------------------------------------| |-----------| +| 5F| 61| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E| 6F| | 70| 71| 72| +`-------' |-----------------------------------------------------------| `-----------' + | 77 | 78 | 79 | 7A | 13 | + `-----------------------------------------------------------' +*/ + + +#define LAYOUT( \ + K01,K03, K05,K06, K08, K0A, K0C, K0E, K10,K11,K12,K2B, K15,K16,K17, \ + K19,K1A, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2D,K2E,K2F, \ + K31,K33, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K42, K44,K45,K46, \ + K48,K49, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ + K5F,K61, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E,K6F, K70,K71,K72, \ + K77,K78, K79, K7A,K13 \ +) { \ + { KC_NO, K01 , KC_NO, K03 , KC_NO, K05 , K06 , KC_NO }, \ + { K08 , KC_NO, K0A , KC_NO, K0C , KC_NO, K0E , KC_NO }, \ + { K10 , K11 , K12 , K13 , KC_NO, K15 , K16 , K17 }, \ + { KC_NO, K19 , K1A , KC_NO, KC_NO, K1D , K1E , K1F }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ + { K28 , K29 , K2A , K2B , KC_NO, K2D , K2E , K2F }, \ + { KC_NO, K31 , KC_NO, K33 , KC_NO, K35 , K36 , K37 }, \ + { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ + { K40 , K41 , K42 , KC_NO, K44 , K45 , K46 , KC_NO }, \ + { K48 , K49 , KC_NO, KC_NO, K4C , K4D , K4E , K4F }, \ + { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ + { K58 , K59 , KC_NO, K5B , K5C , K5D , KC_NO, K5F }, \ + { KC_NO, K61 , KC_NO, K63 , K64 , K65 , K66 , K67 }, \ + { K68 , K69 , K6A , K6B , K6C , K6D , K6E , K6F }, \ + { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, KC_NO, K77 }, \ + { K78 , K79 , K7A , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +#endif diff --git a/keyboards/converter/sun_usb/type5/keymaps/default/keymap.c b/keyboards/converter/sun_usb/type5/keymaps/default/keymap.c new file mode 100644 index 0000000000..5e04ff4b3b --- /dev/null +++ b/keyboards/converter/sun_usb/type5/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* LAYOUT_jp_unix is a superset of the other layouts, hence the default */ + LAYOUT_jp_unix( + KC_HELP, KC_NO, KC_F1,KC_F2,KC_F3,KC_F4, KC_F5,KC_F6,KC_F7,KC_F8, KC_F9,KC_F10,KC_F11,KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, KC_MUTE,KC_VOLD,KC_VOLU,KC_PWR, + KC_STOP, KC_AGAIN, KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSLS,KC_GRV, KC_INS, KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, + KC_MENU, KC_UNDO, KC_TAB, KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC, KC_BSPC, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_SELECT, KC_COPY, KC_LCTL, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_EXECUTE,KC_PASTE, KC_LSFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_FIND, KC_CUT, KC_CAPS,KC_LALT,KC_LGUI,KC_HENK, KC_SPC, KC_MHEN,KC_KANA,KC_RGUI,KC_APP,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT + ), +}; diff --git a/keyboards/converter/sun_usb/type5/rules.mk b/keyboards/converter/sun_usb/type5/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/converter/sun_usb/type5/type5.h b/keyboards/converter/sun_usb/type5/type5.h new file mode 100644 index 0000000000..da66d80abc --- /dev/null +++ b/keyboards/converter/sun_usb/type5/type5.h @@ -0,0 +1,148 @@ +/* + Copyright 2012 Jun Wako + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef TYPE5_H +#define TYPE5_H + +#include "quantum.h" + +/* sun type 5 keyboard, JP Unix-style +,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------. +| 76 | | 0F| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30| +`-------' `---' `---------------' `---------------' `---------------' `-----------' `---------------' +,-------. ,-----------------------------------------------------------. ,-----------. ,---------------. +| 01| 03| | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A| | 2C| 34| 60| | 62| 2E| 2F| 47| +|-------| |-----------------------------------------------------------| |------------ |---------------| +| 19| 1A| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 2B | | 42| 4A| 7B| | 44| 45| 46| | +|-------| |-----------------------------------------------------------| `-----------' |-----------| 7D| +| 31| 33| | 4C | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D| | +|-------| |-----------------------------------------------------------| ,---. |-----------|---| +| 48| 49| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E | | 14| | 70| 71| 72| | +|-------| |-----------------------------------------------------------| .-----------. |-----------| 5A| +| 5F| 61| | 77 | 13| 78 |*73 | 79 |*74 |*75| 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | +`-------' `-----------------------------------------------------------' `-----------' `---------------' +*/ +#define LAYOUT_jp_unix( \ + K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ + K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \ + K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \ + K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ + K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ + K5F,K61, K77,K13, K78, K73, K79, K74, K75, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +) { \ + { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ + { K08 , K09 , K0A , K0B , K0C , K0D , K0E , K0F ,}, \ + { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ + { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ + { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ + { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ + { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ + { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ + { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ + { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ + { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ + { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ + { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ + { K70 , K71 , K72 , K73 , K74 , K75 , K76 , K77 }, \ + { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ +} + +/* Sun type 5 keyboard, US Unix-style +,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------. +| 76 | | 0F| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30| +`-------' `---' `---------------' `---------------' `---------------' `-----------' `---------------' +,-------. ,-----------------------------------------------------------. ,-----------. ,---------------. +| 01| 03| | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A| | 2C| 34| 60| | 62| 2E| 2F| 47| +|-------| |-----------------------------------------------------------| |------------ |---------------| +| 19| 1A| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 2B | | 42| 4A| 7B| | 44| 45| 46| | +|-------| |-----------------------------------------------------------| `-----------' |-----------| 7D| +| 31| 33| | 4C | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D| | +|-------| |-----------------------------------------------------------| ,---. |-----------|---| +| 48| 49| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E | | 14| | 70| 71| 72| | +|-------| |-----------------------------------------------------------| .-----------. |-----------| 5A| +| 5F| 61| | 77 | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | +`-------' `-----------------------------------------------------------' `-----------' `---------------' +*/ +#define LAYOUT_us_unix( \ + K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ + K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \ + K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \ + K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ + K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ + K5F,K61, K77,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +) { \ + { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ + { K08 , K09 , K0A , K0B , K0C , K0D , K0E , K0F ,}, \ + { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ + { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ + { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ + { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ + { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ + { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ + { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ + { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ + { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ + { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ + { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ + { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \ + { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ +} + +/* Sun type 5 keyboard, US ANSI-style + ,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------. + | 76 | | 1D| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30| + `-------' `---' `---------------' `---------------' `---------------' `-----------' `---------------' + ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------. + | 01| 03| | 2A| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 2B | | 2C| 34| 60| | 62| 2E| 2F| 47| + |-------| |-----------------------------------------------------------| |------------ |---------------| + | 19| 1A| | 35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 58 | | 42| 4A| 7B| | 44| 45| 46| | + |-------| |-----------------------------------------------------------| `-----------' |-----------| 7D| + | 31| 33| | 77 | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 59 | | 5B| 5C| 5D| | + |-------| |-----------------------------------------------------------| ,---. |-----------|---| + | 48| 49| | 63 | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E | | 14| | 70| 71| 72| | + |-------| |-----------------------------------------------------------| .-----------. |-----------| 5A| + | 5F| 61| | 4C | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | + `-------' `-----------------------------------------------------------' `-----------' `---------------' +*/ +#define LAYOUT_ansi( \ + K76, K1D, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ + K01,K03, K2A,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29, K2B, K2C,K34,K60, K62,K2E,K2F,K47, \ + K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K58, K42,K4A,K7B, K44,K45,K46,K7D, \ + K31,K33, K77, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ + K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ + K5F,K61, K4C,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +) { \ + { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ + { K08 , K09 , K0A , K0B , K0C , K0D , K0E , KC_NO,}, \ + { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ + { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ + { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ + { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ + { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ + { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ + { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ + { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ + { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ + { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ + { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ + { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \ + { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ +} +#endif