From f7c00b2c1bffd159b36a44c6e80229a4e7e99581 Mon Sep 17 00:00:00 2001 From: Dave Vandyke Date: Wed, 23 Sep 2020 11:35:02 +0100 Subject: [PATCH] [Keymap] Add kzar keymap for Kinesis Advantage --- keyboards/kinesis/keymaps/kzar/config.h | 3 + keyboards/kinesis/keymaps/kzar/keymap.c | 136 +++++++++++++++++++++++ keyboards/kinesis/keymaps/kzar/readme.md | 12 ++ keyboards/kinesis/keymaps/kzar/rules.mk | 17 +++ 4 files changed, 168 insertions(+) create mode 100644 keyboards/kinesis/keymaps/kzar/config.h create mode 100644 keyboards/kinesis/keymaps/kzar/keymap.c create mode 100644 keyboards/kinesis/keymaps/kzar/readme.md create mode 100644 keyboards/kinesis/keymaps/kzar/rules.mk diff --git a/keyboards/kinesis/keymaps/kzar/config.h b/keyboards/kinesis/keymaps/kzar/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/kinesis/keymaps/kzar/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/kinesis/keymaps/kzar/keymap.c b/keyboards/kinesis/keymaps/kzar/keymap.c new file mode 100644 index 000000000000..0f3f57c120da --- /dev/null +++ b/keyboards/kinesis/keymaps/kzar/keymap.c @@ -0,0 +1,136 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + QWERTY, + KEYPAD +}; + +#define ledTurnOff palSetLine +#define ledTurnOn palClearLine + +#define LED_KEYPAD LINE_PIN24 +#define LED_SCROLL_LOCK LINE_PIN25 +#define LED_NUM_LOCK LINE_PIN26 +#define LED_CAPS_LOCK LINE_PIN12 + +// clang-format off + +/* + QWERTY layer: + ,---------------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | + `---------------------------------------------------------------------------' + ,---------------------------------------------------------------------------. + | F9 | F10 | F11 | F12 | PScr | SLck | Pause | Keypad | | + `---------------------------------------------------------------------------' + ,-------------------------------------------.,-------------------------------------------. + | = | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Tab | Q | W | E | R | T || Y | U | I | O | P | \ | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | CapsLk | A | S | D | F | G || H | J | K | L | ; | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || N | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | ` | \ | Left | Rght | | Up | Dn | [ | ] | + `---------------------------' `---------------------------' + ,--------------.,--------------. + | LCtl | LAlt || LGUI | RCtl | + ,------|-------|------||------+-------+-------. + | | | Home || PgUp | Enter | | + | BkSp | Del |------||------| / | Space | + | | | End || PgDn | KeyPd | | + `---------------------'`----------------------' + + Keypad layer: + ,---------------------------------------------------------------------------. + | | | | | | | | | | + `---------------------------------------------------------------------------' + ,---------------------------------------------------------------------------. + | RESET | | | | Mute | Vol Down | Vol Up | Keypad | | + `---------------------------------------------------------------------------' + ,-------------------------------------------.,-------------------------------------------. + | | | | | | || | NmLk | KP = | KP / | KP * | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | KP 7 | KP 8 | KP 9 | KP - | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | KP 4 | KP 5 | KP 6 | KP + | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | KP 1 | KP 2 | KP 3 |KP Ent| | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + | | INS | | | | | | KP . |KP Ent| + `---------------------------' `---------------------------' + ,-------------.,-------------. + | | || | | + ,------|------|------||------+------+------. + | | | || | | | + | | |------||------| | KP 0 | + | | | || | | | + `--------------------'`--------------------' +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[QWERTY] = LAYOUT ( + // Left Hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7 , KC_F8, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_GRV, KC_NUBS, KC_LEFT, KC_RGHT, + // Left Thumb + KC_LCTL, KC_LALT, + KC_HOME, + KC_BSPC, KC_DEL, KC_END, + + // Right Hand + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(KEYPAD), _______, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, + // Right Thumb + KC_LGUI, KC_RCTL, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC + ), + +[KEYPAD] = LAYOUT ( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, KC_INS, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + + // Right Hand + RESET, _______, _______, _______, KC__MUTE, KC__VOLDOWN, KC__VOLUP, _______, _______, + _______, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, _______, + _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______, + _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + _______, _______, KC_PDOT, KC_PENT, + // Right Thumb + _______, _______, + _______, + _______, _______, KC_P0 + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + if (layer == KEYPAD) + ledTurnOn(LED_KEYPAD); +} diff --git a/keyboards/kinesis/keymaps/kzar/readme.md b/keyboards/kinesis/keymaps/kzar/readme.md new file mode 100644 index 000000000000..30912e6a7a95 --- /dev/null +++ b/keyboards/kinesis/keymaps/kzar/readme.md @@ -0,0 +1,12 @@ +# Dave's Kinesis Advantage keymap + +A simple UK layout aiming to emulate the original controller. Targets the kinT +keyboard controller built with the Teensy 3.6 microcontroller. + +Notes: + + - Windows key changed to LGUI (instead of RGUI) as that works better with the + software that I use. + - To flash the keyboard again, toggle the keypad (keypd) and then press + RESET (F9). + - This layout is based on the xyvers layout. diff --git a/keyboards/kinesis/keymaps/kzar/rules.mk b/keyboards/kinesis/keymaps/kzar/rules.mk new file mode 100644 index 000000000000..fd8e66f85347 --- /dev/null +++ b/keyboards/kinesis/keymaps/kzar/rules.mk @@ -0,0 +1,17 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend