diff options
| -rw-r--r-- | keyboards/planck/keymaps/kifinnsson/config.h | 39 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/kifinnsson/keymap.c | 573 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/kifinnsson/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/kifinnsson/rules.mk | 1 |
4 files changed, 614 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/kifinnsson/config.h b/keyboards/planck/keymaps/kifinnsson/config.h new file mode 100644 index 000000000..6fa31cc8a --- /dev/null +++ b/keyboards/planck/keymaps/kifinnsson/config.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #ifdef AUDIO_ENABLE | ||
| 4 | #define STARTUP_SONG SONG(PLANCK_SOUND) | ||
| 5 | // #define STARTUP_SONG SONG(NO_SOUND) | ||
| 6 | |||
| 7 | #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ | ||
| 8 | SONG(COLEMAK_SOUND), \ | ||
| 9 | SONG(DVORAK_SOUND) \ | ||
| 10 | } | ||
| 11 | #endif | ||
| 12 | |||
| 13 | /* | ||
| 14 | * MIDI options | ||
| 15 | */ | ||
| 16 | |||
| 17 | /* Prevent use of disabled MIDI features in the keymap */ | ||
| 18 | //#define MIDI_ENABLE_STRICT 1 | ||
| 19 | |||
| 20 | /* enable basic MIDI features: | ||
| 21 | - MIDI notes can be sent when in Music mode is on | ||
| 22 | */ | ||
| 23 | |||
| 24 | #define MIDI_BASIC | ||
| 25 | |||
| 26 | /* enable advanced MIDI features: | ||
| 27 | - MIDI notes can be added to the keymap | ||
| 28 | - Octave shift and transpose | ||
| 29 | - Virtual sustain, portamento, and modulation wheel | ||
| 30 | - etc. | ||
| 31 | */ | ||
| 32 | //#define MIDI_ADVANCED | ||
| 33 | |||
| 34 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | ||
| 35 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 | ||
| 36 | |||
| 37 | // Most tactile encoders have detents every 4 stages | ||
| 38 | #define ENCODER_RESOLUTION 4 | ||
| 39 | |||
diff --git a/keyboards/planck/keymaps/kifinnsson/keymap.c b/keyboards/planck/keymaps/kifinnsson/keymap.c new file mode 100644 index 000000000..3917462fa --- /dev/null +++ b/keyboards/planck/keymaps/kifinnsson/keymap.c | |||
| @@ -0,0 +1,573 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | #include "muse.h" | ||
| 19 | |||
| 20 | bool is_lgui_active = false; | ||
| 21 | uint16_t lgui_timer = 0; | ||
| 22 | |||
| 23 | |||
| 24 | enum planck_layers { _COLEMAK, _LOWER, _RAISE, _EXTEND, _MACRO, _ADJUST }; | ||
| 25 | |||
| 26 | enum planck_keycodes { | ||
| 27 | KI_BSPC = SAFE_RANGE, | ||
| 28 | KI_COMM, | ||
| 29 | KI_DOT, | ||
| 30 | KI_ESC, | ||
| 31 | KI_QUOT, | ||
| 32 | KI_SCLN, | ||
| 33 | KI_SLSH, | ||
| 34 | KI_TAB, | ||
| 35 | KI_A, | ||
| 36 | KI_B, | ||
| 37 | KI_C, | ||
| 38 | KI_D, | ||
| 39 | KI_E, | ||
| 40 | KI_F, | ||
| 41 | KI_G, | ||
| 42 | KI_H, | ||
| 43 | KI_I, | ||
| 44 | KI_J, | ||
| 45 | KI_K, | ||
| 46 | KI_L, | ||
| 47 | KI_M, | ||
| 48 | KI_N, | ||
| 49 | KI_O, | ||
| 50 | KI_P, | ||
| 51 | KI_Q, | ||
| 52 | KI_R, | ||
| 53 | KI_S, | ||
| 54 | KI_T, | ||
| 55 | KI_U, | ||
| 56 | KI_V, | ||
| 57 | KI_W, | ||
| 58 | KI_X, | ||
| 59 | KI_Y, | ||
| 60 | KI_Z, | ||
| 61 | KI_WLFT, | ||
| 62 | KI_WRGT, | ||
| 63 | KI_WUP, | ||
| 64 | KI_WDN | ||
| 65 | }; | ||
| 66 | |||
| 67 | #define LOWER MO(_LOWER) | ||
| 68 | #define RAISE MO(_RAISE) | ||
| 69 | #define MACROS MO(_MACRO) | ||
| 70 | #define EXTEND MO(_EXTEND) | ||
| 71 | #define SPC_LOW LT(_LOWER, KC_SPC) | ||
| 72 | #define SPC_RAI LT(_RAISE, KC_SPC) | ||
| 73 | |||
| 74 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 75 | |||
| 76 | /* Colemak | ||
| 77 | * ,------------------------------------------------------------------------------------. | ||
| 78 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | ||
| 79 | * |------+------+------+------+------+-------+-------+------+------+------+------+------| | ||
| 80 | * | Esc | A | R | S | T | D | H | N | E | I | O | " | | ||
| 81 | * |------+------+------+------+------+-------+-------+------+------+------+------+------| | ||
| 82 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | | ||
| 83 | * |------+------+------+------+------+-------+-------+------+------+------+------+------| | ||
| 84 | * | Brite| Ctrl | Alt | GUI |Lower |SPC_LOW|SPC_RAI|Raise | Left | Down | Up |Right | | ||
| 85 | * `-------------------------------------------------------------------------------------' | ||
| 86 | */ | ||
| 87 | [_COLEMAK] = LAYOUT_planck_grid( | ||
| 88 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | ||
| 89 | EXTEND, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | ||
| 90 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
| 91 | MACROS, KC_LCTL, KC_LALT, KC_LGUI, LOWER, SPC_LOW, SPC_RAI, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT | ||
| 92 | ), | ||
| 93 | |||
| 94 | /* Lower | ||
| 95 | * ,-----------------------------------------------------------------------------------. | ||
| 96 | * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | | ||
| 97 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 98 | * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | ||
| 99 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 100 | * | | F7 | F8 | F9 | F10 | F11 | F12 |XXXXXX|XXXXXX| Home | End | | | ||
| 101 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 102 | * | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 103 | * `-----------------------------------------------------------------------------------' | ||
| 104 | */ | ||
| 105 | [_LOWER] = LAYOUT_planck_grid( | ||
| 106 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, | ||
| 107 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, | ||
| 108 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_HOME, KC_END, _______, | ||
| 109 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 110 | ), | ||
| 111 | |||
| 112 | /* Raise | ||
| 113 | * ,-----------------------------------------------------------------------------------. | ||
| 114 | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 115 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 116 | * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | | ||
| 117 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 118 | * | | F7 | F8 | F9 | F10 | F11 | F12 |XXXXXX|XXXXXX|Pg Up |Pg Dn | | | ||
| 119 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 120 | * | | | | | | | | | Next | Vol- | Vol+ | Play | | ||
| 121 | * `-----------------------------------------------------------------------------------' | ||
| 122 | */ | ||
| 123 | [_RAISE] = LAYOUT_planck_grid( | ||
| 124 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
| 125 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | ||
| 126 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, _______, | ||
| 127 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | ||
| 128 | ), | ||
| 129 | |||
| 130 | /* Extend | ||
| 131 | * ,-----------------------------------------------------------------------------------. | ||
| 132 | * | | Esc | WH_U | WBAK | WFWD | MS_U | PgUp | Home | Up | End | Del | Esc | | ||
| 133 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 134 | * | | Alt | WH_D |Shift | Ctrl | MS_D | PgDn | Left | Down |Right | Bksp | Menu | | ||
| 135 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 136 | * | WH_L | Undo | Cut | Copy |Paste |MS_B_1|MS_B_2|MS_B_3| MS_L | MS_R | WH_R | | | ||
| 137 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 138 | * | | | | | | | | | | | | | | ||
| 139 | * `-----------------------------------------------------------------------------------' | ||
| 140 | */ | ||
| 141 | [_EXTEND] = LAYOUT_planck_grid( | ||
| 142 | _______, KC_ESC, KC_WH_U, KC_WBAK, KC_WFWD, KC_MS_U, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_DEL, KC_ESC, | ||
| 143 | _______, KC_LALT, KC_WH_D, KC_LSFT, KC_LCTL, KC_MS_D, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSPC, KC_APP, | ||
| 144 | 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, _______, | ||
| 145 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 146 | ), | ||
| 147 | |||
| 148 | /* Macros | ||
| 149 | * ,--------------------------------------------------------------------------------------. | ||
| 150 | * |KI_TAB| KI_Q | KI_W | KI_F | KI_P | KI_G | KI_J | KI_L | KI_U | KI_Y |KI_SCLN|KI_BSPC| | ||
| 151 | * |------+------+------+------+------+------+------+------+-------+------+-------+-------| | ||
| 152 | * |KI_ESC| KI_A | KI_R | KI_S | KI_T | KI_D | KI_H | KI_N | KI_E | KI_I | KI_O |KI_QUOT| | ||
| 153 | * |------+------+------+------+------+------+------+------+-------+------+-------+-------| | ||
| 154 | * | | KI_Z | KI_X | KI_C | KI_V | KI_B | KI_K | KI_M |KI_COMM|KI_DOT|KI_SLSH| | | ||
| 155 | * |------+------+------+------+------+------+------+------+-------+------+-------+-------| | ||
| 156 | * | | | | | | | | |KI_WLFT|KI_WDN|KI_WUP |KI_WGRT| | ||
| 157 | * `--------------------------------------------------------------------------------------' | ||
| 158 | */ | ||
| 159 | [_MACRO] = LAYOUT_planck_grid( | ||
| 160 | KI_TAB, KI_Q, KI_W, KI_F, KI_P, KI_G, KI_J, KI_L, KI_U, KI_Y, KI_SCLN, KI_BSPC, | ||
| 161 | KI_ESC, KI_A, KI_R, KI_S, KI_T, KI_D, KI_H, KI_N, KI_E, KI_I, KI_O, KI_QUOT, | ||
| 162 | _______, KI_Z, KI_X, KI_C, KI_V, KI_B, KI_K, KI_M, KI_COMM, KI_DOT, KI_SLSH, _______, | ||
| 163 | _______, _______, _______, _______, _______, _______, _______, _______, KI_WLFT, KI_WDN, KI_WUP, KI_WRGT | ||
| 164 | ), | ||
| 165 | |||
| 166 | /* Adjust (Lower + Raise) | ||
| 167 | * ,-----------------------------------------------------------------------------------. | ||
| 168 | * | | Reset| Debug| | | | | | | | | | | ||
| 169 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 170 | * | | | | | |AGnorm|AGswap| |Colemk| | | | | ||
| 171 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 172 | * | | | | | | | |TermOn|TrmOff| | | | | ||
| 173 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 174 | * | | | | | | | | | | | | | | ||
| 175 | * `-----------------------------------------------------------------------------------' | ||
| 176 | */ | ||
| 177 | [_ADJUST] = LAYOUT_planck_grid( | ||
| 178 | _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 179 | _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, | ||
| 180 | _______, _______, _______, _______, _______, _______, _______, TERM_ON, TERM_OFF, _______, _______, _______, | ||
| 181 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 182 | ) | ||
| 183 | }; | ||
| 184 | |||
| 185 | layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } | ||
| 186 | |||
| 187 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 188 | switch (keycode) | ||
| 189 | // | ||
| 190 | // Non-Alpha Macros | ||
| 191 | // | ||
| 192 | // 'Backspace' Macro | ||
| 193 | case KI_BSPC: | ||
| 194 | if (record->event.pressed) { | ||
| 195 | // Reserved for future use | ||
| 196 | //SEND_STRING("RESERVED Backspace"); | ||
| 197 | } else { | ||
| 198 | } | ||
| 199 | return false; // Skip all further processing of this key | ||
| 200 | break; | ||
| 201 | // 'Comma' Macro | ||
| 202 | case KI_COMM: | ||
| 203 | if (record->event.pressed) { | ||
| 204 | // Reserved for future use | ||
| 205 | //SEND_STRING("RESERVED Comma"); | ||
| 206 | } else { | ||
| 207 | } | ||
| 208 | return false; // Skip all further processing of this key | ||
| 209 | break; | ||
| 210 | // 'Dot' Macro | ||
| 211 | case KI_DOT: | ||
| 212 | if (record->event.pressed) { | ||
| 213 | // Reserved for future use | ||
| 214 | //SEND_STRING("RESERVED Dot"); | ||
| 215 | } else { | ||
| 216 | } | ||
| 217 | return false; // Skip all further processing of this key | ||
| 218 | break; | ||
| 219 | // 'Escape' Macro | ||
| 220 | case KI_ESC: | ||
| 221 | if (record->event.pressed) { | ||
| 222 | // Reserved for future use | ||
| 223 | //SEND_STRING("RESERVED Escape"); | ||
| 224 | } else { | ||
| 225 | } | ||
| 226 | // 'Quote' Macro | ||
| 227 | case KI_QUOT: | ||
| 228 | if (record->event.pressed) { | ||
| 229 | // Reserved for future use | ||
| 230 | //SEND_STRING("RESERVED Quote"); | ||
| 231 | } else { | ||
| 232 | } | ||
| 233 | return false; // Skip all further processing of this key | ||
| 234 | break; | ||
| 235 | // 'Semicolon' Macro | ||
| 236 | case KI_SCLN: | ||
| 237 | if (record->event.pressed) { | ||
| 238 | // Reserved for future use | ||
| 239 | //SEND_STRING("RESERVED Semicolon"); | ||
| 240 | } else { | ||
| 241 | } | ||
| 242 | return false; // Skip all further processing of this key | ||
| 243 | break; | ||
| 244 | // 'Slash' Macro | ||
| 245 | case KI_SLSH: | ||
| 246 | if (record->event.pressed) { | ||
| 247 | // Reserved for future use | ||
| 248 | //SEND_STRING("RESERVED Slash"); | ||
| 249 | } else { | ||
| 250 | } | ||
| 251 | return false; // Skip all further processing of this key | ||
| 252 | break; | ||
| 253 | // 'Tab' Macro | ||
| 254 | case KI_TAB: | ||
| 255 | if (record->event.pressed) { | ||
| 256 | // Reserved for future use | ||
| 257 | //SEND_STRING("RESERVED Tab"); | ||
| 258 | } else { | ||
| 259 | } | ||
| 260 | return false; // Skip all further processing of this key | ||
| 261 | break; | ||
| 262 | // | ||
| 263 | // Alpha Macros | ||
| 264 | // | ||
| 265 | // 'A' Macro | ||
| 266 | case KI_A: | ||
| 267 | if (record->event.pressed) { | ||
| 268 | // Reserved for future use | ||
| 269 | //SEND_STRING("RESERVED A"); | ||
| 270 | } else { | ||
| 271 | } | ||
| 272 | return false; // Skip all further processing of this key | ||
| 273 | break; | ||
| 274 | // 'B' Macro | ||
| 275 | case KI_B: | ||
| 276 | if (record->event.pressed) { | ||
| 277 | // Reserved for future use | ||
| 278 | //SEND_STRING("RESERVED B"); | ||
| 279 | } else { | ||
| 280 | } | ||
| 281 | return false; // Skip all further processing of this key | ||
| 282 | break; | ||
| 283 | // 'C' Macro | ||
| 284 | case KI_C: | ||
| 285 | if (record->event.pressed) { | ||
| 286 | // Reserved for future use | ||
| 287 | //SEND_STRING("RESERVED C"); | ||
| 288 | } else { | ||
| 289 | } | ||
| 290 | return false; // Skip all further processing of this key | ||
| 291 | break; | ||
| 292 | // 'D' Macro | ||
| 293 | case KI_D: | ||
| 294 | if (record->event.pressed) { | ||
| 295 | // Reserved for future use | ||
| 296 | //SEND_STRING("RESERVED D"); | ||
| 297 | } else { | ||
| 298 | } | ||
| 299 | return false; // Skip all further processing of this key | ||
| 300 | break; | ||
| 301 | // 'E' Macro | ||
| 302 | case KI_E: | ||
| 303 | if (record->event.pressed) { | ||
| 304 | // Reserved for future use | ||
| 305 | //SEND_STRING("RESERVED E"); | ||
| 306 | } else { | ||
| 307 | } | ||
| 308 | return false; // Skip all further processing of this key | ||
| 309 | break; | ||
| 310 | // 'F' Macro | ||
| 311 | case KI_F: | ||
| 312 | if (record->event.pressed) { | ||
| 313 | // Reserved for future use | ||
| 314 | //SEND_STRING("RESERVED F"); | ||
| 315 | } else { | ||
| 316 | } | ||
| 317 | return false; // Skip all further processing of this key | ||
| 318 | break; | ||
| 319 | // 'G' Macro | ||
| 320 | case KI_G: | ||
| 321 | if (record->event.pressed) { | ||
| 322 | // Reserved for future use | ||
| 323 | //SEND_STRING("RESERVED G"); | ||
| 324 | } else { | ||
| 325 | } | ||
| 326 | return false; // Skip all further processing of this key | ||
| 327 | break; | ||
| 328 | // 'H' Macro | ||
| 329 | case KI_H: | ||
| 330 | if (record->event.pressed) { | ||
| 331 | // Reserved for future use | ||
| 332 | //SEND_STRING("RESERVED H"); | ||
| 333 | } else { | ||
| 334 | } | ||
| 335 | return false; // Skip all further processing of this key | ||
| 336 | break; | ||
| 337 | // 'I' Macro | ||
| 338 | case KI_I: | ||
| 339 | if (record->event.pressed) { | ||
| 340 | // Reserved for future use | ||
| 341 | //SEND_STRING("RESERVED I"); | ||
| 342 | } else { | ||
| 343 | } | ||
| 344 | return false; // Skip all further processing of this key | ||
| 345 | break; | ||
| 346 | // 'J' Macro | ||
| 347 | case KI_J: | ||
| 348 | if (record->event.pressed) { | ||
| 349 | // Reserved for future use | ||
| 350 | //SEND_STRING("RESERVED J"); | ||
| 351 | } else { | ||
| 352 | } | ||
| 353 | return false; // Skip all further processing of this key | ||
| 354 | break; | ||
| 355 | // 'K' Macro | ||
| 356 | case KI_K: | ||
| 357 | if (record->event.pressed) { | ||
| 358 | // Reserved for future use | ||
| 359 | //SEND_STRING("RESERVED K"); | ||
| 360 | } else { | ||
| 361 | } | ||
| 362 | return false; // Skip all further processing of this key | ||
| 363 | break; | ||
| 364 | // 'L' Macro | ||
| 365 | case KI_L: | ||
| 366 | if (record->event.pressed) { | ||
| 367 | // Reserved for future use | ||
| 368 | //SEND_STRING("RESERVED L"); | ||
| 369 | } else { | ||
| 370 | } | ||
| 371 | return false; // Skip all further processing of this key | ||
| 372 | break; | ||
| 373 | // 'M' Macro | ||
| 374 | case KI_M: | ||
| 375 | if (record->event.pressed) { | ||
| 376 | // Reserved for future use | ||
| 377 | //SEND_STRING("RESERVED M"); | ||
| 378 | } else { | ||
| 379 | } | ||
| 380 | return false; // Skip all further processing of this key | ||
| 381 | break; | ||
| 382 | // 'N' Macro | ||
| 383 | case KI_N: | ||
| 384 | if (record->event.pressed) { | ||
| 385 | // Reserved for future use | ||
| 386 | //SEND_STRING("RESERVED N"); | ||
| 387 | } else { | ||
| 388 | } | ||
| 389 | return false; // Skip all further processing of this key | ||
| 390 | break; | ||
| 391 | // 'O' Macro | ||
| 392 | case KI_O: | ||
| 393 | if (record->event.pressed) { | ||
| 394 | // Reserved for future use | ||
| 395 | //SEND_STRING("RESERVED O"); | ||
| 396 | } else { | ||
| 397 | } | ||
| 398 | return false; // Skip all further processing of this key | ||
| 399 | break; | ||
| 400 | // 'P' Macro | ||
| 401 | case KI_P: | ||
| 402 | if (record->event.pressed) { | ||
| 403 | // Reserved for future use | ||
| 404 | //SEND_STRING("RESERVED P"); | ||
| 405 | } else { | ||
| 406 | } | ||
| 407 | return false; // Skip all further processing of this key | ||
| 408 | break; | ||
| 409 | // 'Q' Macro | ||
| 410 | case KI_Q: | ||
| 411 | if (record->event.pressed) { | ||
| 412 | // Reserved for future use | ||
| 413 | //SEND_STRING("RESERVED Q"); | ||
| 414 | } else { | ||
| 415 | } | ||
| 416 | return false; // Skip all further processing of this key | ||
| 417 | break; | ||
| 418 | // 'R' Macro | ||
| 419 | case KI_R: | ||
| 420 | if (record->event.pressed) { | ||
| 421 | // Reserved for future use | ||
| 422 | //SEND_STRING("RESERVED R"); | ||
| 423 | } else { | ||
| 424 | } | ||
| 425 | return false; // Skip all further processing of this key | ||
| 426 | break; | ||
| 427 | // 'S' Macro | ||
| 428 | case KI_S: | ||
| 429 | if (record->event.pressed) { | ||
| 430 | // Reserved for future use | ||
| 431 | //SEND_STRING("RESERVED S"); | ||
| 432 | } else { | ||
| 433 | } | ||
| 434 | return false; // Skip all further processing of this key | ||
| 435 | break; | ||
| 436 | // 'T' Macro | ||
| 437 | case KI_T: | ||
| 438 | if (record->event.pressed) { | ||
| 439 | // Reserved for future use | ||
| 440 | //SEND_STRING("RESERVED T"); | ||
| 441 | } else { | ||
| 442 | } | ||
| 443 | return false; // Skip all further processing of this key | ||
| 444 | break; | ||
| 445 | // 'U' Macro | ||
| 446 | case KI_U: | ||
| 447 | if (record->event.pressed) { | ||
| 448 | // Reserved for future use | ||
| 449 | //SEND_STRING("RESERVED U"); | ||
| 450 | } else { | ||
| 451 | } | ||
| 452 | return false; // Skip all further processing of this key | ||
| 453 | break; | ||
| 454 | // 'V' Macro | ||
| 455 | case KI_V: | ||
| 456 | if (record->event.pressed) { | ||
| 457 | // Reserved for future use | ||
| 458 | //SEND_STRING("RESERVED V"); | ||
| 459 | } else { | ||
| 460 | } | ||
| 461 | return false; // Skip all further processing of this key | ||
| 462 | break; | ||
| 463 | // 'W' Macro | ||
| 464 | case KI_W: | ||
| 465 | if (record->event.pressed) { | ||
| 466 | // Reserved for future use | ||
| 467 | //SEND_STRING("RESERVED W"); | ||
| 468 | } else { | ||
| 469 | } | ||
| 470 | return false; // Skip all further processing of this key | ||
| 471 | break; | ||
| 472 | // 'X' Macro | ||
| 473 | case KI_X: | ||
| 474 | if (record->event.pressed) { | ||
| 475 | // Reserved for future use | ||
| 476 | //SEND_STRING("RESERVED X"); | ||
| 477 | } else { | ||
| 478 | } | ||
| 479 | return false; // Skip all further processing of this key | ||
| 480 | break; | ||
| 481 | // 'Y' Macro | ||
| 482 | case KI_Y: | ||
| 483 | if (record->event.pressed) { | ||
| 484 | // Reserved for future use | ||
| 485 | //SEND_STRING("RESERVED Y"); | ||
| 486 | } else { | ||
| 487 | } | ||
| 488 | return false; // Skip all further processing of this key | ||
| 489 | break; | ||
| 490 | // 'Z' Macro | ||
| 491 | case KI_Z: | ||
| 492 | if (record->event.pressed) { | ||
| 493 | // Reserved for future use | ||
| 494 | //SEND_STRING("RESERVED Z"); | ||
| 495 | } else { | ||
| 496 | } | ||
| 497 | return false; // Skip all further processing of this key | ||
| 498 | break; | ||
| 499 | // | ||
| 500 | // Arrow key macros | ||
| 501 | // | ||
| 502 | // Windows Win+Left tap to move window without resetting KC_LGUI | ||
| 503 | // Additional code is in matrix_scan_user() | ||
| 504 | case KI_WLFT: | ||
| 505 | if (record->event.pressed) { | ||
| 506 | if (!is_lgui_active) { | ||
| 507 | is_lgui_active = true; | ||
| 508 | register_code(KC_LGUI); | ||
| 509 | } | ||
| 510 | lgui_timer = timer_read(); | ||
| 511 | tap_code(KC_LEFT); | ||
| 512 | } else { | ||
| 513 | } | ||
| 514 | return false; // Skip all further processing of this key | ||
| 515 | break; | ||
| 516 | // Windows Win+Right tap to move window without resetting KC_LGUI | ||
| 517 | // Additional code is in matrix_scan_user() | ||
| 518 | case KI_WRGT: | ||
| 519 | if (record->event.pressed) { | ||
| 520 | if (!is_lgui_active) { | ||
| 521 | is_lgui_active = true; | ||
| 522 | register_code(KC_LGUI); | ||
| 523 | } | ||
| 524 | lgui_timer = timer_read(); | ||
| 525 | tap_code(KC_RIGHT); | ||
| 526 | } else { | ||
| 527 | } | ||
| 528 | return false; // Skip all further processing of this key | ||
| 529 | break; | ||
| 530 | // Windows Win+Up tap to move window without resetting KC_LGUI | ||
| 531 | // Additional code is in matrix_scan_user() | ||
| 532 | case KI_WUP: | ||
| 533 | if (record->event.pressed) { | ||
| 534 | if (!is_lgui_active) { | ||
| 535 | is_lgui_active = true; | ||
| 536 | register_code(KC_LGUI); | ||
| 537 | } | ||
| 538 | lgui_timer = timer_read(); | ||
| 539 | tap_code(KC_UP); | ||
| 540 | } else { | ||
| 541 | } | ||
| 542 | return false; // Skip all further processing of this key | ||
| 543 | break; | ||
| 544 | // Windows Win+Down tap to move window without resetting KC_LGUI | ||
| 545 | // Additional code is in matrix_scan_user() | ||
| 546 | case KI_WDN: | ||
| 547 | if (record->event.pressed) { | ||
| 548 | if (!is_lgui_active) { | ||
| 549 | is_lgui_active = true; | ||
| 550 | register_code(KC_LGUI); | ||
| 551 | } | ||
| 552 | lgui_timer = timer_read(); | ||
| 553 | tap_code(KC_DOWN); | ||
| 554 | } else { | ||
| 555 | } | ||
| 556 | return false; // Skip all further processing of this key | ||
| 557 | break; | ||
| 558 | default: | ||
| 559 | return true; // Process all other keycodes normally | ||
| 560 | break; | ||
| 561 | } | ||
| 562 | return true; | ||
| 563 | } | ||
| 564 | |||
| 565 | void matrix_scan_user(void) { | ||
| 566 | // Check if KC_LGUI is active in KI_WLFT, KI_WRGT, KI_WUP | ||
| 567 | if (is_lgui_active) { | ||
| 568 | if (timer_elapsed(lgui_timer) > 1000) { | ||
| 569 | unregister_code(KC_LGUI); | ||
| 570 | is_lgui_active = false; | ||
| 571 | } | ||
| 572 | } | ||
| 573 | } | ||
diff --git a/keyboards/planck/keymaps/kifinnsson/readme.md b/keyboards/planck/keymaps/kifinnsson/readme.md new file mode 100644 index 000000000..1a6c86e2a --- /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 000000000..dcf16bef3 --- /dev/null +++ b/keyboards/planck/keymaps/kifinnsson/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| SRC += muse.c | |||
