From 5d0c38794f6c9b15f457127437360e5fc56e0a97 Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Fri, 31 Jul 2020 02:08:17 +0800 Subject: [PATCH] [Keyboard] Add new keyboard ks63 handwired (#9712) * [feature] add ks63 split keyboard * [bugfix] unable to compile and some rows are not working * [feature] add info.json / update keymap * [bugfix] keymap and fix slave not working issue * [bugfix] keyboard unaviable on cold boot / unable to reset the board * [misc] fine tune keymap * [misc] fine tune keymap * ... * ... * ... * [misc] adjust brackets position * [misc] add readme link * [misc] comply to coding convention * [misc] add default keymap readme file * Update keyboards/handwired/ks63/README.md * Update keyboards/handwired/ks63/ks63.h * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/keymaps/default/keymap.c * Update keyboards/handwired/ks63/rules.mk * Update keyboards/handwired/ks63/README.md * Update keyboards/handwired/ks63/keymaps/default/keymap.c * [misc] to lowercase filename * Update keyboards/handwired/ks63/rules.mk * Update keyboards/handwired/ks63/rules.mk * Update keyboards/handwired/ks63/config.h --- keyboards/handwired/ks63/config.h | 81 ++++ keyboards/handwired/ks63/info.json | 345 ++++++++++++++++++ .../handwired/ks63/keymaps/default/keymap.c | 40 ++ .../handwired/ks63/keymaps/default/readme.md | 5 + keyboards/handwired/ks63/ks63.c | 1 + keyboards/handwired/ks63/ks63.h | 23 ++ keyboards/handwired/ks63/readme.md | 15 + keyboards/handwired/ks63/rules.mk | 24 ++ 8 files changed, 534 insertions(+) create mode 100644 keyboards/handwired/ks63/config.h create mode 100644 keyboards/handwired/ks63/info.json create mode 100644 keyboards/handwired/ks63/keymaps/default/keymap.c create mode 100644 keyboards/handwired/ks63/keymaps/default/readme.md create mode 100644 keyboards/handwired/ks63/ks63.c create mode 100644 keyboards/handwired/ks63/ks63.h create mode 100644 keyboards/handwired/ks63/readme.md create mode 100644 keyboards/handwired/ks63/rules.mk diff --git a/keyboards/handwired/ks63/config.h b/keyboards/handwired/ks63/config.h new file mode 100644 index 0000000000..e49d090678 --- /dev/null +++ b/keyboards/handwired/ks63/config.h @@ -0,0 +1,81 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kleshwong +#define PRODUCT ks63 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5, B4, E6, D7, C6 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } + +#define DIODE_DIRECTION COL2ROW + +/* mouse config */ +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* Enables This makes it easier for fast typists to use dual-function keys */ +#define PERMISSIVE_HOLD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#define MASTER_LEFT +#define USE_SERIAL + diff --git a/keyboards/handwired/ks63/info.json b/keyboards/handwired/ks63/info.json new file mode 100644 index 0000000000..349cfaa677 --- /dev/null +++ b/keyboards/handwired/ks63/info.json @@ -0,0 +1,345 @@ +{ + "keyboard_name": "ks60", + "url": "", + "maintainer": "Klesh Wong", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "~", + "x": 0, + "y": 0 + }, + { + "label": "!", + "x": 1, + "y": 0 + }, + { + "label": "@", + "x": 2, + "y": 0 + }, + { + "label": "#", + "x": 3, + "y": 0 + }, + { + "label": "$", + "x": 4, + "y": 0 + }, + { + "label": "%", + "x": 5, + "y": 0 + }, + { + "label": "^", + "x": 6, + "y": 0 + }, + { + "label": "&", + "x": 7, + "y": 0 + }, + { + "label": "*", + "x": 8, + "y": 0 + }, + { + "label": "(", + "x": 9, + "y": 0 + }, + { + "label": ")", + "x": 10, + "y": 0 + }, + { + "label": "_", + "x": 11, + "y": 0 + }, + { + "label": "+", + "x": 12, + "y": 0 + }, + { + "label": "Backspace", + "x": 13, + "y": 0, + "w": 2 + }, + { + "label": "Tab", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "Q", + "x": 1.5, + "y": 1 + }, + { + "label": "W", + "x": 2.5, + "y": 1 + }, + { + "label": "E", + "x": 3.5, + "y": 1 + }, + { + "label": "R", + "x": 4.5, + "y": 1 + }, + { + "label": "T", + "x": 5.5, + "y": 1 + }, + { + "label": "Y", + "x": 6.5, + "y": 1 + }, + { + "label": "U", + "x": 7.5, + "y": 1 + }, + { + "label": "I", + "x": 8.5, + "y": 1 + }, + { + "label": "O", + "x": 9.5, + "y": 1 + }, + { + "label": "P", + "x": 10.5, + "y": 1 + }, + { + "label": "{", + "x": 11.5, + "y": 1 + }, + { + "label": "}", + "x": 12.5, + "y": 1 + }, + { + "label": "|", + "x": 13.5, + "y": 1, + "w": 1.5 + }, + { + "label": "Caps Lock", + "x": 0, + "y": 2, + "w": 1.75 + }, + { + "label": "A", + "x": 1.75, + "y": 2 + }, + { + "label": "S", + "x": 2.75, + "y": 2 + }, + { + "label": "D", + "x": 3.75, + "y": 2 + }, + { + "label": "F", + "x": 4.75, + "y": 2 + }, + { + "label": "G", + "x": 5.75, + "y": 2 + }, + { + "label": "H", + "x": 6.75, + "y": 2 + }, + { + "label": "J", + "x": 7.75, + "y": 2 + }, + { + "label": "K", + "x": 8.75, + "y": 2 + }, + { + "label": "L", + "x": 9.75, + "y": 2 + }, + { + "label": ":", + "x": 10.75, + "y": 2 + }, + { + "label": "\"", + "x": 11.75, + "y": 2 + }, + { + "label": "Enter", + "x": 12.75, + "y": 2, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 3, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 3 + }, + { + "label": "X", + "x": 3.25, + "y": 3 + }, + { + "label": "C", + "x": 4.25, + "y": 3 + }, + { + "label": "V", + "x": 5.25, + "y": 3 + }, + { + "label": "B", + "x": 6.25, + "y": 3 + }, + { + "label": "N", + "x": 7.25, + "y": 3 + }, + { + "label": "M", + "x": 8.25, + "y": 3 + }, + { + "label": "<", + "x": 9.25, + "y": 3 + }, + { + "label": ">", + "x": 10.25, + "y": 3 + }, + { + "label": "?", + "x": 11.25, + "y": 3 + }, + { + "label": "Shift", + "x": 12.25, + "y": 3, + "w": 2.75 + }, + { + "label": "Ctrl", + "x": 0, + "y": 4, + "w": 1.25 + }, + { + "label": "Win", + "x": 1.25, + "y": 4, + "w": 1.25 + }, + { + "label": "Alt", + "x": 2.5, + "y": 4, + "w": 1.25 + }, + { + "label": "Space", + "x": 3.75, + "y": 4, + "w": 2.25 + }, + { + "label": "Esc", + "x": 6, + "y": 4, + "w": 1.25 + }, + { + "label": "Space", + "x": 7.25, + "y": 4, + "w": 2.75 + }, + { + "label": "\u2190", + "x": 10, + "y": 4, + "w": 1.25 + }, + { + "label": "\u2193", + "x": 11.25, + "y": 4, + "w": 1.25 + }, + { + "label": "\u2191", + "x": 12.5, + "y": 4, + "w": 1.25 + }, + { + "label": "\u2192", + "x": 13.75, + "y": 4, + "w": 1.25 + } + ] + } + } +} diff --git a/keyboards/handwired/ks63/keymaps/default/keymap.c b/keyboards/handwired/ks63/keymaps/default/keymap.c new file mode 100644 index 0000000000..6727e96f86 --- /dev/null +++ b/keyboards/handwired/ks63/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_GRV , 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_BSPC, + LT(3, 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_BSLS, + LT(2, KC_CAPS), KC_A , KC_S , KC_D , KC_F , KC_G, KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT, + LSFT_T(KC_GRV), KC_Z , KC_X , KC_C , KC_V , KC_B, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, RSFT_T(KC_BSPC), + LCTL_T(KC_MINS), KC_LGUI, LALT_T(KC_EQL) , KC_SPC , LT(4, KC_ESC), LT(1, KC_SPC) , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT), + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_F7 , KC_F8 , KC_F9 , KC_F12 , KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_F4 , KC_F5 , KC_F6 , KC_F11 , KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS , KC_F1 , KC_F2 , KC_F3 , KC_F10 , KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7 , KC_8 , KC_9 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PMNS, KC_4 , KC_5 , KC_6 , KC_PLUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_1 , KC_2 , KC_3 , KC_PSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, S(KC_7), S(KC_8), S(KC_9), KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, S(KC_4), S(KC_5), S(KC_6), KC_RPRN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, S(KC_1), S(KC_2), S(KC_3), KC_RBRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [4] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, A(KC_F4),C(KC_EQL), KC_END, C(KC_0), LCA(KC_DEL), KC_WBAK, C(KC_PGUP), C(KC_PGDN), KC_WFWD, C(KC_P), KC_TRNS, KC_TRNS, KC_MPLY, + KC_TRNS, KC_HOME, C(KC_MINS), KC_DEL , KC_RGHT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_TRNS, KC_TRNS, + KC_TRNS, KC_SLEP, KC_TRNS, KC_SYSTEM_POWER, KC_TRNS, KC_LEFT, KC_MNXT, KC_MPRV, KC_PGUP, KC_PGDN, KC_VOLD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; diff --git a/keyboards/handwired/ks63/keymaps/default/readme.md b/keyboards/handwired/ks63/keymaps/default/readme.md new file mode 100644 index 0000000000..26537fb511 --- /dev/null +++ b/keyboards/handwired/ks63/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for ks63 + +This is the default keymap for kb63, + +it consists of a base layer with QWERTY layout, a momentary function-keys-layer, a number-keys layer, a symbol-keys-layer and a hotkeys-multimediakeys-combo layer. diff --git a/keyboards/handwired/ks63/ks63.c b/keyboards/handwired/ks63/ks63.c new file mode 100644 index 0000000000..bd48359a81 --- /dev/null +++ b/keyboards/handwired/ks63/ks63.c @@ -0,0 +1 @@ +#include "ks63.h" diff --git a/keyboards/handwired/ks63/ks63.h b/keyboards/handwired/ks63/ks63.h new file mode 100644 index 0000000000..05006f593d --- /dev/null +++ b/keyboards/handwired/ks63/ks63.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ + K400, K401, K403, K404, K406, K408, K410, K411, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206 }, \ + { KC_NO, K301, K302, K303, K304, K305, K306 }, \ + { K400, K401, KC_NO, K403, K404, KC_NO, K406 }, \ + \ + { K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ + { KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ +} diff --git a/keyboards/handwired/ks63/readme.md b/keyboards/handwired/ks63/readme.md new file mode 100644 index 0000000000..2bbd9fa694 --- /dev/null +++ b/keyboards/handwired/ks63/readme.md @@ -0,0 +1,15 @@ +# ks63 + +![ks63](https://github.com/klesh/ks63/raw/master/images/ks63-finish-02.jpg) + +A handwired 63 keys split keyboard compatible with Default 60% layout. Let you keep your magic power while muggles can still use it as an ordinary keyboard + +* Keyboard Maintainer: [Klesh Wong](https://github.com/klesh) +* Hardware Supported: Arduino ProMicro +* Assembling Guide: [ks63](https://github.com/klesh/ks63) + +Make example for this keyboard (after setting up your build environment): + + make handwired/ks63:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/ks63/rules.mk b/keyboards/handwired/ks63/rules.mk new file mode 100644 index 0000000000..a97b8ea708 --- /dev/null +++ b/keyboards/handwired/ks63/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +SPLIT_KEYBOARD = yes