diff options
| author | Dan Smith <dan.smith.me@gmail.com> | 2019-07-02 17:20:44 +0100 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-07-02 09:20:44 -0700 |
| commit | 8b58c67bbb2e7eddd679a7944effef7e91aa2347 (patch) | |
| tree | 683c6c8cfc65a440f5c214bdd7d5ed07c1ad02ea | |
| parent | 8f3dabbf3f16f63c5e6b32f428b524c1dd73dc83 (diff) | |
| download | qmk_firmware-8b58c67bbb2e7eddd679a7944effef7e91aa2347.tar.gz qmk_firmware-8b58c67bbb2e7eddd679a7944effef7e91aa2347.zip | |
[Keymap] snowkuma Planck keymap (#6225)
* Snowkuma's planck layout.
Heavily influenced by both Planck and SDOTHUMs layouts. I have tried to
implement a comfortable layout with a wide stagger and a minimal set of
key usage.
Still a work in progress, hope it is useful to others.
* Adds simple readme file and images of layout
* Removes unused experimental definitions
* Update readme.md
Adds images of layout to readme.
* Removes accidentally added test keymap .swn .swo .swp files
* Updates config.h replaces include guard
As suggested by @noroadsleft replaces the include guard (ifndef, define
and endif) with just `#pragma once`.
* Replaces two extra KC with inbuilt QMK equivalents
custom_keycodes.h
Replaces `___f___` with the equivalent QMK alias `_______` KC_TRNS
`___x___` with the equivalent QMK alias `XXXXXXX` KC_NO
Updates keymap.c to reflect the changes made.
* Changes keymap.c to include QMK_KEYBOARD_H
Replaces planck.h and action_layer.h includes with the single inclusion
of QMK_KEYBOARD_H which includes action_layer.h automatically.
* Update keyboards/planck/keymaps/snowkuma/keymap.c
Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
* Update keymap.c
removes unused Coleman key code from enum planck_keycodes
* Update keymap.c removes COLEMAK key code logic
| -rw-r--r-- | keyboards/planck/keymaps/snowkuma/config.h | 46 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/snowkuma/custom_keycodes.h | 60 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/snowkuma/keymap.c | 373 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/snowkuma/my_strings.h | 4 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/snowkuma/readme.md | 14 | ||||
| -rw-r--r-- | keyboards/planck/keymaps/snowkuma/rules.mk | 19 |
6 files changed, 516 insertions, 0 deletions
diff --git a/keyboards/planck/keymaps/snowkuma/config.h b/keyboards/planck/keymaps/snowkuma/config.h new file mode 100644 index 000000000..b41ead838 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/config.h | |||
| @@ -0,0 +1,46 @@ | |||
| 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 | |||
| 40 | // Settings for homerow mods | ||
| 41 | #define TAPPING_TERM 250 | ||
| 42 | #define IGNORE_MOD_TAP_INTERRUPT | ||
| 43 | |||
| 44 | |||
| 45 | // Add the leader key feature | ||
| 46 | #define LEADER_TIMEOUT 300 | ||
diff --git a/keyboards/planck/keymaps/snowkuma/custom_keycodes.h b/keyboards/planck/keymaps/snowkuma/custom_keycodes.h new file mode 100644 index 000000000..5e4353c04 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/custom_keycodes.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | // These definitions are for convenience. | ||
| 2 | // It is not wise to put sensitive information here such as passwords | ||
| 3 | // as anyone with access to your keyboard will be able to use them! | ||
| 4 | |||
| 5 | // magnet keycodes | ||
| 6 | #define M_LEFT LCA(KC_LEFT) | ||
| 7 | #define M_TOP LCA(KC_UP) | ||
| 8 | #define M_BOTT LCA(KC_DOWN) | ||
| 9 | #define M_RGHT LCA(KC_RGHT) | ||
| 10 | |||
| 11 | #define M_TOPL LCA(KC_U) | ||
| 12 | #define M_TOPR LCA(KC_I) | ||
| 13 | #define M_BOTL LCA(KC_J) | ||
| 14 | #define M_BOTR LCA(KC_K) | ||
| 15 | |||
| 16 | #define M_L13 LCA(KC_D) | ||
| 17 | #define M_L23 LCA(KC_E) | ||
| 18 | #define M_C13 LCA(KC_F) | ||
| 19 | #define M_R23 LCA(KC_T) | ||
| 20 | #define M_R13 LCA(KC_G) | ||
| 21 | |||
| 22 | #define M_NEXT LCAG(KC_RGHT) | ||
| 23 | #define M_PREV LCAG(KC_LEFT) | ||
| 24 | |||
| 25 | #define M_MAX LCA(KC_ENT) | ||
| 26 | #define M_CEN LCA(KC_C) | ||
| 27 | #define M_REST LCA(KC_BSPC) | ||
| 28 | |||
| 29 | // Shortcuts | ||
| 30 | #define INPUT_L LCAG(KC_SPC) | ||
| 31 | #define TXT_PLS LGUI(KC_PLUS) | ||
| 32 | #define TXT_MIN LGUI(KC_MINS) | ||
| 33 | #define SC_CAPF LGUI(LSFT(KC_3)) // Capture the full screen to file | ||
| 34 | #define SC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen to file | ||
| 35 | |||
| 36 | // Special Layer keycodes | ||
| 37 | #define ESC_NUM LT(_NUMBER, KC_ESC) | ||
| 38 | #define BSP_REG LT(_REGEX, KC_BSPC) | ||
| 39 | #define DEL_REG LT(_REGEX, KC_DEL) | ||
| 40 | #define MIN_ARR LT(_ARRANGE, KC_MINS) | ||
| 41 | #define TAB_SFT LSFT_T(KC_TAB) | ||
| 42 | #define SPC_SYM LT(_SYMBOL, KC_SPC) | ||
| 43 | #define ENT_THU LT(_THUMB, KC_ENT) | ||
| 44 | #define FUN_L MO(_FUNCTION) | ||
| 45 | |||
| 46 | // HOMEROW SHIFT | ||
| 47 | #define T_SFT LSFT_T(KC_T) | ||
| 48 | #define N_SFT RSFT_T(KC_N) | ||
| 49 | |||
| 50 | // Special Characters | ||
| 51 | #define GBP LALT(KC_3) | ||
| 52 | #define EURO LALT(S(KC_2)) | ||
| 53 | |||
| 54 | // Modifier tap holds | ||
| 55 | #define Q_CTL LCTL_T(KC_Q) | ||
| 56 | #define W_ALT LALT_T(KC_W) | ||
| 57 | #define F_GUI LGUI_T(KC_F) | ||
| 58 | #define U_GUI LGUI_T(KC_U) | ||
| 59 | #define Y_ALT LALT_T(KC_Y) | ||
| 60 | #define SCL_CTL LCTL_T(KC_SCLN) | ||
diff --git a/keyboards/planck/keymaps/snowkuma/keymap.c b/keyboards/planck/keymaps/snowkuma/keymap.c new file mode 100644 index 000000000..eee8e1170 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/keymap.c | |||
| @@ -0,0 +1,373 @@ | |||
| 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 | /* _ | ||
| 18 | * ___ _ __ ___ __ __ | | __ _ _ _ __ ___ __ _ | ||
| 19 | * / __| | '_ \ / _ \ \ \ /\ / / | |/ / | | | | | '_ ` _ \ / _` | | ||
| 20 | * \__ \ | | | | | (_) | \ V V / | < | |_| | | | | | | | | (_| | | ||
| 21 | * |___/ |_| |_| \___/ \_/\_/ |_|\_\ \__,_| |_| |_| |_| \__,_| | ||
| 22 | * | ||
| 23 | * https://github.com/snowkuma | ||
| 24 | * | ||
| 25 | * version 0.1 | ||
| 26 | */ | ||
| 27 | |||
| 28 | #include QMK_KEYBOARD_H | ||
| 29 | #include "muse.h" | ||
| 30 | #include "custom_keycodes.h" | ||
| 31 | #include "my_strings.h" | ||
| 32 | |||
| 33 | extern keymap_config_t keymap_config; | ||
| 34 | |||
| 35 | enum planck_layers { | ||
| 36 | _COLEMAK = 0, | ||
| 37 | _SYMBOL, | ||
| 38 | _SFT_NAV, | ||
| 39 | _REGEX, | ||
| 40 | _NUMBER, | ||
| 41 | _ARRANGE, | ||
| 42 | _FUNCTION, | ||
| 43 | _MOUSE, | ||
| 44 | _THUMB | ||
| 45 | }; | ||
| 46 | |||
| 47 | enum planck_keycodes { | ||
| 48 | EMAIL = SAFE_RANGE, | ||
| 49 | EMOJI, | ||
| 50 | EXT_PLV, | ||
| 51 | ITERM, | ||
| 52 | LESSON, | ||
| 53 | TYPE_FU, | ||
| 54 | VS_CODE, | ||
| 55 | VIM | ||
| 56 | }; | ||
| 57 | |||
| 58 | |||
| 59 | // Tap Dance Declarations | ||
| 60 | enum { | ||
| 61 | TD_RESET = 0, | ||
| 62 | TD_TILD | ||
| 63 | }; | ||
| 64 | |||
| 65 | // Tap Dance Definitions | ||
| 66 | void safe_reset(qk_tap_dance_state_t *state, void *user_data) { | ||
| 67 | if (state->count >=3) { | ||
| 68 | // Reset the keyboard if you tap the key more than three times | ||
| 69 | reset_keyboard(); | ||
| 70 | reset_tap_dance(state); | ||
| 71 | } | ||
| 72 | }; void tilde_home(qk_tap_dance_state_t *state, void *user_data) { | ||
| 73 | if (state->count > 2) { | ||
| 74 | register_code(KC_LSFT); | ||
| 75 | register_code(KC_GRV); | ||
| 76 | } | ||
| 77 | else { | ||
| 78 | register_code(KC_LSFT); | ||
| 79 | register_code(KC_GRV); | ||
| 80 | if (state->count > 1) { | ||
| 81 | // Outputs ~/ if tilde tapped twice | ||
| 82 | unregister_code(KC_GRV); | ||
| 83 | unregister_code(KC_LSFT); | ||
| 84 | register_code(KC_SLSH); | ||
| 85 | } | ||
| 86 | } | ||
| 87 | } | ||
| 88 | |||
| 89 | void tilde_reset(qk_tap_dance_state_t *state, void *user_data) | ||
| 90 | { | ||
| 91 | if (state->count == 2) { | ||
| 92 | unregister_code(KC_SLSH); | ||
| 93 | } else { | ||
| 94 | unregister_code(KC_GRV); | ||
| 95 | unregister_code(KC_LSFT); | ||
| 96 | } | ||
| 97 | } | ||
| 98 | |||
| 99 | |||
| 100 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 101 | [TD_RESET] = ACTION_TAP_DANCE_FN (safe_reset), | ||
| 102 | [TD_TILD] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, tilde_home, tilde_reset) | ||
| 103 | }; | ||
| 104 | |||
| 105 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 106 | /* COLEMAK | ||
| 107 | * | ||
| 108 | * Base layer | ||
| 109 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 110 | * | q | w | f | p | g | | | j | l | u | y | ; | | ||
| 111 | * | CTRL | ALT | GUI | | | | | | | GUI | ALT | CTRL | | ||
| 112 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 113 | * | a | r | s | t | d | | | h | n | e | i | o | | ||
| 114 | * | | | | Shift | | | | | Shift | | | | | ||
| 115 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 116 | * | z | x | c | v | b | | | k | m | , | . | ' | | ||
| 117 | * | | | | | | | | | | | | | | ||
| 118 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 119 | * | | | | Esc | BkSp | - | Tab | Space | Enter | | | | ||
| 120 | * | | | | Num | Regex | Arrange| Shift | Sym | Thumb | | | | | ||
| 121 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 122 | */ | ||
| 123 | [_COLEMAK] = LAYOUT_planck_grid( | ||
| 124 | Q_CTL, W_ALT, F_GUI, KC_P, KC_G, _______, _______, KC_J, KC_L, U_GUI, Y_ALT, SCL_CTL, | ||
| 125 | KC_A, KC_R, KC_S, T_SFT, KC_D, _______, _______, KC_H, N_SFT, KC_E, KC_I, KC_O, | ||
| 126 | KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_QUOT, | ||
| 127 | _______, _______, _______, ESC_NUM, BSP_REG, MIN_ARR, TAB_SFT, SPC_SYM, ENT_THU, _______, _______, _______ | ||
| 128 | ), | ||
| 129 | |||
| 130 | /* Symbol & Cursor Nav layer | ||
| 131 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 132 | * | ! | @ | € | & | | | | | | Home | Up | End | PgUp | | ||
| 133 | * | | | | | | | | | | | | | | ||
| 134 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 135 | * | ~ | < | % | > | + | | | | Left | Down | Right | PgDn | | ||
| 136 | * | 2x ~/ | | | | | | | | | | | | | ||
| 137 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 138 | * | ` | | £ | = | - | | | | | | | | | ||
| 139 | * | | | | | | | | | | | | | | ||
| 140 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 141 | * | | | | _ | Del | - | | f() | | | | | | ||
| 142 | * | | | | | Mouse | | | Sym |Function| | | | | ||
| 143 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 144 | */ | ||
| 145 | [_SYMBOL] = LAYOUT_planck_grid( | ||
| 146 | KC_EXLM, KC_AT, EURO, KC_AMPR, KC_PIPE, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PGUP, | ||
| 147 | TD(TD_TILD), KC_LT, KC_PERC, KC_GT, KC_PLUS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, | ||
| 148 | KC_GRV, _______, GBP, KC_EQL, KC_MINS, _______, _______, _______, _______, _______, _______, _______, | ||
| 149 | _______, _______, _______, KC_UNDS, DEL_REG, KC_MINS, _______, _______, _______, _______, _______, _______ | ||
| 150 | ), | ||
| 151 | |||
| 152 | /* Regex layer | ||
| 153 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 154 | * | | | | | | | | * | [ | ^ | ] | : | | ||
| 155 | * | | | | | | | | | | | | | | ||
| 156 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 157 | * | | | | | | | | ? | ( | $ | ) | / | | ||
| 158 | * | | | | | | | | | | | | | | ||
| 159 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 160 | * | | | | | | | | | | { | # | } | \ | | ||
| 161 | * | | | | | | | | | | | | | | ||
| 162 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 163 | * | | | | | f() | | | Space | | | | | ||
| 164 | * | | | | | Regex | | | Mouse | Enter | | | | | ||
| 165 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 166 | */ | ||
| 167 | [_REGEX] = LAYOUT_planck_grid( | ||
| 168 | _______, _______, _______, _______, _______, _______, _______, KC_ASTR, KC_LBRC, KC_CIRC, KC_RBRC, KC_COLN, | ||
| 169 | _______, _______, _______, _______, _______, _______, _______, KC_QUES, KC_LPRN, KC_DLR, KC_RPRN, KC_SLSH, | ||
| 170 | _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_LCBR, KC_HASH, KC_RCBR, KC_BSLS, | ||
| 171 | _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______ | ||
| 172 | ), | ||
| 173 | |||
| 174 | /* Number Layer | ||
| 175 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 176 | * | : | F | E | D | G | | | * | 7 | 8 | 9 | 0 | | ||
| 177 | * | | | | | | | | | | | | | | ||
| 178 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 179 | * | # | C | B | A | + | | | . | 4 | 5 | 6 | / | | ||
| 180 | * | | | | | | | | | | | | | | ||
| 181 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 182 | * | € | x | £ | = | - | | | , | 1 | 2 | 3 | \ | | ||
| 183 | * | | | | | | | | | | | | | | ||
| 184 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 185 | * | | | | f() | | | | | | | | | | ||
| 186 | * | | | | Number | | | | Space | Enter | | | | | ||
| 187 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 188 | * | ||
| 189 | */ | ||
| 190 | [_NUMBER] = LAYOUT_planck_grid( | ||
| 191 | KC_COLN, S(KC_F), S(KC_E), S(KC_D), S(KC_G), _______, _______, KC_ASTR, KC_7, KC_8, KC_9, KC_0, | ||
| 192 | KC_HASH, S(KC_C), S(KC_B), S(KC_A), KC_PLUS, _______, _______, KC_DOT, KC_4, KC_5, KC_6, KC_SLSH, | ||
| 193 | EURO, KC_X, GBP, KC_EQL, KC_MINS, _______, _______, KC_COMM, KC_1, KC_2, KC_3, KC_BSLS, | ||
| 194 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 195 | ), | ||
| 196 | |||
| 197 | /* Mouse Layer | ||
| 198 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 199 | * | Ctrl | Alt | GUI | | | | | | | Up | | wUp | | ||
| 200 | * | | | | | | | | | | | | | | ||
| 201 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 202 | * | Btn3 | Btn2 | Btn1 | Shift | | | | | Left | Down | Right | wDn | | ||
| 203 | * | | | | | | | | | | | | | | ||
| 204 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 205 | * | | | | | | | | | | | | | | ||
| 206 | * | | | | | | | | | | | | | | ||
| 207 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 208 | * | | | | | f() | | | f() | | | | | ||
| 209 | * | | | | | Mouse | | | Mouse | | | | | | ||
| 210 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 211 | */ | ||
| 212 | [_MOUSE] = LAYOUT_planck_grid( | ||
| 213 | KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, KC_MS_U, _______, KC_WH_U, | ||
| 214 | KC_BTN3, KC_BTN2, KC_BTN1, KC_LSFT, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, | ||
| 215 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 216 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 217 | ), | ||
| 218 | |||
| 219 | /* Thumb Layer | ||
| 220 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 221 | * | Reset | | SC_CAPF| SC_CAPP| | | | |Input L | | | | | ||
| 222 | * | (3x) | | | | | | | | | | | | | ||
| 223 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 224 | * | | | | TypeFu | CMD + | | | | Caps | emoji | iterm | | | ||
| 225 | * | | | | | | | | | Lock | | | | | ||
| 226 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 227 | * | | | VS_Code| Vim | CMD - | | | | | | | | | ||
| 228 | * | | | | | | | | | | | | | | ||
| 229 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 230 | * | | | | | | | | | f() | | | | | ||
| 231 | * | | | | | | | | | Thumb | | | | | ||
| 232 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 233 | */ | ||
| 234 | [_THUMB] = LAYOUT_planck_grid( | ||
| 235 | TD(TD_RESET), _______, SC_CAPF, SC_CAPP, _______, _______, _______, _______, INPUT_L, _______, _______, _______, | ||
| 236 | _______, _______, _______, TYPE_FU, TXT_PLS, _______, _______, _______, KC_CAPS, EMOJI, ITERM, _______, | ||
| 237 | _______, _______, VS_CODE, VIM, TXT_MIN, _______, _______, _______, _______, _______, _______, _______, | ||
| 238 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 239 | ), | ||
| 240 | |||
| 241 | /* Arrange Layer | ||
| 242 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 243 | * | | | Full | | | | | | Top L | Top | Top R | | | ||
| 244 | * | | | Screen | | | | | | | | | | ||
| 245 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 246 | * | L 1/3 | L 2/3 | C 1/3 | R 2/3 | R 1/3 | | | Prev | Left | Bottom | Right | Next | | ||
| 247 | * | | | | | | | | | | | | | ||
| 248 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 249 | * | Restore| | Center | | | | | | Bottom | | Bottom | | | ||
| 250 | * | | | | | | | | | Left | | Right | | ||
| 251 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 252 | * | | | | | | f() | | | | | | | ||
| 253 | * | | | | | | Arrange| | | | | | | | ||
| 254 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 255 | */ | ||
| 256 | [_ARRANGE] = LAYOUT_planck_grid( | ||
| 257 | _______, _______, M_MAX, _______, _______, _______, _______, _______, M_TOPL, M_TOP, M_TOPR, _______, | ||
| 258 | M_L13, M_L23, M_C13, M_R23, M_R13, _______, _______, M_PREV, M_LEFT, M_BOTT, M_RGHT, M_NEXT, | ||
| 259 | M_REST, _______, M_CEN, _______, _______, _______, _______, _______, M_BOTL, _______, M_BOTR, _______, | ||
| 260 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 261 | ), | ||
| 262 | |||
| 263 | /* Function Layer | ||
| 264 | * ,-----------------------------------------------------------------------------------------------------------. | ||
| 265 | * | Ctrl | Alt | GUI | | | | | | F7 | F8 | F9 | F10 | | ||
| 266 | * | | | | | | | | | | | | | ||
| 267 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 268 | * | | | | Shift | | | | | F4 | F5 | F6 | F11 | | ||
| 269 | * | | | | | | | | | | | | | ||
| 270 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 271 | * | | | | | | | | | F1 | F2 | F3 | F12 | | ||
| 272 | * | | | | | | | | | | | | | ||
| 273 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | ||
| 274 | * | | | | | | | | f() | f() | | | | | ||
| 275 | * | | | | | | | |Function|Function| | | | | ||
| 276 | * `--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' | ||
| 277 | */ | ||
| 278 | [_FUNCTION] = LAYOUT_planck_grid( | ||
| 279 | KC_LCTL, KC_LALT, KC_LGUI, _______, _______, _______, _______, KC_F13, KC_F7, KC_F8, KC_F9, KC_F10, | ||
| 280 | _______, _______, _______, KC_LSFT, _______, _______, _______, KC_F14, KC_F4, KC_F5, KC_F6, KC_F11, | ||
| 281 | _______, _______, _______, _______, _______, _______, _______, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12, | ||
| 282 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 283 | ) | ||
| 284 | |||
| 285 | }; | ||
| 286 | |||
| 287 | #ifdef AUDIO_ENABLE | ||
| 288 | float plover_song[][2] = SONG(PLOVER_SOUND); | ||
| 289 | float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); | ||
| 290 | #endif | ||
| 291 | |||
| 292 | uint32_t layer_state_set_user(uint32_t state) { | ||
| 293 | state = update_tri_layer_state(state, _SYMBOL, _THUMB, _FUNCTION); | ||
| 294 | state = update_tri_layer_state(state, _SYMBOL, _REGEX, _MOUSE); | ||
| 295 | return state; | ||
| 296 | } | ||
| 297 | |||
| 298 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 299 | switch (keycode) { | ||
| 300 | case EMAIL: | ||
| 301 | if (record->event.pressed) { | ||
| 302 | SEND_STRING(MY_EMAIL); | ||
| 303 | } | ||
| 304 | return false; | ||
| 305 | break; | ||
| 306 | case ITERM: | ||
| 307 | if (record->event.pressed) { | ||
| 308 | SEND_STRING(SS_LGUI(" ")); | ||
| 309 | SEND_STRING("iterm" SS_TAP(X_ENTER)); | ||
| 310 | } | ||
| 311 | return false; | ||
| 312 | break; | ||
| 313 | case TYPE_FU: | ||
| 314 | if (record->event.pressed) { | ||
| 315 | SEND_STRING(SS_LGUI(" ")); | ||
| 316 | SEND_STRING("type fu" SS_TAP(X_ENTER)); | ||
| 317 | } | ||
| 318 | return false; | ||
| 319 | break; | ||
| 320 | case VIM: | ||
| 321 | if (record->event.pressed) { | ||
| 322 | SEND_STRING(SS_LGUI(" ")); | ||
| 323 | SEND_STRING("macvim.app" SS_TAP(X_ENTER)); | ||
| 324 | } | ||
| 325 | return false; | ||
| 326 | break; | ||
| 327 | case VS_CODE: | ||
| 328 | if (record->event.pressed) { | ||
| 329 | SEND_STRING(SS_LGUI(" ")); | ||
| 330 | SEND_STRING("visual studio code" SS_TAP(X_ENTER)); | ||
| 331 | } | ||
| 332 | return false; | ||
| 333 | break; | ||
| 334 | case EMOJI: | ||
| 335 | if (record->event.pressed) { | ||
| 336 | register_code(KC_LGUI); | ||
| 337 | register_code(KC_LCTL); | ||
| 338 | register_code(KC_SPC); | ||
| 339 | unregister_code(KC_LGUI); | ||
| 340 | unregister_code(KC_LCTL); | ||
| 341 | unregister_code(KC_SPC); | ||
| 342 | } | ||
| 343 | return false; | ||
| 344 | break; | ||
| 345 | } | ||
| 346 | return true; | ||
| 347 | } | ||
| 348 | |||
| 349 | bool muse_mode = false; | ||
| 350 | uint8_t last_muse_note = 0; | ||
| 351 | uint16_t muse_counter = 0; | ||
| 352 | uint8_t muse_offset = 70; | ||
| 353 | uint16_t muse_tempo = 50; | ||
| 354 | |||
| 355 | void matrix_scan_user(void) { | ||
| 356 | #ifdef AUDIO_ENABLE | ||
| 357 | if (muse_mode) { | ||
| 358 | if (muse_counter == 0) { | ||
| 359 | uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; | ||
| 360 | if (muse_note != last_muse_note) { | ||
| 361 | stop_note(compute_freq_for_midi_note(last_muse_note)); | ||
| 362 | play_note(compute_freq_for_midi_note(muse_note), 0xF); | ||
| 363 | last_muse_note = muse_note; | ||
| 364 | } | ||
| 365 | } | ||
| 366 | muse_counter = (muse_counter + 1) % muse_tempo; | ||
| 367 | } | ||
| 368 | #endif | ||
| 369 | } | ||
| 370 | |||
| 371 | void matrix_init_user(void) { | ||
| 372 | set_unicode_input_mode(UC_OSX); | ||
| 373 | } | ||
diff --git a/keyboards/planck/keymaps/snowkuma/my_strings.h b/keyboards/planck/keymaps/snowkuma/my_strings.h new file mode 100644 index 000000000..4e2ee6f77 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/my_strings.h | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | // Email address | ||
| 2 | #define MY_EMAIL "myname@email.com" | ||
| 3 | // Canned responses | ||
| 4 | #define CANNED_1 "A canned response / template for emails." | ||
diff --git a/keyboards/planck/keymaps/snowkuma/readme.md b/keyboards/planck/keymaps/snowkuma/readme.md new file mode 100644 index 000000000..b1d5ff9c9 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/readme.md | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | # Snowkuma's Planck Layout v.0.1 | ||
| 2 | |||
| 3 | Wide colemak planck layout. Heavily influenced by the ideas of sdothum and his blog. | ||
| 4 | |||
| 5 | Aims to minimize key usage to minimal set and have hands in a comfortable position. | ||
| 6 | |||
| 7 |  | ||
| 8 |  | ||
| 9 |  | ||
| 10 |  | ||
| 11 |  | ||
| 12 |  | ||
| 13 |  | ||
| 14 |  | ||
diff --git a/keyboards/planck/keymaps/snowkuma/rules.mk b/keyboards/planck/keymaps/snowkuma/rules.mk new file mode 100644 index 000000000..4a172d286 --- /dev/null +++ b/keyboards/planck/keymaps/snowkuma/rules.mk | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | SRC += muse.c | ||
| 2 | |||
| 3 | AUDIO_ENABLE = yes | ||
| 4 | BACKLIGHT_ENABLE = no | ||
| 5 | BLUETOOTH_ENABLE = no | ||
| 6 | BOOTMAGIC_ENABLE = no | ||
| 7 | COMBO_ENABLE = no | ||
| 8 | COMMAND_ENABLE = no | ||
| 9 | CONSOLE_ENABLE = no | ||
| 10 | EXTRAKEY_ENABLE = yes | ||
| 11 | LEADER_ENABLE = yes | ||
| 12 | MIDI_ENABLE = no | ||
| 13 | MOUSEKEY_ENABLE = yes | ||
| 14 | NKRO_ENABLE = yes # nkey rollover | ||
| 15 | RGBLIGHT_ENABLE = no | ||
| 16 | SLEEP_LED_ENABLE = no | ||
| 17 | STENO_ENABLE = yes | ||
| 18 | TAP_DANCE_ENABLE = yes | ||
| 19 | UNICODE_ENABLE = yes | ||
