From 8e68ce2aae69d86e3147f8e6cbea39799dd1bced Mon Sep 17 00:00:00 2001 From: Ki Finnsson Date: Sat, 29 Feb 2020 19:24:43 -0700 Subject: [PATCH 1/9] [Keymap] kifinnsson keymap for planck Initial commit for kifinnsson keymap * placeholder macros * extend layer --- keyboards/planck/keymaps/kifinnsson/config.h | 39 ++ keyboards/planck/keymaps/kifinnsson/keymap.c | 545 ++++++++++++++++++ keyboards/planck/keymaps/kifinnsson/readme.md | 1 + keyboards/planck/keymaps/kifinnsson/rules.mk | 1 + 4 files changed, 586 insertions(+) create mode 100644 keyboards/planck/keymaps/kifinnsson/config.h create mode 100644 keyboards/planck/keymaps/kifinnsson/keymap.c create mode 100644 keyboards/planck/keymaps/kifinnsson/readme.md create mode 100644 keyboards/planck/keymaps/kifinnsson/rules.mk diff --git a/keyboards/planck/keymaps/kifinnsson/config.h b/keyboards/planck/keymaps/kifinnsson/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/kifinnsson/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c new file mode 100644 index 000000000000..5baef5a9ab4f --- /dev/null +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -0,0 +1,545 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +bool is_lgui_active = false; +uint16_t lgui_timer = 0; + +extern keymap_config_t keymap_config; + +enum planck_layers { _COLEMAK, _LOWER, _RAISE, _EXTEND, _MACRO, _ADJUST }; + +enum planck_keycodes { COLEMAK = SAFE_RANGE, KI_BSPC, KI_COMM, KI_DOT, KI_ESC, KI_QUOT, KI_SCLN, KI_SLSH, KI_TAB, KI_A, KI_B, KI_C, KI_D, KI_E, KI_F, KI_G, KI_H, KI_I, KI_J, KI_K, KI_L, KI_M, KI_N, KI_O, KI_P, KI_Q, KI_R, KI_S, KI_T, KI_U, KI_V, KI_W, KI_X, KI_Y, KI_Z, KI_WLFT, KI_WRGT, KI_WUP, KI_WDN }; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define MACROS MO(_MACRO) +#define EXTEND MO(_EXTEND) +#define SPC_LOW LT(_LOWER, KC_SPC) +#define SPC_RAI LT(_RAISE, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Colemak + * ,------------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------+-------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+-------+-------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+-------+-------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower |SPC_LOW|SPC_RAI|Raise | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + EXTEND, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + MACROS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SPC_LOW, SPC_RAI, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |XXXXXX|XXXXXX| Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |XXXXXX|XXXXXX|Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Extend + * ,-----------------------------------------------------------------------------------. + * | | Esc | WH_U | WBAK | WFWD | MS_U | PgUp | Home | Up | End | Del | Esc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Alt | WH_D |Shift | Ctrl | MS_D | PgDn | Left | Down |Right | Bksp | Menu | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | WH_L | Undo | Cut | Copy |Paste |MS_B_1|MS_B_2|MS_B_3| MS_L | MS_R | WH_R | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_EXTEND] = LAYOUT_planck_grid( + _______, KC_ESC, KC_WH_U, KC_WBAK, KC_WFWD, KC_MS_U, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, KC_ESC, + _______, KC_LALT, KC_WH_D, KC_LSFT, KC_LCTL, KC_MS_D, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_MENU, + KC_WH_L, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_R, KC_WH_R, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Macros + * ,--------------------------------------------------------------------------------------. + * |KI_TAB| KI_Q | KI_W | KI_F | KI_P | KI_G | KI_J | KI_L | KI_U | KI_Y |KI_SCLN|KI_BSPC| + * |------+------+------+------+------+------+------+------+-------+------+-------+-------| + * |KI_ESC| KI_A | KI_R | KI_S | KI_T | KI_D | KI_H | KI_N | KI_E | KI_I | KI_O |KI_QUOT| + * |------+------+------+------+------+------+------+------+-------+------+-------+-------| + * | | KI_Z | KI_X | KI_C | KI_V | KI_B | KI_K | KI_M |KI_COMM|KI_DOT|KI_SLSH| | + * |------+------+------+------+------+------+------+------+-------+------+-------+-------| + * | | | | | | | | |KI_WLFT|KI_WDN|KI_WUP |KI_WGRT| + * `--------------------------------------------------------------------------------------' + */ + [_MACRO] = LAYOUT_planck_grid( + KI_TAB, KI_Q, KI_W, KI_F, KI_P, KI_G, KI_J, KI_L, KI_U, KI_Y, KI_SCLN, KI_BSPC, + KI_ESC, KI_A, KI_R, KI_S, KI_T, KI_D, KI_H, KI_N, KI_E, KI_I, KI_O, KI_QUOT, + _______, KI_Z, KI_X, KI_C, KI_V, KI_B, KI_K, KI_M, KI_COMM, KI_DOT, KI_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KI_WLFT, KI_WDN, KI_WUP, KI_WRGT + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| Debug| | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | |AGnorm|AGswap| |Colemk| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |TermOn|TrmOff| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, COLEMAK, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + }; + +uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // + // Layout Macros + // + // Enable Colemak layout + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; // Skip all further processing of this key + break; + // + // Non-Alpha Macros + // + // 'Backspace' Macro + case KI_BSPC: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Backspace"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Comma' Macro + case KI_COMM: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Comma"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Dot' Macro + case KI_DOT: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Dot"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Escape' Macro + case KI_ESC: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Escape"); + } else { + } + // 'Quote' Macro + case KI_QUOT: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Quote"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Semicolon' Macro + case KI_SCLN: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Semicolon"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Slash' Macro + case KI_SLSH: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Slash"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Tab' Macro + case KI_TAB: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Tab"); + } else { + } + return false; // Skip all further processing of this key + break; + // + // Alpha Macros + // + // 'A' Macro + case KI_A: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED A"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'B' Macro + case KI_B: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED B"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'C' Macro + case KI_C: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED C"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'D' Macro + case KI_D: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED D"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'E' Macro + case KI_E: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED E"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'F' Macro + case KI_F: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED F"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'G' Macro + case KI_G: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED G"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'H' Macro + case KI_H: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED H"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'I' Macro + case KI_I: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED I"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'J' Macro + case KI_J: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED J"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'K' Macro + case KI_K: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED K"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'L' Macro + case KI_L: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED L"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'M' Macro + case KI_M: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED M"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'N' Macro + case KI_N: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED N"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'O' Macro + case KI_O: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED O"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'P' Macro + case KI_P: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED P"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Q' Macro + case KI_Q: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Q"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'R' Macro + case KI_R: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED R"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'S' Macro + case KI_S: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED S"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'T' Macro + case KI_T: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED T"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'U' Macro + case KI_U: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED U"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'V' Macro + case KI_V: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED V"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'W' Macro + case KI_W: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED W"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'X' Macro + case KI_X: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED X"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Y' Macro + case KI_Y: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Y"); + } else { + } + return false; // Skip all further processing of this key + break; + // 'Z' Macro + case KI_Z: + if (record->event.pressed) { + // Reserved for future use + SEND_STRING("RESERVED Z"); + } else { + } + return false; // Skip all further processing of this key + break; + // + // Arrow key macros + // + // Windows Win+Left tap to move window without resetting KC_LGUI + // Additional code is in matrix_scan_user() + case KI_WLFT: + if (record->event.pressed) { + if (!is_lgui_active) { + is_lgui_active = true; + register_code(KC_LGUI); + } + lgui_timer = timer_read(); + tap_code(KC_LEFT); + } else { + } + return false; // Skip all further processing of this key + break; + // Windows Win+Right tap to move window without resetting KC_LGUI + // Additional code is in matrix_scan_user() + case KI_WRGT: + if (record->event.pressed) { + if (!is_lgui_active) { + is_lgui_active = true; + register_code(KC_LGUI); + } + lgui_timer = timer_read(); + tap_code(KC_RIGHT); + } else { + } + return false; // Skip all further processing of this key + break; + // Windows Win+Up tap to move window without resetting KC_LGUI + // Additional code is in matrix_scan_user() + case KI_WUP: + if (record->event.pressed) { + if (!is_lgui_active) { + is_lgui_active = true; + register_code(KC_LGUI); + } + lgui_timer = timer_read(); + tap_code(KC_UP); + } else { + } + return false; // Skip all further processing of this key + break; + // Windows Win+Down tap to move window without resetting KC_LGUI + // Additional code is in matrix_scan_user() + case KI_WDN: + if (record->event.pressed) { + if (!is_lgui_active) { + is_lgui_active = true; + register_code(KC_LGUI); + } + lgui_timer = timer_read(); + tap_code(KC_DOWN); + } else { + } + return false; // Skip all further processing of this key + break; + default: + return true; // Process all other keycodes normally + break; + } + return true; +} + +void matrix_scan_user(void) { + // Check if KC_LGUI is active in KI_WLFT, KI_WRGT, KI_WUP + if (is_lgui_active) { + if (timer_elapsed(lgui_timer) > 1000) { + unregister_code(KC_LGUI); + is_lgui_active = false; + } + } +} diff --git a/keyboards/planck/keymaps/kifinnsson/readme.md b/keyboards/planck/keymaps/kifinnsson/readme.md new file mode 100644 index 000000000000..1a6c86e2a8a5 --- /dev/null +++ b/keyboards/planck/keymaps/kifinnsson/readme.md @@ -0,0 +1 @@ +# kifinnsson's planck layout diff --git a/keyboards/planck/keymaps/kifinnsson/rules.mk b/keyboards/planck/keymaps/kifinnsson/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/kifinnsson/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From c77170d52c6abc1fb0938941ef841b58fd68fe85 Mon Sep 17 00:00:00 2001 From: Ki Finnsson Date: Sat, 29 Feb 2020 19:55:27 -0700 Subject: [PATCH 2/9] [Keymap] kifinnsson planck keymap updates commented out placeholder SEND_STRING macros --- keyboards/planck/keymaps/kifinnsson/keymap.c | 110 +++++++++++++------ 1 file changed, 75 insertions(+), 35 deletions(-) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index 5baef5a9ab4f..3f0b306a1ebd 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -24,7 +24,47 @@ extern keymap_config_t keymap_config; enum planck_layers { _COLEMAK, _LOWER, _RAISE, _EXTEND, _MACRO, _ADJUST }; -enum planck_keycodes { COLEMAK = SAFE_RANGE, KI_BSPC, KI_COMM, KI_DOT, KI_ESC, KI_QUOT, KI_SCLN, KI_SLSH, KI_TAB, KI_A, KI_B, KI_C, KI_D, KI_E, KI_F, KI_G, KI_H, KI_I, KI_J, KI_K, KI_L, KI_M, KI_N, KI_O, KI_P, KI_Q, KI_R, KI_S, KI_T, KI_U, KI_V, KI_W, KI_X, KI_Y, KI_Z, KI_WLFT, KI_WRGT, KI_WUP, KI_WDN }; +enum planck_keycodes { + COLEMAK = SAFE_RANGE, + KI_BSPC, + KI_COMM, + KI_DOT, + KI_ESC, + KI_QUOT, + KI_SCLN, + KI_SLSH, + KI_TAB, + KI_A, + KI_B, + KI_C, + KI_D, + KI_E, + KI_F, + KI_G, + KI_H, + KI_I, + KI_J, + KI_K, + KI_L, + KI_M, + KI_N, + KI_O, + KI_P, + KI_Q, + KI_R, + KI_S, + KI_T, + KI_U, + KI_V, + KI_W, + KI_X, + KI_Y, + KI_Z, + KI_WLFT, + KI_WRGT, + KI_WUP, + KI_WDN + }; #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) @@ -165,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_BSPC: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Backspace"); + //SEND_STRING("RESERVED Backspace"); } else { } return false; // Skip all further processing of this key @@ -174,7 +214,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_COMM: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Comma"); + //SEND_STRING("RESERVED Comma"); } else { } return false; // Skip all further processing of this key @@ -183,7 +223,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_DOT: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Dot"); + //SEND_STRING("RESERVED Dot"); } else { } return false; // Skip all further processing of this key @@ -192,14 +232,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_ESC: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Escape"); + //SEND_STRING("RESERVED Escape"); } else { } // 'Quote' Macro case KI_QUOT: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Quote"); + //SEND_STRING("RESERVED Quote"); } else { } return false; // Skip all further processing of this key @@ -208,7 +248,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_SCLN: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Semicolon"); + //SEND_STRING("RESERVED Semicolon"); } else { } return false; // Skip all further processing of this key @@ -217,7 +257,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_SLSH: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Slash"); + //SEND_STRING("RESERVED Slash"); } else { } return false; // Skip all further processing of this key @@ -226,7 +266,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_TAB: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Tab"); + //SEND_STRING("RESERVED Tab"); } else { } return false; // Skip all further processing of this key @@ -238,7 +278,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_A: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED A"); + //SEND_STRING("RESERVED A"); } else { } return false; // Skip all further processing of this key @@ -247,7 +287,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_B: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED B"); + //SEND_STRING("RESERVED B"); } else { } return false; // Skip all further processing of this key @@ -256,7 +296,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_C: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED C"); + //SEND_STRING("RESERVED C"); } else { } return false; // Skip all further processing of this key @@ -265,7 +305,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_D: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED D"); + //SEND_STRING("RESERVED D"); } else { } return false; // Skip all further processing of this key @@ -274,7 +314,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_E: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED E"); + //SEND_STRING("RESERVED E"); } else { } return false; // Skip all further processing of this key @@ -283,7 +323,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_F: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED F"); + //SEND_STRING("RESERVED F"); } else { } return false; // Skip all further processing of this key @@ -292,7 +332,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_G: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED G"); + //SEND_STRING("RESERVED G"); } else { } return false; // Skip all further processing of this key @@ -301,7 +341,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_H: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED H"); + //SEND_STRING("RESERVED H"); } else { } return false; // Skip all further processing of this key @@ -310,7 +350,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_I: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED I"); + //SEND_STRING("RESERVED I"); } else { } return false; // Skip all further processing of this key @@ -319,7 +359,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_J: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED J"); + //SEND_STRING("RESERVED J"); } else { } return false; // Skip all further processing of this key @@ -328,7 +368,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_K: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED K"); + //SEND_STRING("RESERVED K"); } else { } return false; // Skip all further processing of this key @@ -337,7 +377,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_L: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED L"); + //SEND_STRING("RESERVED L"); } else { } return false; // Skip all further processing of this key @@ -346,7 +386,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_M: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED M"); + //SEND_STRING("RESERVED M"); } else { } return false; // Skip all further processing of this key @@ -355,7 +395,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_N: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED N"); + //SEND_STRING("RESERVED N"); } else { } return false; // Skip all further processing of this key @@ -364,7 +404,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_O: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED O"); + //SEND_STRING("RESERVED O"); } else { } return false; // Skip all further processing of this key @@ -373,7 +413,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_P: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED P"); + //SEND_STRING("RESERVED P"); } else { } return false; // Skip all further processing of this key @@ -382,7 +422,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_Q: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Q"); + //SEND_STRING("RESERVED Q"); } else { } return false; // Skip all further processing of this key @@ -391,7 +431,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_R: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED R"); + //SEND_STRING("RESERVED R"); } else { } return false; // Skip all further processing of this key @@ -400,7 +440,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_S: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED S"); + //SEND_STRING("RESERVED S"); } else { } return false; // Skip all further processing of this key @@ -409,7 +449,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_T: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED T"); + //SEND_STRING("RESERVED T"); } else { } return false; // Skip all further processing of this key @@ -418,7 +458,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_U: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED U"); + //SEND_STRING("RESERVED U"); } else { } return false; // Skip all further processing of this key @@ -427,7 +467,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_V: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED V"); + //SEND_STRING("RESERVED V"); } else { } return false; // Skip all further processing of this key @@ -436,7 +476,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_W: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED W"); + //SEND_STRING("RESERVED W"); } else { } return false; // Skip all further processing of this key @@ -445,7 +485,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_X: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED X"); + //SEND_STRING("RESERVED X"); } else { } return false; // Skip all further processing of this key @@ -454,7 +494,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_Y: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Y"); + //SEND_STRING("RESERVED Y"); } else { } return false; // Skip all further processing of this key @@ -463,7 +503,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KI_Z: if (record->event.pressed) { // Reserved for future use - SEND_STRING("RESERVED Z"); + //SEND_STRING("RESERVED Z"); } else { } return false; // Skip all further processing of this key From 1e2bfb5d72fb2f6075612696aff85d725ba5a113 Mon Sep 17 00:00:00 2001 From: Christian Gurholt Date: Fri, 6 Mar 2020 14:56:47 -0700 Subject: [PATCH 3/9] Update keyboards/planck/keymaps/kifinnsson/keymap.c Remove extern keymap_config_t keymap_config; Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/planck/keymaps/kifinnsson/keymap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index 3f0b306a1ebd..a20a6b0ce43a 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -20,7 +20,6 @@ bool is_lgui_active = false; uint16_t lgui_timer = 0; -extern keymap_config_t keymap_config; enum planck_layers { _COLEMAK, _LOWER, _RAISE, _EXTEND, _MACRO, _ADJUST }; From 8b60ed5d4dd1140f3cb006c10efb7938998afbe1 Mon Sep 17 00:00:00 2001 From: Christian Gurholt Date: Fri, 6 Mar 2020 14:57:37 -0700 Subject: [PATCH 4/9] Update keyboards/planck/keymaps/kifinnsson/keymap.c Changed KC_MENU to KC_APP Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/planck/keymaps/kifinnsson/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index a20a6b0ce43a..7754619cd8ea 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_EXTEND] = LAYOUT_planck_grid( _______, KC_ESC, KC_WH_U, KC_WBAK, KC_WFWD, KC_MS_U, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, KC_ESC, - _______, KC_LALT, KC_WH_D, KC_LSFT, KC_LCTL, KC_MS_D, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_MENU, + _______, KC_LALT, KC_WH_D, KC_LSFT, KC_LCTL, KC_MS_D, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_APP, KC_WH_L, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, KC_BTN1, KC_BTN2, KC_BTN3, KC_MS_L, KC_MS_R, KC_WH_R, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), From 365c22538110b39869e2b27c7049b4c454ed724a Mon Sep 17 00:00:00 2001 From: Christian Gurholt Date: Sat, 7 Mar 2020 09:52:41 -0700 Subject: [PATCH 5/9] Removing COLEMAK set_single_persistent_default_layer as suggested Co-Authored-By: Drashna Jaelre --- keyboards/planck/keymaps/kifinnsson/keymap.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index 7754619cd8ea..1820bd16e0a6 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -186,17 +186,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // - // Layout Macros - // - // Enable Colemak layout - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; // Skip all further processing of this key - break; // // Non-Alpha Macros // From 60b20238a8015b8dfe43558125b575ed5b2d4e60 Mon Sep 17 00:00:00 2001 From: Christian Gurholt Date: Sat, 7 Mar 2020 09:54:56 -0700 Subject: [PATCH 6/9] updated uinit32()_t to layer_state_t() for update_tri_layer_state as suggested Co-Authored-By: Drashna Jaelre --- keyboards/planck/keymaps/kifinnsson/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index 1820bd16e0a6..f12edf0cfe6b 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -183,7 +183,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { // From 54b5cb01c0aef1c7db089bbce222f67dfe6fe33b Mon Sep 17 00:00:00 2001 From: Christian Gurholt Date: Sat, 7 Mar 2020 09:55:29 -0700 Subject: [PATCH 7/9] Removing COLEMAK keycode Co-Authored-By: Drashna Jaelre --- keyboards/planck/keymaps/kifinnsson/keymap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index f12edf0cfe6b..758ec387676a 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -24,8 +24,7 @@ uint16_t lgui_timer = 0; enum planck_layers { _COLEMAK, _LOWER, _RAISE, _EXTEND, _MACRO, _ADJUST }; enum planck_keycodes { - COLEMAK = SAFE_RANGE, - KI_BSPC, + KI_BSPC = SAFE_RANGE, KI_COMM, KI_DOT, KI_ESC, From 8ca218afa7fdbc9666f9329804b10d51211fe5f8 Mon Sep 17 00:00:00 2001 From: Christian Gurholt Date: Sat, 7 Mar 2020 09:57:08 -0700 Subject: [PATCH 8/9] Removing COLEMAK keycode in _ADJUST layer --- keyboards/planck/keymaps/kifinnsson/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index 758ec387676a..1013fd1c6cd0 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_planck_grid( _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, COLEMAK, _______, _______, _______, + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) From e81d7fa918b91b5f92d0b5e7a2ec1591efef8e65 Mon Sep 17 00:00:00 2001 From: Christian Gurholt Date: Sun, 8 Mar 2020 11:10:07 -0600 Subject: [PATCH 9/9] Update keymap.c added switch (keycode) back into process_record_user --- keyboards/planck/keymaps/kifinnsson/keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c index 1013fd1c6cd0..3917462fa336 100644 --- a/keyboards/planck/keymaps/kifinnsson/keymap.c +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c @@ -185,6 +185,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) // // Non-Alpha Macros //