diff options
| author | Brandon Schlack <brandonschlack@gmail.com> | 2020-11-04 21:55:03 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-04 21:55:03 -0800 |
| commit | f12dcb0659918657d35dc599e69f1aec43a22e97 (patch) | |
| tree | 50e98a01f9103a82574390879f9989ef27b47e98 /keyboards/launchpad | |
| parent | 262a60733483a38ed998b6dc6495f748ba6b71b0 (diff) | |
| download | qmk_firmware-f12dcb0659918657d35dc599e69f1aec43a22e97.tar.gz qmk_firmware-f12dcb0659918657d35dc599e69f1aec43a22e97.zip | |
[Keymap] add brandonschlack userspace and keymaps (#10411)
Diffstat (limited to 'keyboards/launchpad')
| -rw-r--r-- | keyboards/launchpad/keymaps/brandonschlack/config.h | 32 | ||||
| -rw-r--r-- | keyboards/launchpad/keymaps/brandonschlack/keymap.c | 213 | ||||
| -rw-r--r-- | keyboards/launchpad/keymaps/brandonschlack/readme.md | 31 | ||||
| -rw-r--r-- | keyboards/launchpad/keymaps/brandonschlack/rules.mk | 13 |
4 files changed, 289 insertions, 0 deletions
diff --git a/keyboards/launchpad/keymaps/brandonschlack/config.h b/keyboards/launchpad/keymaps/brandonschlack/config.h new file mode 100644 index 000000000..6aaf996e5 --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/config.h | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | /* Copyright 2020 Brandon Schlack | ||
| 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 | #pragma once | ||
| 17 | |||
| 18 | /* Underlight Configuration */ | ||
| 19 | #ifdef RGB_DI_PIN | ||
| 20 | #undef RGB_DI_PIN | ||
| 21 | #define RGB_DI_PIN F4 | ||
| 22 | #undef RGBLED_NUM | ||
| 23 | #define RGBLED_NUM 2 // Number of LEDs | ||
| 24 | #endif | ||
| 25 | #define RGBLIGHT_EFFECT_BREATHING // Only have Breathing Animation | ||
| 26 | #define RGBLIGHT_HUE_STEP 10 | ||
| 27 | #define RGBLIGHT_SAT_STEP 17 | ||
| 28 | #define RGBLIGHT_VAL_STEP 17 | ||
| 29 | |||
| 30 | /* Mouse Keys Configuration */ | ||
| 31 | #define MK_3_SPEED | ||
| 32 | #define MK_W_INTERVAL_UNMOD 20 | ||
diff --git a/keyboards/launchpad/keymaps/brandonschlack/keymap.c b/keyboards/launchpad/keymaps/brandonschlack/keymap.c new file mode 100644 index 000000000..1ef77ccc6 --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/keymap.c | |||
| @@ -0,0 +1,213 @@ | |||
| 1 | /* Copyright 2020 Brandon Schlack | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | #include "brandonschlack.h" | ||
| 18 | |||
| 19 | /** | ||
| 20 | * Layer Names | ||
| 21 | */ | ||
| 22 | #define _REEDER _BASE | ||
| 23 | enum bdn9_layers { | ||
| 24 | _MEDIA = KEYMAP_LAYERS, | ||
| 25 | _NAVI, | ||
| 26 | _KARABINER | ||
| 27 | }; | ||
| 28 | |||
| 29 | /** | ||
| 30 | * Keycodes & Macros | ||
| 31 | */ | ||
| 32 | #define DF_REDR DF(_REEDER) // Set Default Layer to Reeder shortcuts | ||
| 33 | #define DF_MEDA DF(_MEDIA) // Set Default Layer to Media controls | ||
| 34 | #define DF_NAVI DF(_NAVI) // Set Default Layer to Navigation shortcuts | ||
| 35 | #define DF_KBNR DF(_KARABINER) // Set Default Layer to Basic Macro keys | ||
| 36 | |||
| 37 | // Tap Dances | ||
| 38 | enum launchpad_dances { | ||
| 39 | TD_SHLD_LGHT = 0, | ||
| 40 | TD_SHLD_ADJT, | ||
| 41 | TD_REDR_H | ||
| 42 | }; | ||
| 43 | //Tap Dance Definitions | ||
| 44 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
| 45 | [TD_SHLD_LGHT] = ACTION_TAP_DANCE_TRIGGER_LAYER(SINGLE_HOLD, _LIGHT), | ||
| 46 | [TD_SHLD_ADJT] = ACTION_TAP_DANCE_TRIGGER_LAYER(SINGLE_HOLD, _ADJUST), | ||
| 47 | [TD_REDR_H] = ACTION_TAP_DANCE_DOUBLE(KC_H, KC_R) | ||
| 48 | }; | ||
| 49 | |||
| 50 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 51 | |||
| 52 | /* Reeder | ||
| 53 | * ┌──────┬──────┐ | ||
| 54 | * │CmdTab│ View │ | ||
| 55 | * ├──────┼──────┤ | ||
| 56 | * │PrvSub│PrvItm│ | ||
| 57 | * ├──────┼──────┤ | ||
| 58 | * │NxtSub│NxtItm│ | ||
| 59 | * ├──────┼──────┤ | ||
| 60 | * │ Clr │ Sync │ | ||
| 61 | * └──────┴──────┘ | ||
| 62 | */ | ||
| 63 | [_REEDER] = LAYOUT( \ | ||
| 64 | CMD_TAB, TD(TD_REDR_H), \ | ||
| 65 | KC_P, KC_K, \ | ||
| 66 | KC_N, KC_J, \ | ||
| 67 | TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ | ||
| 68 | ), | ||
| 69 | |||
| 70 | /* Media | ||
| 71 | * ┌──────┬──────┐ | ||
| 72 | * │ Mute │ Play │ | ||
| 73 | * ├──────┼──────┤ | ||
| 74 | * │ Vol+ │PrvTrk│ | ||
| 75 | * ├──────┼──────┤ | ||
| 76 | * │ Vol- │NxtTrk│ | ||
| 77 | * ├──────┼──────┤ | ||
| 78 | * │ Spce │ Plyr │ | ||
| 79 | * └──────┴──────┘ | ||
| 80 | */ | ||
| 81 | [_MEDIA] = LAYOUT( \ | ||
| 82 | KC_MUTE, KC_MPLY, \ | ||
| 83 | KC_VOLU, KC_MNXT, \ | ||
| 84 | KC_VOLD, KC_MPRV, \ | ||
| 85 | TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ | ||
| 86 | ), | ||
| 87 | |||
| 88 | /* Navigation | ||
| 89 | * ┌──────┬──────┐ | ||
| 90 | * │ PTab │ NTab │ | ||
| 91 | * ├──────┼──────┤ | ||
| 92 | * │ SclL │ SclU │ | ||
| 93 | * ├──────┼──────┤ | ||
| 94 | * │ SclR │ SclD │ | ||
| 95 | * ├──────┼──────┤ | ||
| 96 | * │LstTab│ClsTab│ | ||
| 97 | * └──────┴──────┘ | ||
| 98 | */ | ||
| 99 | [_NAVI] = LAYOUT( \ | ||
| 100 | PRV_TAB, NXT_TAB, \ | ||
| 101 | MC_WH_L, MC_WH_U, \ | ||
| 102 | MC_WH_R, MC_WH_D, \ | ||
| 103 | TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ | ||
| 104 | ), | ||
| 105 | |||
| 106 | /* Macro | ||
| 107 | * ┌──────┬──────┐ | ||
| 108 | * │ 1 │ 2 │ | ||
| 109 | * ├──────┼──────┤ | ||
| 110 | * │ 3 │ 4 │ | ||
| 111 | * ├──────┼──────┤ | ||
| 112 | * │ 5 │ 6 │ | ||
| 113 | * ├──────┼──────┤ | ||
| 114 | * │ 7 │ 8 │ | ||
| 115 | * └──────┴──────┘ | ||
| 116 | */ | ||
| 117 | [_KARABINER] = LAYOUT( \ | ||
| 118 | KC_P1, KC_P2, \ | ||
| 119 | KC_P3, KC_P4, \ | ||
| 120 | KC_P5, KC_P6, \ | ||
| 121 | TD(TD_SHLD_LGHT), TD(TD_SHLD_ADJT) \ | ||
| 122 | ), | ||
| 123 | |||
| 124 | /* Lights | ||
| 125 | * ┌──────┬──────┐ | ||
| 126 | * │ THM+ │ HUE+ │ | ||
| 127 | * ├──────┼──────┤ | ||
| 128 | * │ SAT- │ SAT+ │ | ||
| 129 | * ├──────┼──────┤ | ||
| 130 | * │ VAL- │ VAL+ │ | ||
| 131 | * ├──────┼──────┤ | ||
| 132 | * │ XXXX │ Mde+ │ | ||
| 133 | * └──────┴──────┘ | ||
| 134 | */ | ||
| 135 | [_LIGHT] = LAYOUT( \ | ||
| 136 | RGB_THM, RGB_HUI, \ | ||
| 137 | RGB_SAD, RGB_SAI, \ | ||
| 138 | RGB_VAD, RGB_VAI, \ | ||
| 139 | XXXXXXX, RGB_MOD \ | ||
| 140 | ), | ||
| 141 | |||
| 142 | /* Adjust | ||
| 143 | * ┌──────┬──────┐ | ||
| 144 | * │ Make │ Rset │ | ||
| 145 | * ├──────┼──────┤ | ||
| 146 | * │ Redr │ Meda │ | ||
| 147 | * ├──────┼──────┤ | ||
| 148 | * │ Navi │ Mcro │ | ||
| 149 | * ├──────┼──────┤ | ||
| 150 | * │ Lght │ XXXX │ | ||
| 151 | * └──────┴──────┘ | ||
| 152 | */ | ||
| 153 | [_ADJUST] = LAYOUT( \ | ||
| 154 | QM_MAKE, RESET, \ | ||
| 155 | DF_REDR, DF_MEDA, \ | ||
| 156 | DF_NAVI, DF_KBNR, \ | ||
| 157 | TG_LGHT, XXXXXXX \ | ||
| 158 | ) | ||
| 159 | |||
| 160 | }; | ||
| 161 | |||
| 162 | void matrix_init_keymap(void) { | ||
| 163 | } | ||
| 164 | |||
| 165 | // Runs once after keyboard initializes | ||
| 166 | void keyboard_post_init_keymap(void) { | ||
| 167 | }; | ||
| 168 | |||
| 169 | /** | ||
| 170 | * Tap Dances | ||
| 171 | */ | ||
| 172 | void process_tap_dance_keycode (bool reset, uint8_t toggle_layer) { | ||
| 173 | uint16_t keycode = 0; | ||
| 174 | switch (toggle_layer) { | ||
| 175 | case _LIGHT: | ||
| 176 | switch (get_highest_layer(layer_state)) { | ||
| 177 | case _REEDER: | ||
| 178 | keycode = KC_L; | ||
| 179 | break; | ||
| 180 | case _MEDIA: | ||
| 181 | keycode = KC_SPC; | ||
| 182 | break; | ||
| 183 | case _NAVI: | ||
| 184 | keycode = REO_TAB; | ||
| 185 | break; | ||
| 186 | case _KARABINER: | ||
| 187 | keycode = KC_P7; | ||
| 188 | break; | ||
| 189 | } | ||
| 190 | break; | ||
| 191 | case _ADJUST: | ||
| 192 | switch (get_highest_layer(layer_state)) { | ||
| 193 | case _REEDER: | ||
| 194 | keycode = KC_R; | ||
| 195 | break; | ||
| 196 | case _MEDIA: | ||
| 197 | keycode = MC_PLYR; | ||
| 198 | break; | ||
| 199 | case _NAVI: | ||
| 200 | keycode = CLS_TAB; | ||
| 201 | break; | ||
| 202 | case _KARABINER: | ||
| 203 | keycode = KC_P8; | ||
| 204 | break; | ||
| 205 | } | ||
| 206 | break; | ||
| 207 | } | ||
| 208 | if (!reset) { | ||
| 209 | register_code16(keycode); | ||
| 210 | } else { | ||
| 211 | unregister_code16(keycode); | ||
| 212 | } | ||
| 213 | } | ||
diff --git a/keyboards/launchpad/keymaps/brandonschlack/readme.md b/keyboards/launchpad/keymaps/brandonschlack/readme.md new file mode 100644 index 000000000..a91a1b80a --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/readme.md | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | # brandonschlack's layout for Launchpad | ||
| 2 | Fun little macropad build, with an awesome case from [StrataKB](https://stratakb.com/store/cases/launchpad-v2-full-case). | ||
| 3 | |||
| 4 | ## Media Layer | ||
| 5 | This layer is used for media controls. Player button is a hotkey to focus the current media player with [BeardedSpice](https://beardedspice.github.io/) | ||
| 6 | | | | | ||
| 7 | |:-:|:-:| | ||
| 8 | | Mute | Play/Pause | | ||
| 9 | | Vol + | Next Track | | ||
| 10 | | Vol - | Prev Track | | ||
| 11 | | | Current Player | | ||
| 12 | --- | ||
| 13 | |||
| 14 | ## Keypad Layer | ||
| 15 | This layer is used to send keypad keys, meant to be remapped based on current app with [Karabiner](https://pqrs.org/osx/karabiner/) | ||
| 16 | | | | | ||
| 17 | |:-:|:-:| | ||
| 18 | | 1 | 2 | | ||
| 19 | | 3 | 4 | | ||
| 20 | | 5 | 6 | | ||
| 21 | | 7 | 8 | | ||
| 22 | --- | ||
| 23 | |||
| 24 | ## Magic Layer | ||
| 25 | This layer is used as a meta layer for the pad. This layer is accessed by holding key in Row 3, Col 0 | ||
| 26 | | | | | ||
| 27 | |:-:|:-:| | ||
| 28 | | MAKE | RESET | | ||
| 29 | | **Media** Layer | **Keypad** Layer| | ||
| 30 | | XXX | XXX | | ||
| 31 | | ___ | XXX | | ||
diff --git a/keyboards/launchpad/keymaps/brandonschlack/rules.mk b/keyboards/launchpad/keymaps/brandonschlack/rules.mk new file mode 100644 index 000000000..ac92af928 --- /dev/null +++ b/keyboards/launchpad/keymaps/brandonschlack/rules.mk | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # Use macropad-specific defines, layers, functions. Flash bootloader with QM_MAKE | ||
| 2 | IS_MACROPAD = yes | ||
| 3 | |||
| 4 | # Use dfu bootloader for Elite-C | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | BOOTMAGIC_ENABLE = lite | ||
| 9 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. | ||
| 10 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 11 | MOUSEKEY_ENABLE = yes # Use mouse keys for scrolling. | ||
| 12 | COMMAND_ENABLE = no # Disable Command, breaks with Mouse Keys set to constant. | ||
| 13 | TAP_DANCE_ENABLE = yes # Use tap dance | ||
