diff options
| author | r-pufky <r-pufky@users.noreply.github.com> | 2020-12-16 22:43:49 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-16 22:43:49 -0800 |
| commit | c4aae0e93b6956e17c872ff49b79640ed7a3375f (patch) | |
| tree | 17a8859cf37496943ac59e89eaf3e18ffa837e13 | |
| parent | 49b6c5fd8352d3203aec9cdc55a4881608441589 (diff) | |
| download | qmk_firmware-c4aae0e93b6956e17c872ff49b79640ed7a3375f.tar.gz qmk_firmware-c4aae0e93b6956e17c872ff49b79640ed7a3375f.zip | |
[Keymap] Update based on massdrop/ctrl core changes n(#11134)
| -rw-r--r-- | keyboards/massdrop/ctrl/keymaps/r-pufky/config.h | 3 | ||||
| -rw-r--r-- | keyboards/massdrop/ctrl/keymaps/r-pufky/keymap.c | 44 | ||||
| -rw-r--r-- | keyboards/massdrop/ctrl/keymaps/r-pufky/readme.md | 9 |
3 files changed, 29 insertions, 27 deletions
diff --git a/keyboards/massdrop/ctrl/keymaps/r-pufky/config.h b/keyboards/massdrop/ctrl/keymaps/r-pufky/config.h index bd9c0ae2b..ddcd81630 100644 --- a/keyboards/massdrop/ctrl/keymaps/r-pufky/config.h +++ b/keyboards/massdrop/ctrl/keymaps/r-pufky/config.h | |||
| @@ -23,5 +23,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 23 | 23 | ||
| 24 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR | 24 | #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR |
| 25 | #define RGB_MATRIX_STARTUP_VAL 100 | 25 | #define RGB_MATRIX_STARTUP_VAL 100 |
| 26 | #define RGB_BACKLIGHT_COLOR_1 RGB_BLUE | 26 | #define HSV_BACKLIGHT_COLOR HSV_BLUE |
| 27 | #define RGB_BACKLIGHT_COLOR_2 RGB_BLUE | ||
diff --git a/keyboards/massdrop/ctrl/keymaps/r-pufky/keymap.c b/keyboards/massdrop/ctrl/keymaps/r-pufky/keymap.c index 718338a4c..d523dba89 100644 --- a/keyboards/massdrop/ctrl/keymaps/r-pufky/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/r-pufky/keymap.c | |||
| @@ -16,11 +16,27 @@ | |||
| 16 | 16 | ||
| 17 | #include QMK_KEYBOARD_H | 17 | #include QMK_KEYBOARD_H |
| 18 | 18 | ||
| 19 | #define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) | ||
| 20 | #define MODS_CTRL (get_mods() & MOD_MASK_CTRL) | ||
| 21 | #define MODS_ALT (get_mods() & MOD_MASK_ALT) | ||
| 22 | |||
| 19 | enum ctrl_keycodes { | 23 | enum ctrl_keycodes { |
| 20 | U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect / Always Active | 24 | U_T_AUTO = SAFE_RANGE, // USB Extra Port Toggle Auto Detect/Always Active |
| 21 | U_T_AGCR, // USB Toggle Automatic GCR control | 25 | U_T_AGCR, // USB Toggle Automatic GCR control |
| 26 | L_BRI = SAFE_RANGE, // LED Brightness Increase | ||
| 27 | L_BRD, // LED Brightness Decrease | ||
| 28 | L_PTN, // LED Pattern Select Next | ||
| 29 | L_PTP, // LED Pattern Select Previous | ||
| 30 | L_PSI, // LED Pattern Speed Increase | ||
| 31 | L_PSD, // LED Pattern Speed Decrease | ||
| 32 | L_T_MD, // LED Toggle Mode | ||
| 33 | L_T_ONF, // LED Toggle On / Off //Broken | ||
| 34 | L_ON, // LED On //Broken | ||
| 35 | L_OFF, // LED Off //Broken | ||
| 36 | L_T_BR, // LED Toggle Breath Effect | ||
| 37 | L_T_PTD, // LED Toggle Scrolling Pattern Direction | ||
| 22 | DBG_TOG, // DEBUG Toggle On / Off | 38 | DBG_TOG, // DEBUG Toggle On / Off |
| 23 | DBG_MTRX, // DEBUG Toggle Matrix Prints | 39 | DBG_MTRX, // DEBUG Toggle Matrix Print |
| 24 | DBG_KBD, // DEBUG Toggle Keyboard Prints | 40 | DBG_KBD, // DEBUG Toggle Keyboard Prints |
| 25 | DBG_MOU, // DEBUG Toggle Mouse Prints | 41 | DBG_MOU, // DEBUG Toggle Mouse Prints |
| 26 | MD_BOOT, // Restart into bootloader after hold timeout | 42 | MD_BOOT, // Restart into bootloader after hold timeout |
| @@ -38,31 +54,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 38 | [1] = LAYOUT( | 54 | [1] = LAYOUT( |
| 39 | KC_EJCT, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MUTE, _______, _______, | 55 | KC_EJCT, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MUTE, _______, _______, |
| 40 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, | 56 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, |
| 41 | _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, | 57 | _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, |
| 42 | KC_CAPS, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, | 58 | KC_CAPS, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, |
| 43 | _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_BRIU, | 59 | _______, RGB_TOG, _______, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_BRIU, |
| 44 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_BRID, KC_MFFD | 60 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_BRID, KC_MFFD |
| 45 | ), | 61 | ), |
| 46 | }; | 62 | }; |
| 47 | 63 | ||
| 48 | // Runs just one time when the keyboard initializes. | 64 | // Init keyboard static color with underglow off. |
| 49 | void matrix_init_user(void) { | 65 | void matrix_init_user(void) { |
| 50 | // https://old.reddit.com/r/MechanicalKeyboards/comments/by8zv9/editing_rgb_backlighting_with_qmk/ | 66 | rgblight_sethsv(HSV_BACKLIGHT_COLOR); |
| 51 | // https://docs.qmk.fm/#/feature_rgblight?id=colors | 67 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); |
| 52 | rgblight_sethsv(HSV_BLUE); | ||
| 53 | // Disable underglow by default | ||
| 54 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); | ||
| 55 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 56 | }; | 68 | }; |
| 57 | 69 | ||
| 58 | // Runs constantly in the background, in a loop. | 70 | // Runs constantly in the background, in a loop. |
| 59 | void matrix_scan_user(void) { | 71 | void matrix_scan_user(void) { |
| 60 | }; | 72 | }; |
| 61 | 73 | ||
| 62 | #define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) | ||
| 63 | #define MODS_CTRL (get_mods() & MOD_MASK_CTRL) | ||
| 64 | #define MODS_ALT (get_mods() & MOD_MASK_ALT) | ||
| 65 | |||
| 66 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 74 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 67 | static uint32_t key_timer; | 75 | static uint32_t key_timer; |
| 68 | 76 | ||
| @@ -110,13 +118,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 110 | if (record->event.pressed) { | 118 | if (record->event.pressed) { |
| 111 | switch (rgb_matrix_get_flags()) { | 119 | switch (rgb_matrix_get_flags()) { |
| 112 | case LED_FLAG_ALL: { | 120 | case LED_FLAG_ALL: { |
| 113 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); | 121 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR); |
| 114 | rgb_matrix_set_color_all(0, 0, 0); | 122 | rgb_matrix_set_color_all(RGB_OFF); |
| 115 | } | 123 | } |
| 116 | break; | 124 | break; |
| 117 | case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { | 125 | case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR): { |
| 118 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | 126 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); |
| 119 | rgb_matrix_set_color_all(0, 0, 0); | 127 | rgb_matrix_set_color_all(RGB_OFF); |
| 120 | } | 128 | } |
| 121 | break; | 129 | break; |
| 122 | case LED_FLAG_UNDERGLOW: { | 130 | case LED_FLAG_UNDERGLOW: { |
diff --git a/keyboards/massdrop/ctrl/keymaps/r-pufky/readme.md b/keyboards/massdrop/ctrl/keymaps/r-pufky/readme.md index 28c6f153d..515189259 100644 --- a/keyboards/massdrop/ctrl/keymaps/r-pufky/readme.md +++ b/keyboards/massdrop/ctrl/keymaps/r-pufky/readme.md | |||
| @@ -18,16 +18,11 @@ in-game overlay keys. | |||
| 18 | 18 | ||
| 19 | ### Function Layer | 19 | ### Function Layer |
| 20 | 20 | ||
| 21 |  | 21 |  |
| 22 | 22 | ||
| 23 | * Purple: Media keys. Note CD Eject on Escape, and OSX Prev/Next on Arrows. | 23 | * Purple: Media keys. Note CD Eject on Escape, and OSX Prev/Next on Arrows. |
| 24 | * Blue: Keyboard adminstration. Toggle NKRO (N Key Rollover) and enable bootloader. | 24 | * Blue: Keyboard adminstration. Toggle NKRO (N Key Rollover) and enable bootloader. |
| 25 | * Orange: RGB Controls. | 25 | * Orange: RGB Controls. |
| 26 | * Red: Danger can break things! USB autodetect (always on) and USB GCR Auto control. | ||
| 27 | * Capslock: Now requires the use of the function key. | 26 | * Capslock: Now requires the use of the function key. |
| 28 | * F13-F14: Extended function keys. | 27 | * F13-F24: Extended function keys. |
| 29 | * Bright+/-: Monitor Brightness. | 28 | * Bright+/-: Monitor Brightness. |
| 30 | |||
| 31 | ## GCR | ||
| 32 | GCR is the Global Current Register. Holds the value for current delivered to the LEDs, it's 165 | ||
| 33 | default and has range 0-255. This should be auto managed. | ||
