summaryrefslogtreecommitdiffstats
path: root/keyboards/converter/sun_usb
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
committerlokher <lokher@gmail.com>2022-12-06 17:04:10 +0800
commit27fc28fd2ff52e079a5bc58d6aaea4c752420615 (patch)
tree7ac943fb1ba4f430a7220efd18f66f6a77205c30 /keyboards/converter/sun_usb
parente736133392fe6427cfb995da0787337189828272 (diff)
parent2709b6ed616f8012ff4cfd3ee69a822a8d188351 (diff)
Merge upstream master
Diffstat (limited to 'keyboards/converter/sun_usb')
-rw-r--r--keyboards/converter/sun_usb/command_extra.c64
-rw-r--r--keyboards/converter/sun_usb/config.h29
-rw-r--r--keyboards/converter/sun_usb/type3/keymaps/default/keymap.c29
-rw-r--r--keyboards/converter/sun_usb/type5/keymaps/default/keymap.c30
-rw-r--r--keyboards/converter/sun_usb/type5/keymaps/sigma/keymap.c31
5 files changed, 183 insertions, 0 deletions
diff --git a/keyboards/converter/sun_usb/command_extra.c b/keyboards/converter/sun_usb/command_extra.c
new file mode 100644
index 0000000000..b15f9dc9bd
--- /dev/null
+++ b/keyboards/converter/sun_usb/command_extra.c
@@ -0,0 +1,64 @@
+#include QMK_KEYBOARD_H
+#include "uart.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");
+ uart_write(0x01);
+ break;
+ case KC_HOME:
+ sun_bell = !sun_bell;
+ if (sun_bell) {
+ print("Bell On\n");
+ uart_write(0x02);
+ } else {
+ print("Bell Off\n");
+ uart_write(0x03);
+ }
+ break;
+ case KC_END:
+ sun_click = !sun_click;
+ if (sun_click) {
+ print("Click On\n");
+ uart_write(0x0A);
+ } else {
+ print("Click Off\n");
+ uart_write(0x0B);
+ }
+ break;
+ case KC_PGUP:
+ print("LED all on\n");
+ uart_write(0x0E);
+ uart_write(0xFF);
+ break;
+ case KC_PGDN:
+ print("LED all off\n");
+ uart_write(0x0E);
+ uart_write(0x00);
+ break;
+ case KC_INSERT:
+ print("layout\n");
+ uart_write(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..18e4b1618e
--- /dev/null
+++ b/keyboards/converter/sun_usb/config.h
@@ -0,0 +1,29 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+/* matrix size */
+#define MATRIX_ROWS 16
+#define MATRIX_COLS 8
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ get_mods() == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \
+ get_mods() == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \
+ get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
+)
diff --git a/keyboards/converter/sun_usb/type3/keymaps/default/keymap.c b/keyboards/converter/sun_usb/type3/keymaps/default/keymap.c
new file mode 100644
index 0000000000..84f4b821ae
--- /dev/null
+++ b/keyboards/converter/sun_usb/type3/keymaps/default/keymap.c
@@ -0,0 +1,29 @@
+/*
+ Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+ 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 <http://www.gnu.org/licenses/>.
+*/
+
+#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_PGDN,
+ KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI
+ ),
+};
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..d1681624cb
--- /dev/null
+++ b/keyboards/converter/sun_usb/type5/keymaps/default/keymap.c
@@ -0,0 +1,30 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#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_SCRL,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_NUM, 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_INT4, KC_SPC, KC_INT5,KC_INT2,KC_RGUI,KC_APP,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT
+ ),
+};
diff --git a/keyboards/converter/sun_usb/type5/keymaps/sigma/keymap.c b/keyboards/converter/sun_usb/type5/keymaps/sigma/keymap.c
new file mode 100644
index 0000000000..3996b7d2e1
--- /dev/null
+++ b/keyboards/converter/sun_usb/type5/keymaps/sigma/keymap.c
@@ -0,0 +1,31 @@
+/*
+Copyright 2018 Yann Hodique <yann.hodique@gmail.com> @sigma
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#include QMK_KEYBOARD_H
+#include "sigma.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] =
+ {
+ [_QWERTY] = LAYOUT_us_unix(
+ QK_LEAD, KC_SCRT, 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_SCRL,KC_PAUS, KC_MUTE,KC_VOLD,KC_VOLU,KC_OS_LOCK,
+ KC_STOP, KC_OS_REDO, 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_NUM, KC_PSLS,KC_PAST,KC_PMNS,
+ VRSN, KC_OS_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_MAKE, KC_OS_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_OS_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_OS_CUT, KC_CAPS,KC_LGUI,KC_LALT, KC_SPC, KC_RGUI,KC_APP,KC_RALT, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT
+ ),
+ };