From 6b0ff04b5edcc49eec09972d7c8fa5615ab7e624 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 3 Jul 2022 19:45:53 -0600 Subject: [PATCH 01/32] chore: add my keyboards. --- .../loop/keymaps/PeterFalken/keymap.c | 53 +++++ .../loop/keymaps/PeterFalken/readme.md | 1 + .../nano/keymaps/PeterFalken/keymap.c | 30 +++ .../nano/keymaps/PeterFalken/readme.md | 1 + .../work_board/keymaps/PeterFalken/keymap.c | 207 ++++++++++++++++++ .../work_board/keymaps/PeterFalken/readme.md | 1 + .../work_board/keymaps/PeterFalken/rules.mk | 1 + 7 files changed, 294 insertions(+) create mode 100644 keyboards/work_louder/loop/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/work_louder/loop/keymaps/PeterFalken/readme.md create mode 100644 keyboards/work_louder/nano/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/work_louder/nano/keymaps/PeterFalken/readme.md create mode 100644 keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md create mode 100644 keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/loop/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..aafe366180ee --- /dev/null +++ b/keyboards/work_louder/loop/keymaps/PeterFalken/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2021 Work Louder + * + * 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1) + ), + [1] = LAYOUT( + QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, MO(2), _______ + ), + [2] = LAYOUT( + QK_BOOT, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______ + ) +}; +// clang-format on + +// bool encoder_update_user(uint8_t index, bool clockwise) { +// if (index == 0) { +// if (clockwise) { +// tap_code(KC_VOLD); +// } else { +// tap_code(KC_VOLU); +// } +// } else if (index == 2) { +// if (clockwise) { +// tap_code(KC_MPRV); +// } else { +// tap_code(KC_MNXT); +// } +// } else { +// if (clockwise) { +// rgb_matrix_step_reverse(); +// } else { +// rgb_matrix_step(); +// } +// } +// return false; +// } diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/readme.md b/keyboards/work_louder/loop/keymaps/PeterFalken/readme.md new file mode 100644 index 000000000000..d11673e0625b --- /dev/null +++ b/keyboards/work_louder/loop/keymaps/PeterFalken/readme.md @@ -0,0 +1 @@ +# The default keymap for loop diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/nano/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..9f7433123cc9 --- /dev/null +++ b/keyboards/work_louder/nano/keymaps/PeterFalken/keymap.c @@ -0,0 +1,30 @@ +/* Copyright 2021 Drashna Jael're + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT(KC_PSCR, KC_LSFT, MO(1)), + [1] = LAYOUT(QK_BOOT, KC_LCTL, _______)}; + +// bool encoder_update_user(uint8_t index, bool clockwise) { +// if (clockwise) { +// tap_code(KC_PGDN); +// } else { +// tap_code(KC_PGUP); +// } +// return false; +// } diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/readme.md b/keyboards/work_louder/nano/keymaps/PeterFalken/readme.md new file mode 100644 index 000000000000..1ca552d7219c --- /dev/null +++ b/keyboards/work_louder/nano/keymaps/PeterFalken/readme.md @@ -0,0 +1 @@ +# The default keymap for nano diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..59bb437d9d09 --- /dev/null +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c @@ -0,0 +1,207 @@ +/* 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 + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, +}; + +enum tap_dances { + ENC_TAP, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TD(ENC_TAP), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, _______, + KC_TAB, 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 , + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT( + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, _______, + KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( + 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_DEL, 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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( + 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_DEL, 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, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + + +void dance_enc_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_MPLY); + } else if (state->count == 2) { + register_code(KC_MNXT); + } else { + register_code(KC_MPRV); + } +} + +void dance_enc_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code(KC_MPLY); + } else if (state->count == 2) { + unregister_code(KC_MNXT); + } else { + unregister_code(KC_MPRV); + } +} + +// Tap Dance definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [ENC_TAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_enc_finished, dance_enc_reset), +}; + +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) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + } + return true; +} diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md b/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md new file mode 100644 index 000000000000..3b2d89b9a6ae --- /dev/null +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md @@ -0,0 +1 @@ +# The default keymap for work diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes From e31c8064bbb033b6e59688271f4b4191b47e5c95 Mon Sep 17 00:00:00 2001 From: "Peter.Falken" Date: Sun, 22 May 2022 09:51:51 -0600 Subject: [PATCH 02/32] chore: allow disabling RGB_MATRIX_ANIMATIONs chore: change RESET to QK_BOOT chore: reduce USB power consumption --- .../launch_1/keymaps/PeterFalken/config.h | 73 +++++++++ .../launch_1/keymaps/PeterFalken/keymap.c | 143 ++++++++++++++++++ .../launch_1/keymaps/PeterFalken/rules.mk | 15 ++ 3 files changed, 231 insertions(+) create mode 100644 keyboards/system76/launch_1/keymaps/PeterFalken/config.h create mode 100644 keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..746d567a213f --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2022 Luis Garcia + * + * 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 3 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 . + */ + +#pragma once + +#include "config_common.h" + +// Avoid warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Configuration +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +// Space optimizations - 01 +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE +// #define NO_ACTION_ONESHOT // Need to check +// #define NO_ACTION_TAPPING // Need to check + +// Space optimizations - 02 +#ifdef RGB_MATRIX_ENABLE + // Remove predefined values + #undef RGB_DISABLE_TIMEOUT + #undef RGB_DISABLE_AFTER_TIMEOUT // OBSOLE - Removing manually before deprecation + #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS + #undef RGB_MATRIX_STARTUP_MODE + #undef RGB_MATRIX_STARTUP_HUE + #undef RGB_MATRIX_STARTUP_SAT + #undef RGB_MATRIX_STARTUP_VAL + + // Redefine values + // Number of milliseconds to wait until RGB automatically turns off + #define RGB_DISABLE_TIMEOUT 10000 + // Limits maximum brightness of LEDs to 120 out of 255 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 + // Sets the default startup mode + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_active_keys + // Sets the default hue, saturation & brightness values + #define RGB_MATRIX_STARTUP_HUE 0 + #define RGB_MATRIX_STARTUP_SAT 0 + #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS/3 + + // Disable RGB_MATRIX_ANIMATIONS - Custom definition + #define DISABLE_RGB_MATRIX_ANIMATIONS + // Undefine default RGB_MATRIX_ANIMATIONS to free up space + #undef ENABLE_RGB_MATRIX_CYCLE_ALL + #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN + #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL + #undef ENABLE_RGB_MATRIX_RAINDROPS + #undef ENABLE_RGB_MATRIX_SPLASH + #undef ENABLE_RGB_MATRIX_MULTISPLASH +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..91525db10fe6 --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c @@ -0,0 +1,143 @@ +/* + * Copyright (C) 2021 System76 + * + * 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 3 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 + +// Custom keycode definitions +enum custom_keycodes { + KC_LAUNCHPAD = SAFE_RANGE +}; + +// Custom definitions for keys +#define CK_M1 C(KC_UP) // KC_MISSION_CONTROL_ALL +#define CK_M2 C(KC_DOWN) // KC_MISSION_CONTROL_APP +#define CK_LP KC_LAUNCHPAD // LaunchPad Key +#define CK_CO G(KC_C) // COPY = CMD + C +#define CK_CU G(KC_X) // CUT = CMD + X +#define CK_MV LAG(KC_V) // MOVE = CMD + OPT + V +#define CK_PA G(KC_V) // PASTE = CMD + V +#define CK_UN G(KC_Z) // UNDO = CMD + Z + + +// Process custom keycodes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // case KC_MISSION_CONTROL: + // if (record->event.pressed) { + // host_consumer_send(0x29F); + // } else { + // host_consumer_send(0); + // } + // return false; // Skip all further processing of this key + case KC_LAUNCHPAD: + if (record->event.pressed) { + host_consumer_send(0x2A0); + } else { + host_consumer_send(0); + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer + _________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE || HOME | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | || | +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSPACE || PGUP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | [ | ] | | || | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | \ || PGDN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | : | " | | | | + | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | | END | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | < | > | ? | | | + | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|________ + | | | | | | | | | | | | | | + | MO.1 | RCTL | LALT | LGUI | SPACE | SPACE | RGUI | RALT | RCTRL | | LEFT | DOWN | RIGHT | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + */ + + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + MO(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Layer 1, function layer + _________________________________________________________________________________________________________________________________ ________ +| | | | | | | | | | | | | | || PLAY/ | +| | | M.AP | M.AL | LPAD | | | | | | | | | || PAUSE | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | LED | LED | LED | || VOLUME | +| TO.0 | TO.1 | TO.2 | TO.3 | | | | | | | TOGGLE | DOWN | UP | || UP | +|________|________|________|________|________|________|________|________|________|________|________|________|________|____________||________| +| | | | | | | | | | | | | | || VOLUME | +|PRINT SCREEN| | | | | | HOME | PGDN | PGUP | END | | | | SLEP || DOWN | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|________||________| + | | | | | | | | | | | | | | | | + | | | | | | | LEFT | DOWN | UP | RIGHT | | | | | MUTE | + |____________|________|________|________|________|________|________|________|________|________|________|________|____________|___|________| + | | | | | | | | | | | | | | + | | UN | CU | CO | PA | MV | | | | | | | PGUP | + |________________|________|________|________|________|________|________|________|________|________|________|____________|________|________ + | | | | | | | | | | | | | | + | | | | | | | | | TO.0 | | HOME | PGDN | END | + |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| + + * `QK_BOOT' resets the controller and puts the board into firmware flashing mode. + * If this key is hit accidentally, just unplug the board and plug it back in. + */ + + [1] = LAYOUT( + KC_TRNS, KC_TRNS, CK_M2, CK_M1, CK_LP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, + TO(0), TO(1), TO(2), TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAD, RGB_VAI, KC_TRNS, KC_VOLU, + KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, + KC_TRNS, CK_UN, CK_CU, CK_CO, CK_PA, CK_MV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + TO(0), TO(1), TO(2), TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT( + QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + TO(0), TO(1), TO(2), TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..26b12549c509 --- /dev/null +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk @@ -0,0 +1,15 @@ +# Enable VIA support +ENABLE_VIA = yes + +# Enable Link-Time Optimization for smaller binary +LTO_ENABLE = yes + +# Remove unused features to free up space +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no +# EXTRAKEY_ENABLE = no +SPACE_CADET_ENABLE = no # Need to check space difference +GRAVE_ESC_ENABLE = no # Not needed - separate ESC key +MAGIC_ENABLE = no # No MAGIC functions needed +# MUSIC_ENABLE = no # Not used \ No newline at end of file From a2ad130840f5bbca7e268aa7be1444b2a62af54b Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Thu, 30 Jun 2022 22:14:05 -0600 Subject: [PATCH 03/32] chore: enable CAPS_WORD --- .../launch_1/keymaps/PeterFalken/config.h | 8 ++----- .../launch_1/keymaps/PeterFalken/keymap.c | 3 ++- .../launch_1/keymaps/PeterFalken/rules.mk | 21 +++++++------------ 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h index 746d567a213f..045ebe4030ba 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h @@ -24,20 +24,16 @@ #define USB_MAX_POWER_CONSUMPTION 100 #endif -// Configuration -#define RGB_DISABLE_WHEN_USB_SUSPENDED - // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE -// #define NO_ACTION_ONESHOT // Need to check -// #define NO_ACTION_TAPPING // Need to check +#define NO_ACTION_ONESHOT // Check implications +#define NO_ACTION_TAPPING // Check implications // Space optimizations - 02 #ifdef RGB_MATRIX_ENABLE // Remove predefined values #undef RGB_DISABLE_TIMEOUT - #undef RGB_DISABLE_AFTER_TIMEOUT // OBSOLE - Removing manually before deprecation #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS #undef RGB_MATRIX_STARTUP_MODE #undef RGB_MATRIX_STARTUP_HUE diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c index 91525db10fe6..8647fa198656 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c @@ -23,6 +23,7 @@ enum custom_keycodes { }; // Custom definitions for keys +#define CK_CW CAPS_WORD // CAPS_WORD for Caps Word feature #define CK_M1 C(KC_UP) // KC_MISSION_CONTROL_ALL #define CK_M2 C(KC_DOWN) // KC_MISSION_CONTROL_APP #define CK_LP KC_LAUNCHPAD // LaunchPad Key @@ -84,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, + CK_CW, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_END, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk index 26b12549c509..bb0690c2acd1 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk @@ -1,15 +1,10 @@ -# Enable VIA support -ENABLE_VIA = yes +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes -# Enable Link-Time Optimization for smaller binary -LTO_ENABLE = yes - -# Remove unused features to free up space -CONSOLE_ENABLE = no -COMMAND_ENABLE = no -MOUSEKEY_ENABLE = no -# EXTRAKEY_ENABLE = no -SPACE_CADET_ENABLE = no # Need to check space difference -GRAVE_ESC_ENABLE = no # Not needed - separate ESC key +# Disable QMK features +GRAVE_ESC_ENABLE = no # Not needed MAGIC_ENABLE = no # No MAGIC functions needed -# MUSIC_ENABLE = no # Not used \ No newline at end of file +SPACE_CADET_ENABLE = no # Free up space + +# Enable QMK features +CAPS_WORD_ENABLE = yes From 25c1119907467b818e4847e145372ebfebfda90d Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sat, 2 Jul 2022 10:05:37 -0600 Subject: [PATCH 04/32] chore: add USB_SUSPEND_WAKEUP_DELAY --- .../system76/launch_1/keymaps/PeterFalken/config.h | 13 +++++++++---- .../system76/launch_1/keymaps/PeterFalken/rules.mk | 7 ++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h index 045ebe4030ba..a9fb112c06a0 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h @@ -19,16 +19,21 @@ #include "config_common.h" -// Avoid warning - "Attached USB accessory uses too much power." +// Fix warning - "Attached USB accessory uses too much power." #ifndef USB_MAX_POWER_CONSUMPTION #define USB_MAX_POWER_CONSUMPTION 100 #endif +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE -#define NO_ACTION_ONESHOT // Check implications -#define NO_ACTION_TAPPING // Check implications +//#define NO_ACTION_ONESHOT // 18016 - 17348 +//#define NO_ACTION_TAPPING // 18016 - 16158 // Space optimizations - 02 #ifdef RGB_MATRIX_ENABLE @@ -42,7 +47,7 @@ // Redefine values // Number of milliseconds to wait until RGB automatically turns off - #define RGB_DISABLE_TIMEOUT 10000 + #define RGB_DISABLE_TIMEOUT 5000 // Limits maximum brightness of LEDs to 120 out of 255 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // Sets the default startup mode diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk index bb0690c2acd1..1dcefc60cd5c 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk @@ -2,9 +2,10 @@ # ENABLE_VIAL = yes # Disable QMK features -GRAVE_ESC_ENABLE = no # Not needed -MAGIC_ENABLE = no # No MAGIC functions needed -SPACE_CADET_ENABLE = no # Free up space +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # No MAGIC functions needed +RAW_ENABLE = no # Disable raw HID commands +SPACE_CADET_ENABLE = no # Free up space # Enable QMK features CAPS_WORD_ENABLE = yes From 241c6ef84faa74a7f5847e4eb0f15767d456eefe Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Wed, 27 Jul 2022 23:44:39 -0600 Subject: [PATCH 05/32] chore: add planck & preonic keymaps --- keyboards/planck/keymaps/PeterFalken/config.h | 86 +++++ keyboards/planck/keymaps/PeterFalken/keymap.c | 353 ++++++++++++++++++ .../planck/keymaps/PeterFalken/readme.md | 2 + keyboards/planck/keymaps/PeterFalken/rules.mk | 13 + .../preonic/keymaps/PeterFalken/config.h | 48 +++ .../preonic/keymaps/PeterFalken/keymap.c | 315 ++++++++++++++++ .../preonic/keymaps/PeterFalken/readme.md | 1 + .../preonic/keymaps/PeterFalken/rules.mk | 1 + 8 files changed, 819 insertions(+) create mode 100644 keyboards/planck/keymaps/PeterFalken/config.h create mode 100644 keyboards/planck/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/planck/keymaps/PeterFalken/readme.md create mode 100644 keyboards/planck/keymaps/PeterFalken/rules.mk create mode 100644 keyboards/preonic/keymaps/PeterFalken/config.h create mode 100644 keyboards/preonic/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/preonic/keymaps/PeterFalken/readme.md create mode 100644 keyboards/preonic/keymaps/PeterFalken/rules.mk diff --git a/keyboards/planck/keymaps/PeterFalken/config.h b/keyboards/planck/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..ea333518607d --- /dev/null +++ b/keyboards/planck/keymaps/PeterFalken/config.h @@ -0,0 +1,86 @@ +/* Copyright 2015-2021 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 . + */ + +#pragma once + +#include "config_common.h" + +// Fix warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + +// Space optimizations - 01 +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Remove predefined values +#undef RGB_DISABLE_TIMEOUT +#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +#undef RGB_MATRIX_STARTUP_MODE +#undef RGB_MATRIX_STARTUP_HUE +#undef RGB_MATRIX_STARTUP_SAT +#undef RGB_MATRIX_STARTUP_VAL + +// Redefine values +// Number of milliseconds to wait until RGB automatically turns off +#define RGB_DISABLE_TIMEOUT 5000 +// Limits maximum brightness of LEDs to 120 out of 255 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 +// Sets the default startup mode +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_active_keys +// Sets the default hue, saturation & brightness values +#define RGB_MATRIX_STARTUP_HUE 0 +#define RGB_MATRIX_STARTUP_SAT 0 +#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS/2 + + +#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 + */ + +/* 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/PeterFalken/keymap.c b/keyboards/planck/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..3453d417462b --- /dev/null +++ b/keyboards/planck/keymaps/PeterFalken/keymap.c @@ -0,0 +1,353 @@ +/* Copyright 2015-2021 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" + + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* 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 | Space |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, + KC_ESC, 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | 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_DEL, 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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |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_DEL, 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, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +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) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } + return true; +} + +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } + return true; +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/PeterFalken/readme.md b/keyboards/planck/keymaps/PeterFalken/readme.md new file mode 100644 index 000000000000..de9680b49851 --- /dev/null +++ b/keyboards/planck/keymaps/PeterFalken/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/PeterFalken/rules.mk b/keyboards/planck/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..d32a991a6d81 --- /dev/null +++ b/keyboards/planck/keymaps/PeterFalken/rules.mk @@ -0,0 +1,13 @@ +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes + +# Disable QMK features +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # No MAGIC functions needed +RAW_ENABLE = no # Disable raw HID commands +SPACE_CADET_ENABLE = no # Free up space + +# Enable QMK features +CAPS_WORD_ENABLE = yes + +SRC += muse.c diff --git a/keyboards/preonic/keymaps/PeterFalken/config.h b/keyboards/preonic/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..8756e5012c79 --- /dev/null +++ b/keyboards/preonic/keymaps/PeterFalken/config.h @@ -0,0 +1,48 @@ +/* Copyright 2015-2021 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 . + */ + +#pragma once + +#ifdef AUDIO_ENABLE +# define STARTUP_SONG SONG(PREONIC_SOUND) +// #define STARTUP_SONG SONG(NO_SOUND) + +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* 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 diff --git a/keyboards/preonic/keymaps/PeterFalken/keymap.c b/keyboards/preonic/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..ef7614393d76 --- /dev/null +++ b/keyboards/preonic/keymaps/PeterFalken/keymap.c @@ -0,0 +1,315 @@ +/* Copyright 2015-2021 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" + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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 | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, + KC_ESC, 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, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + KC_DEL, 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,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Pg Up| Pg Dn| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_DEL, 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, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | |TermOf|TermOn| | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Aud cy|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef RGBLIGHT_ENABLE + rgblight_step(); + #endif + #ifdef __AVR__ + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + writePinHigh(E6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } + return true; +} + +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } + return true; +} + + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/PeterFalken/readme.md b/keyboards/preonic/keymaps/PeterFalken/readme.md new file mode 100644 index 000000000000..e911968dd964 --- /dev/null +++ b/keyboards/preonic/keymaps/PeterFalken/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/PeterFalken/rules.mk b/keyboards/preonic/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/PeterFalken/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 3aecf7e5ae944129ff6778b32a2785dbe0317c9b Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Fri, 29 Jul 2022 20:50:50 -0600 Subject: [PATCH 06/32] chore: update planck & preonic configuration & keymaps --- keyboards/planck/keymaps/PeterFalken/config.h | 28 +- keyboards/planck/keymaps/PeterFalken/keymap.c | 254 ++++-------------- keyboards/planck/keymaps/PeterFalken/rules.mk | 12 +- .../preonic/keymaps/PeterFalken/config.h | 32 ++- .../preonic/keymaps/PeterFalken/keymap.c | 251 ++++++----------- .../preonic/keymaps/PeterFalken/rules.mk | 22 ++ 6 files changed, 198 insertions(+), 401 deletions(-) diff --git a/keyboards/planck/keymaps/PeterFalken/config.h b/keyboards/planck/keymaps/PeterFalken/config.h index ea333518607d..9ae01f11a81b 100644 --- a/keyboards/planck/keymaps/PeterFalken/config.h +++ b/keyboards/planck/keymaps/PeterFalken/config.h @@ -28,31 +28,19 @@ #define USB_SUSPEND_WAKEUP_DELAY 200 #endif +// Setup RGB Lighting (Underglow) +#define RGBLIGHT_SLEEP +#define RGBLIGHT_DISABLE_KEYCODES +#define RGBLIGHT_DEFAULT_VAL 60 + // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE -// Remove predefined values -#undef RGB_DISABLE_TIMEOUT -#undef RGB_MATRIX_MAXIMUM_BRIGHTNESS -#undef RGB_MATRIX_STARTUP_MODE -#undef RGB_MATRIX_STARTUP_HUE -#undef RGB_MATRIX_STARTUP_SAT -#undef RGB_MATRIX_STARTUP_VAL - -// Redefine values -// Number of milliseconds to wait until RGB automatically turns off -#define RGB_DISABLE_TIMEOUT 5000 -// Limits maximum brightness of LEDs to 120 out of 255 -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 -// Sets the default startup mode -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_active_keys -// Sets the default hue, saturation & brightness values -#define RGB_MATRIX_STARTUP_HUE 0 -#define RGB_MATRIX_STARTUP_SAT 0 -#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS/2 - +// Space optimizations - 02 +#undef RGBLIGHT_ANIMATIONS +// Default settings #ifdef AUDIO_ENABLE # define STARTUP_SONG SONG(PLANCK_SOUND) // #define STARTUP_SONG SONG(NO_SOUND) diff --git a/keyboards/planck/keymaps/PeterFalken/keymap.c b/keyboards/planck/keymaps/PeterFalken/keymap.c index 3453d417462b..77f9e4534463 100644 --- a/keyboards/planck/keymaps/PeterFalken/keymap.c +++ b/keyboards/planck/keymaps/PeterFalken/keymap.c @@ -17,26 +17,31 @@ #include QMK_KEYBOARD_H #include "muse.h" - enum planck_layers { _QWERTY, - _COLEMAK, - _DVORAK, _LOWER, _RAISE, - _PLOVER, _ADJUST }; -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - BACKLIT, - EXT_PLV +// Custom keycode definitions +enum custom_keycodes { + KC_LAUNCHPAD = SAFE_RANGE }; +// Custom definitions for keys +#define CK_CW CAPS_WORD // CAPS_WORD for Caps Word feature +#define CK_SLP KC_SLEP // System Sleep +#define CK_M1 C(KC_UP) // Mission Control - All apps +#define CK_M2 C(KC_DOWN) // Mission Control - One apps +#define CK_LP KC_LAUNCHPAD // LaunchPad Key +#define CK_CO G(KC_C) // COPY = CMD + C +#define CK_CU G(KC_X) // CUT = CMD + X +#define CK_MV LAG(KC_V) // MOVE = CMD + OPT + V +#define CK_PA G(KC_V) // PASTE = CMD + V +#define CK_UN G(KC_Z) // UNDO = CMD + Z + +// Layer activation #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) @@ -50,50 +55,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | | Ctrl | Alt | GUI | LWR | Space | RSE | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_planck_grid( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* 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 | Space |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, - KC_ESC, 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 , - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_planck_grid( - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -132,41 +101,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), -/* Plover layer (http://opensteno.org) - * ,-----------------------------------------------------------------------------------. - * | # | # | # | # | # | # | # | # | # | # | # | # | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | S | T | P | H | * | * | F | P | L | T | D | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | S | K | W | R | * | * | R | B | G | S | Z | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Exit | | | A | O | | E | U | | | | - * `-----------------------------------------------------------------------------------' - */ -[_PLOVER] = LAYOUT_planck_grid( - KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , - XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX -), - /* Adjust (Lower + Raise) - * v------------------------RGB CONTROL--------------------v * ,-----------------------------------------------------------------------------------. - * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * | RSET | | M.AP | M.AL | LPAD | | | | | | | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * | | | | | | | | | | | | SLEP | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * | CPWD | UN | CU | CO | PA | MV | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( - _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + QK_BOOT, _______, CK_M2, CK_M1, CK_LP, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_SLP, + CK_CW, CK_UN, CK_CU, CK_CO, CK_PA, CK_MV, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; @@ -180,146 +130,47 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } + +// Process custom keycodes bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - case BACKLIT: + case KC_LAUNCHPAD: if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - #ifdef KEYBOARD_planck_rev5 - writePinLow(E6); - #endif + host_consumer_send(0x2A0); } else { - unregister_code(KC_RSFT); - #ifdef KEYBOARD_planck_rev5 - writePinHigh(E6); - #endif + host_consumer_send(0); } - return false; - break; - case PLOVER: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - stop_all_notes(); - PLAY_SONG(plover_song); - #endif - layer_off(_RAISE); - layer_off(_LOWER); - layer_off(_ADJUST); - layer_on(_PLOVER); - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - keymap_config.raw = eeconfig_read_keymap(); - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); - } - return false; - break; - case EXT_PLV: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(plover_gb_song); - #endif - layer_off(_PLOVER); - } - return false; - break; + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally } - return true; } + bool muse_mode = false; uint8_t last_muse_note = 0; uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update_user(uint8_t index, bool clockwise) { - if (muse_mode) { - if (IS_LAYER_ON(_RAISE)) { - if (clockwise) { - muse_offset++; - } else { - muse_offset--; - } - } else { - if (clockwise) { - muse_tempo+=1; - } else { - muse_tempo-=1; - } - } - } else { - if (clockwise) { - #ifdef MOUSEKEY_ENABLE - tap_code(KC_MS_WH_DOWN); - #else - tap_code(KC_PGDN); - #endif - } else { - #ifdef MOUSEKEY_ENABLE - tap_code(KC_MS_WH_UP); - #else - tap_code(KC_PGUP); - #endif - } - } - return true; -} - -bool dip_switch_update_user(uint8_t index, bool active) { - switch (index) { - case 0: { -#ifdef AUDIO_ENABLE - static bool play_sound = false; -#endif - if (active) { -#ifdef AUDIO_ENABLE - if (play_sound) { PLAY_SONG(plover_song); } -#endif - layer_on(_ADJUST); - } else { -#ifdef AUDIO_ENABLE - if (play_sound) { PLAY_SONG(plover_gb_song); } -#endif - layer_off(_ADJUST); - } -#ifdef AUDIO_ENABLE - play_sound = true; -#endif - break; - } - case 1: - if (active) { - muse_mode = true; - } else { - muse_mode = false; - } - } - return true; -} +// bool dip_switch_update_user(uint8_t index, bool active) { +// switch (index) { +// case 0: +// if (active) { +// layer_on(_ADJUST); +// } else { +// layer_off(_ADJUST); +// } +// break; +// case 1: +// if (active) { +// muse_mode = true; +// } else { +// muse_mode = false; +// } +// } +// return true; +// } void matrix_scan_user(void) { #ifdef AUDIO_ENABLE @@ -342,6 +193,7 @@ void matrix_scan_user(void) { #endif } + bool music_mask_user(uint16_t keycode) { switch (keycode) { case RAISE: diff --git a/keyboards/planck/keymaps/PeterFalken/rules.mk b/keyboards/planck/keymaps/PeterFalken/rules.mk index d32a991a6d81..1ce483ed758b 100644 --- a/keyboards/planck/keymaps/PeterFalken/rules.mk +++ b/keyboards/planck/keymaps/PeterFalken/rules.mk @@ -2,12 +2,22 @@ # ENABLE_VIAL = yes # Disable QMK features +BOOTMAGIC_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +ENCODER_ENABLE = no # Won't use for now GRAVE_ESC_ENABLE = no # Not needed -MAGIC_ENABLE = no # No MAGIC functions needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Won't use for now SPACE_CADET_ENABLE = no # Free up space # Enable QMK features CAPS_WORD_ENABLE = yes +# Enable Link Time Optimizations +LTO_ENABLE = yes + SRC += muse.c diff --git a/keyboards/preonic/keymaps/PeterFalken/config.h b/keyboards/preonic/keymaps/PeterFalken/config.h index 8756e5012c79..9ae01f11a81b 100644 --- a/keyboards/preonic/keymaps/PeterFalken/config.h +++ b/keyboards/preonic/keymaps/PeterFalken/config.h @@ -16,16 +16,39 @@ #pragma once +#include "config_common.h" + +// Fix warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + +// Setup RGB Lighting (Underglow) +#define RGBLIGHT_SLEEP +#define RGBLIGHT_DISABLE_KEYCODES +#define RGBLIGHT_DEFAULT_VAL 60 + +// Space optimizations - 01 +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Space optimizations - 02 +#undef RGBLIGHT_ANIMATIONS + +// Default settings #ifdef AUDIO_ENABLE -# define STARTUP_SONG SONG(PREONIC_SOUND) +# 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 -#define MUSIC_MASK (keycode != KC_NO) - /* * MIDI options */ @@ -46,3 +69,6 @@ /* 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/preonic/keymaps/PeterFalken/keymap.c b/keyboards/preonic/keymaps/PeterFalken/keymap.c index ef7614393d76..5ce0c39a6064 100644 --- a/keyboards/preonic/keymaps/PeterFalken/keymap.c +++ b/keyboards/preonic/keymaps/PeterFalken/keymap.c @@ -19,93 +19,61 @@ enum preonic_layers { _QWERTY, - _COLEMAK, - _DVORAK, _LOWER, _RAISE, _ADJUST }; -enum preonic_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT +// Custom keycode definitions +enum custom_keycodes { + KC_LAUNCHPAD = SAFE_RANGE }; +// Custom definitions for keys +#define CK_CW CAPS_WORD // CAPS_WORD for Caps Word feature +#define CK_SLP KC_SLEP // System Sleep +#define CK_M1 C(KC_UP) // Mission Control - All apps +#define CK_M2 C(KC_DOWN) // Mission Control - One apps +#define CK_LP KC_LAUNCHPAD // LaunchPad Key +#define CK_CO G(KC_C) // COPY = CMD + C +#define CK_CU G(KC_X) // CUT = CMD + X +#define CK_MV LAG(KC_V) // MOVE = CMD + OPT + V +#define CK_PA G(KC_V) // PASTE = CMD + V +#define CK_UN G(KC_Z) // UNDO = CMD + Z + +// Layer activation +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | S | D | F | G | H | J | K | L | ; | " | * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_preonic_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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | 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 | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT_preonic_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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - KC_ESC, 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, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_preonic_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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | @@ -114,8 +82,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_preonic_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + 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_DEL, 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,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY @@ -123,9 +91,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Raise * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -135,8 +103,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_preonic_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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + 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_DEL, 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, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY @@ -146,89 +114,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| Debug| | | | |TermOf|TermOn| | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | |Aud cy|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * | RSET | | M.AP | M.AL | LPAD | | | | | | | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | SLEP | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CPWD | UN | CU | CO | PA | MV | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_preonic_grid( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, QK_BOOT, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + QK_BOOT, _______, CK_M2, CK_M1, CK_LP, _______, _______, _______, _______, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_SLP, + CK_CW, CK_UN, CK_CU, CK_CO, CK_PA, CK_MV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - }; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + + +// Process custom keycodes bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - #ifdef RGBLIGHT_ENABLE - rgblight_step(); - #endif - #ifdef __AVR__ - writePinLow(E6); - #endif - } else { - unregister_code(KC_RSFT); - #ifdef __AVR__ - writePinHigh(E6); - #endif - } - return false; - break; + case KC_LAUNCHPAD: + if (record->event.pressed) { + host_consumer_send(0x2A0); + } else { + host_consumer_send(0); } - return true; -}; + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + bool muse_mode = false; uint8_t last_muse_note = 0; @@ -236,51 +161,25 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update_user(uint8_t index, bool clockwise) { - if (muse_mode) { - if (IS_LAYER_ON(_RAISE)) { - if (clockwise) { - muse_offset++; - } else { - muse_offset--; - } - } else { - if (clockwise) { - muse_tempo+=1; - } else { - muse_tempo-=1; - } - } - } else { - if (clockwise) { - register_code(KC_PGDN); - unregister_code(KC_PGDN); - } else { - register_code(KC_PGUP); - unregister_code(KC_PGUP); - } - } - return true; -} -bool dip_switch_update_user(uint8_t index, bool active) { - switch (index) { - case 0: - if (active) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - break; - case 1: - if (active) { - muse_mode = true; - } else { - muse_mode = false; - } - } - return true; -} +// bool dip_switch_update_user(uint8_t index, bool active) { +// switch (index) { +// case 0: +// if (active) { +// layer_on(_ADJUST); +// } else { +// layer_off(_ADJUST); +// } +// break; +// case 1: +// if (active) { +// muse_mode = true; +// } else { +// muse_mode = false; +// } +// } +// return true; +// } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/PeterFalken/rules.mk b/keyboards/preonic/keymaps/PeterFalken/rules.mk index dcf16bef3994..1ce483ed758b 100644 --- a/keyboards/preonic/keymaps/PeterFalken/rules.mk +++ b/keyboards/preonic/keymaps/PeterFalken/rules.mk @@ -1 +1,23 @@ +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes + +# Disable QMK features +BOOTMAGIC_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +ENCODER_ENABLE = no # Won't use for now +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now +RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Won't use for now +SPACE_CADET_ENABLE = no # Free up space + +# Enable QMK features +CAPS_WORD_ENABLE = yes + +# Enable Link Time Optimizations +LTO_ENABLE = yes + SRC += muse.c From c89f96a46b0576a85eb5d78bfff39d592015473b Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 4 Sep 2022 19:29:09 -0600 Subject: [PATCH 07/32] chore: update plack keymap to include KC_DEL on LOWER --- keyboards/planck/keymaps/PeterFalken/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/PeterFalken/keymap.c b/keyboards/planck/keymaps/PeterFalken/keymap.c index 77f9e4534463..a9c443a5090c 100644 --- a/keyboards/planck/keymaps/PeterFalken/keymap.c +++ b/keyboards/planck/keymaps/PeterFalken/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Lower * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, KC_DEL, 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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY From b6ce2da5451d2e5531158f5ba1c332a39f4d143a Mon Sep 17 00:00:00 2001 From: Luis Garcia Date: Thu, 1 Dec 2022 15:20:32 -0600 Subject: [PATCH 08/32] chore: Change RGB_MATRIX_STARTUP_* defines to RGB_MATRIX_DEFAULT_* --- .../launch_1/keymaps/PeterFalken/config.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h index a9fb112c06a0..4705030f106c 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h @@ -40,10 +40,10 @@ // Remove predefined values #undef RGB_DISABLE_TIMEOUT #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS - #undef RGB_MATRIX_STARTUP_MODE - #undef RGB_MATRIX_STARTUP_HUE - #undef RGB_MATRIX_STARTUP_SAT - #undef RGB_MATRIX_STARTUP_VAL + #undef RGB_MATRIX_DEFAULT_MODE + #undef RGB_MATRIX_DEFAULT_HUE + #undef RGB_MATRIX_DEFAULT_SAT + #undef RGB_MATRIX_DEFAULT_VAL // Redefine values // Number of milliseconds to wait until RGB automatically turns off @@ -51,11 +51,11 @@ // Limits maximum brightness of LEDs to 120 out of 255 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // Sets the default startup mode - #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_active_keys + #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CUSTOM_active_keys // Sets the default hue, saturation & brightness values - #define RGB_MATRIX_STARTUP_HUE 0 - #define RGB_MATRIX_STARTUP_SAT 0 - #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS/3 + #define RGB_MATRIX_DEFAULT_HUE 0 + #define RGB_MATRIX_DEFAULT_SAT 0 + #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS/3 // Disable RGB_MATRIX_ANIMATIONS - Custom definition #define DISABLE_RGB_MATRIX_ANIMATIONS From e28ae2cceaa0610e8ced04eb84c5a327e2ff431f Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Thu, 1 Dec 2022 18:10:16 -0600 Subject: [PATCH 09/32] chore: fix user map for work_board --- .../work_board/keymaps/PeterFalken/config.h | 32 ++++ .../work_board/keymaps/PeterFalken/keymap.c | 170 +++--------------- .../work_board/keymaps/PeterFalken/readme.md | 2 +- 3 files changed, 60 insertions(+), 144 deletions(-) create mode 100644 keyboards/work_louder/work_board/keymaps/PeterFalken/config.h diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..c158de457d4a --- /dev/null +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2022 Luis Garcia + * + * 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 3 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 . + */ + + #pragma once + + #include "config_common.h" + + // Avoid warning - "Attached USB accessory uses too much power." + #ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 + #endif + + // Configuration + #define RGB_DISABLE_WHEN_USB_SUSPENDED + + // Space optimizations - 01 + #undef LOCKING_SUPPORT_ENABLE + #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c index 59bb437d9d09..14fb5014c784 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c @@ -18,19 +18,11 @@ enum planck_layers { _QWERTY, - _COLEMAK, - _DVORAK, _LOWER, _RAISE, _ADJUST }; -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, -}; - enum tap_dances { ENC_TAP, }; @@ -39,117 +31,33 @@ enum tap_dances { #define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TD(ENC_TAP), - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, _______, - KC_TAB, 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 , - KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT( - KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, _______, - KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , - KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT( - 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_DEL, 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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT( - 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_DEL, 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, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - - -/* Adjust (Lower + Raise) - * v------------------------RGB CONTROL--------------------v - * ,-----------------------------------------------------------------------------------. - * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT( - _______, QK_BOOT, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , _______, - _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) - + [_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TD(ENC_TAP), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + MO(3), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_LOWER] = LAYOUT( + 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_DEL, 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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_RAISE] = LAYOUT( + 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_DEL, 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, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + [_ADJUST] = LAYOUT( + _______, QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , R_M_TOG, + _______, _______, MU_NEXT, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; @@ -181,27 +89,3 @@ qk_tap_dance_action_t tap_dance_actions[] = { 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) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - } - return true; -} diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md b/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md index 3b2d89b9a6ae..cbfb7a01df05 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md @@ -1 +1 @@ -# The default keymap for work +# The default keymap for work_board From edb5e008d858a0ed9db8eefc48ab441042ba0dbc Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Thu, 1 Dec 2022 19:44:03 -0600 Subject: [PATCH 10/32] chore: standarize custom keycodes & layers --- .../launch_1/keymaps/PeterFalken/keymap.c | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c index 8647fa198656..565cd66664e0 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c @@ -17,6 +17,13 @@ #include QMK_KEYBOARD_H +enum launch1_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + // Custom keycode definitions enum custom_keycodes { KC_LAUNCHPAD = SAFE_RANGE @@ -24,8 +31,9 @@ enum custom_keycodes { // Custom definitions for keys #define CK_CW CAPS_WORD // CAPS_WORD for Caps Word feature -#define CK_M1 C(KC_UP) // KC_MISSION_CONTROL_ALL -#define CK_M2 C(KC_DOWN) // KC_MISSION_CONTROL_APP +#define CK_SLP KC_SLEP // System Sleep +#define CK_M1 C(KC_UP) // Mission Control - All apps +#define CK_M2 C(KC_DOWN) // Mission Control - One apps #define CK_LP KC_LAUNCHPAD // LaunchPad Key #define CK_CO G(KC_C) // COPY = CMD + C #define CK_CU G(KC_X) // CUT = CMD + X @@ -81,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |____________|________|_______|________|_________________|_________________|________|________|_____________| |________|________|________| */ - [0] = LAYOUT( + [_QWERTY] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, @@ -115,16 +123,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * If this key is hit accidentally, just unplug the board and plug it back in. */ - [1] = LAYOUT( + [_LOWER] = LAYOUT( KC_TRNS, KC_TRNS, CK_M2, CK_M1, CK_LP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, TO(0), TO(1), TO(2), TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_VAD, RGB_VAI, KC_TRNS, KC_VOLU, - KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_VOLD, + KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, CK_SLP, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_TRNS, CK_UN, CK_CU, CK_CO, CK_PA, CK_MV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_HOME, KC_PGDN, KC_END ), - [2] = LAYOUT( + [_RAISE] = LAYOUT( QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), TO(1), TO(2), TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -133,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = LAYOUT( + [_ADJUST] = LAYOUT( QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(0), TO(1), TO(2), TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, From 0c39bec8d36960fab63bb160286e6172ab24bb3e Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Fri, 9 Dec 2022 10:28:56 -0600 Subject: [PATCH 11/32] chore: disable RGB underglow --- .../micro/keymaps/PeterFalken/config.h | 84 +++++++++++++++++ .../micro/keymaps/PeterFalken/keymap.c | 91 +++++++++++++++++++ .../micro/keymaps/PeterFalken/rules.mk | 18 ++++ 3 files changed, 193 insertions(+) create mode 100644 keyboards/work_louder/micro/keymaps/PeterFalken/config.h create mode 100644 keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..6b74e6da7ae9 --- /dev/null +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h @@ -0,0 +1,84 @@ +// Copyright 2022 PeterFalken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +#pragma once + +#include "config_common.h" + +// Fix warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + +// Setup RGB Lighting (Underglow) +#define RGBLIGHT_SLEEP +#define RGBLIGHT_DISABLE_KEYCODES +#define RGBLIGHT_DEFAULT_VAL 60 + +// #define RGB_DI_PIN D1 +// #define RGB_MATRIX_LED_COUNT 12 +// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 +// #define RGB_MATRIX_DISABLE_KEYCODES +// #define RGB_DISABLE_WHEN_USB_SUSPENDED + + +// #define RGBLIGHT_DI_PIN D2 +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 +// #define RGBLIGHT_DEFAULT_HUE 213 + +// Space optimizations - 01 +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Space optimizations - 02 +#undef RGBLIGHT_ANIMATIONS +#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_HUE_BREATHING +#undef ENABLE_RGB_MATRIX_HUE_PENDULUM +#undef ENABLE_RGB_MATRIX_HUE_WAVE +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +// #define WORK_LOUDER_LED_PIN_1 B7 +// #define WORK_LOUDER_LED_PIN_2 B6 +// #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..6b5541e01790 --- /dev/null +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c @@ -0,0 +1,91 @@ +// Copyright 2022 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +enum custom_keycodes { + LED_LEVEL = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_MPLY, KC_9, KC_0, KC_NO, + KC_5, KC_6, KC_7, KC_8, + KC_1, KC_2, KC_3, KC_4, + TO(1), KC_DOT, KC_COMM, LED_LEVEL + ), + LAYOUT( + KC_1, KC_2, KC_3, KC_4, + KC_5, KC_6, KC_7, KC_8, + KC_9, KC_0, KC_A, KC_B, + TO(2), KC_C, KC_D, KC_E + ), + LAYOUT( + KC_1, KC_2, KC_3, KC_4, + KC_5, KC_6, KC_7, KC_8, + KC_9, KC_0, KC_A, KC_B, + TO(3), KC_C, KC_D, KC_E + ), + LAYOUT( + KC_1, KC_2, KC_3, KC_4, + KC_5, KC_6, KC_7, KC_8, + KC_9, KC_0, KC_A, KC_B, + TO(0), KC_C, LED_LEVEL,KC_E + ), + +}; + +typedef union { + uint32_t raw; + struct { + uint8_t led_level : 3; + }; +} work_louder_config_t; + +work_louder_config_t work_louder_config; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LED_LEVEL: + if (record->event.pressed) { + work_louder_config.led_level++; + if (work_louder_config.led_level > 4) { + work_louder_config.led_level = 0; + } + work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); + eeconfig_update_user(work_louder_config.raw); + layer_state_set_kb(layer_state); + } + break; + } + return true; +} + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(C(KC_Z), C(KC_Y)) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, +}; +#endif + + +layer_state_t layer_state_set_user(layer_state_t state) { + layer_state_cmp(state, 1) ? work_louder_micro_led_1_on(): work_louder_micro_led_1_off(); + layer_state_cmp(state, 2) ? work_louder_micro_led_2_on(): work_louder_micro_led_2_off(); + layer_state_cmp(state, 3) ? work_louder_micro_led_3_on(): work_louder_micro_led_3_off(); + + return state; +} + +void eeconfig_init_user(void) { + work_louder_config.raw = 0; + work_louder_config.led_level = 1; + eeconfig_update_user(work_louder_config.raw); +} + +void matrix_init_user(void) { + work_louder_config.raw = eeconfig_read_user(); + work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); +} diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..2119a947f541 --- /dev/null +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk @@ -0,0 +1,18 @@ +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes + +# Setup QMK features +BOOTMAGIC_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +ENCODER_ENABLE = yes # Enable both encoders +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now +RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Disable RGB underglow +SPACE_CADET_ENABLE = no # Free up space + +# Enable Link Time Optimizations +LTO_ENABLE = yes From eb022d30ae9a0ebb6c7f0cba8d5e6391c4f3d5d8 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Fri, 9 Dec 2022 11:56:05 -0600 Subject: [PATCH 12/32] chore: disable RBG keys --- .../micro/keymaps/PeterFalken/config.h | 21 ------------------- .../micro/keymaps/PeterFalken/rules.mk | 3 ++- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h index 6b74e6da7ae9..4127b9492f38 100644 --- a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h @@ -5,10 +5,6 @@ #include "config_common.h" -#pragma once - -#include "config_common.h" - // Fix warning - "Attached USB accessory uses too much power." #ifndef USB_MAX_POWER_CONSUMPTION #define USB_MAX_POWER_CONSUMPTION 100 @@ -19,23 +15,6 @@ #define USB_SUSPEND_WAKEUP_DELAY 200 #endif -// Setup RGB Lighting (Underglow) -#define RGBLIGHT_SLEEP -#define RGBLIGHT_DISABLE_KEYCODES -#define RGBLIGHT_DEFAULT_VAL 60 - -// #define RGB_DI_PIN D1 -// #define RGB_MATRIX_LED_COUNT 12 -// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 -// #define RGB_MATRIX_DISABLE_KEYCODES -// #define RGB_DISABLE_WHEN_USB_SUSPENDED - - -// #define RGBLIGHT_DI_PIN D2 -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// #define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_GRADIENT + 9 -// #define RGBLIGHT_DEFAULT_HUE 213 - // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk index 2119a947f541..0df4d62cba6c 100644 --- a/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk @@ -2,7 +2,7 @@ # ENABLE_VIAL = yes # Setup QMK features -BOOTMAGIC_ENABLE = no # Won't use for now +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now COMMAND_ENABLE = no # Won't use for now CONSOLE_ENABLE = no # Won't use for now @@ -12,6 +12,7 @@ MAGIC_ENABLE = no # Won't use for now MOUSEKEY_ENABLE = no # Won't use for now RAW_ENABLE = no # Disable raw HID commands RGBLIGHT_ENABLE = no # Disable RGB underglow +RGB_MATRIX_ENABLE = no # Disable RGB key matrix SPACE_CADET_ENABLE = no # Free up space # Enable Link Time Optimizations From 3d3722dd420814f275108f5d05c999a4981958d1 Mon Sep 17 00:00:00 2001 From: Luis Garcia Date: Fri, 9 Dec 2022 13:29:59 -0600 Subject: [PATCH 13/32] chore: explicitly enable BOOTMAGIC --- keyboards/planck/keymaps/PeterFalken/rules.mk | 2 +- keyboards/preonic/keymaps/PeterFalken/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/planck/keymaps/PeterFalken/rules.mk b/keyboards/planck/keymaps/PeterFalken/rules.mk index 1ce483ed758b..66f52290c608 100644 --- a/keyboards/planck/keymaps/PeterFalken/rules.mk +++ b/keyboards/planck/keymaps/PeterFalken/rules.mk @@ -2,7 +2,7 @@ # ENABLE_VIAL = yes # Disable QMK features -BOOTMAGIC_ENABLE = no # Won't use for now +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now COMMAND_ENABLE = no # Won't use for now CONSOLE_ENABLE = no # Won't use for now diff --git a/keyboards/preonic/keymaps/PeterFalken/rules.mk b/keyboards/preonic/keymaps/PeterFalken/rules.mk index 1ce483ed758b..66f52290c608 100644 --- a/keyboards/preonic/keymaps/PeterFalken/rules.mk +++ b/keyboards/preonic/keymaps/PeterFalken/rules.mk @@ -2,7 +2,7 @@ # ENABLE_VIAL = yes # Disable QMK features -BOOTMAGIC_ENABLE = no # Won't use for now +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now COMMAND_ENABLE = no # Won't use for now CONSOLE_ENABLE = no # Won't use for now From 8f49d56c188f662ebb48c961b1746da4c9fab251 Mon Sep 17 00:00:00 2001 From: Luis Garcia Date: Fri, 9 Dec 2022 14:25:23 -0600 Subject: [PATCH 14/32] chore: explicitly enable BOOTMAGIC --- keyboards/planck/keymaps/PeterFalken/rules.mk | 2 +- .../preonic/keymaps/PeterFalken/rules.mk | 2 +- .../launch_1/keymaps/PeterFalken/rules.mk | 3 ++- .../loop/keymaps/PeterFalken/rules.mk | 20 ++++++++++++++++++ .../nano/keymaps/PeterFalken/rules.mk | 20 ++++++++++++++++++ .../work_board/keymaps/PeterFalken/rules.mk | 21 ++++++++++++++++++- 6 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk create mode 100644 keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk diff --git a/keyboards/planck/keymaps/PeterFalken/rules.mk b/keyboards/planck/keymaps/PeterFalken/rules.mk index 66f52290c608..bb8c109ffede 100644 --- a/keyboards/planck/keymaps/PeterFalken/rules.mk +++ b/keyboards/planck/keymaps/PeterFalken/rules.mk @@ -1,7 +1,7 @@ # Enable VIAL support when merged into QMK # ENABLE_VIAL = yes -# Disable QMK features +# Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now COMMAND_ENABLE = no # Won't use for now diff --git a/keyboards/preonic/keymaps/PeterFalken/rules.mk b/keyboards/preonic/keymaps/PeterFalken/rules.mk index 66f52290c608..bb8c109ffede 100644 --- a/keyboards/preonic/keymaps/PeterFalken/rules.mk +++ b/keyboards/preonic/keymaps/PeterFalken/rules.mk @@ -1,7 +1,7 @@ # Enable VIAL support when merged into QMK # ENABLE_VIAL = yes -# Disable QMK features +# Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now COMMAND_ENABLE = no # Won't use for now diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk index 1dcefc60cd5c..6c8d0857c7aa 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk @@ -1,7 +1,8 @@ # Enable VIAL support when merged into QMK # ENABLE_VIAL = yes -# Disable QMK features +# Setup QMK features +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in GRAVE_ESC_ENABLE = no # Not needed MAGIC_ENABLE = no # No MAGIC functions needed RAW_ENABLE = no # Disable raw HID commands diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..2ba72df3482c --- /dev/null +++ b/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk @@ -0,0 +1,20 @@ +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes + +# Setup QMK features +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in +DIP_SWITCH_ENABLE = no # Won't use for now +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +ENCODER_ENABLE = yes # Enable both encoders +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now +RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Disable RGB underglow +RGB_MATRIX_ENABLE = no # Disable RGB key matrix +SPACE_CADET_ENABLE = no # Free up space +# TAP_DANCE_ENABLE = yes + +# Enable Link Time Optimizations +LTO_ENABLE = yes diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..2ba72df3482c --- /dev/null +++ b/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk @@ -0,0 +1,20 @@ +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes + +# Setup QMK features +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in +DIP_SWITCH_ENABLE = no # Won't use for now +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +ENCODER_ENABLE = yes # Enable both encoders +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now +RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Disable RGB underglow +RGB_MATRIX_ENABLE = no # Disable RGB key matrix +SPACE_CADET_ENABLE = no # Free up space +# TAP_DANCE_ENABLE = yes + +# Enable Link Time Optimizations +LTO_ENABLE = yes diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk index e5ddcae8d927..2ba72df3482c 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk @@ -1 +1,20 @@ -TAP_DANCE_ENABLE = yes +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes + +# Setup QMK features +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in +DIP_SWITCH_ENABLE = no # Won't use for now +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +ENCODER_ENABLE = yes # Enable both encoders +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now +RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Disable RGB underglow +RGB_MATRIX_ENABLE = no # Disable RGB key matrix +SPACE_CADET_ENABLE = no # Free up space +# TAP_DANCE_ENABLE = yes + +# Enable Link Time Optimizations +LTO_ENABLE = yes From 181a5ba3122cd5b2de276e4469e44adf66b6d5a2 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Fri, 9 Dec 2022 17:30:43 -0600 Subject: [PATCH 15/32] chore: add keymap for macropad --- .../macropad/keymaps/PeterFalken/config.h | 63 ++++++++++ .../macropad/keymaps/PeterFalken/keymap.c | 114 ++++++++++++++++++ .../macropad/keymaps/PeterFalken/rules.mk | 19 +++ 3 files changed, 196 insertions(+) create mode 100644 keyboards/adafruit/macropad/keymaps/PeterFalken/config.h create mode 100644 keyboards/adafruit/macropad/keymaps/PeterFalken/keymap.c create mode 100644 keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h b/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..4127b9492f38 --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h @@ -0,0 +1,63 @@ +// Copyright 2022 PeterFalken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +// Fix warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + +// Space optimizations - 01 +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Space optimizations - 02 +#undef RGBLIGHT_ANIMATIONS +#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_HUE_BREATHING +#undef ENABLE_RGB_MATRIX_HUE_PENDULUM +#undef ENABLE_RGB_MATRIX_HUE_WAVE +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +// #define WORK_LOUDER_LED_PIN_1 B7 +// #define WORK_LOUDER_LED_PIN_2 B6 +// #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/keymap.c b/keyboards/adafruit/macropad/keymaps/PeterFalken/keymap.c new file mode 100644 index 000000000000..34989ea0b60e --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/PeterFalken/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2022 Jose Pablo Ramirez + * + * 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, + KC_ENT, KC_0, KC_BSPC, + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3 + ) +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, +}; +#endif + + +#ifdef OLED_ENABLE +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, + 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x83, 0x83, 0x83, 0x83, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x83, 0x83, 0x83, 0x83, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0x7e, 0xf8, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xff, 0xff, + 0xff, 0xff, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xf0, 0xf8, 0x7e, 0x7f, 0x3f, 0x1f, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0xc1, 0xc1, 0xc1, 0xc1, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xfc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + oled_write_raw_P(qmk_logo, sizeof(qmk_logo)); +} + +bool oled_task_user(void) { + render_qmk_logo(); + return true; +} + +#endif + diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk b/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk new file mode 100644 index 000000000000..0df4d62cba6c --- /dev/null +++ b/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk @@ -0,0 +1,19 @@ +# Enable VIAL support when merged into QMK +# ENABLE_VIAL = yes + +# Setup QMK features +BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in +DIP_SWITCH_ENABLE = no # Won't use for now +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +ENCODER_ENABLE = yes # Enable both encoders +GRAVE_ESC_ENABLE = no # Not needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now +RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Disable RGB underglow +RGB_MATRIX_ENABLE = no # Disable RGB key matrix +SPACE_CADET_ENABLE = no # Free up space + +# Enable Link Time Optimizations +LTO_ENABLE = yes From 0965fabd2f9f7ef47dde8ac631fa2a4a4ca6e2da Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Fri, 9 Dec 2022 17:31:44 -0600 Subject: [PATCH 16/32] chore: fix build errors --- .../loop/keymaps/PeterFalken/config.h | 66 +++++++++++++++++++ .../loop/keymaps/PeterFalken/rules.mk | 7 +- .../work_board/keymaps/PeterFalken/config.h | 47 +++++++++++++ .../work_board/keymaps/PeterFalken/rules.mk | 4 +- 4 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 keyboards/work_louder/loop/keymaps/PeterFalken/config.h diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/config.h b/keyboards/work_louder/loop/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..c29c852a4200 --- /dev/null +++ b/keyboards/work_louder/loop/keymaps/PeterFalken/config.h @@ -0,0 +1,66 @@ +// Copyright 2022 PeterFalken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +// Fix warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + +#undef RGB_MATRIX_DEFAULT_MODE +#define RGB_MATRIX_DEFAULT_MODE 0 + +// Space optimizations - 01 +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Space optimizations - 02 +#undef RGBLIGHT_ANIMATIONS +#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_HUE_BREATHING +#undef ENABLE_RGB_MATRIX_HUE_PENDULUM +#undef ENABLE_RGB_MATRIX_HUE_WAVE +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +// #define WORK_LOUDER_LED_PIN_1 B7 +// #define WORK_LOUDER_LED_PIN_2 B6 +// #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk index 2ba72df3482c..6913dbb9143e 100644 --- a/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk @@ -12,9 +12,12 @@ MAGIC_ENABLE = no # Won't use for now MOUSEKEY_ENABLE = no # Won't use for now RAW_ENABLE = no # Disable raw HID commands RGBLIGHT_ENABLE = no # Disable RGB underglow -RGB_MATRIX_ENABLE = no # Disable RGB key matrix +RGB_MATRIX_ENABLE = yes # Disable RGB key matrix SPACE_CADET_ENABLE = no # Free up space -# TAP_DANCE_ENABLE = yes # Enable Link Time Optimizations LTO_ENABLE = yes + +SRC += rgb_functions.c + +DEFAULT_FOLDER = work_louder/loop/rev3 diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h index c158de457d4a..123b2182fa78 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h @@ -30,3 +30,50 @@ // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE + +// Space optimizations - 01 +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +// Space optimizations - 02 +#undef RGBLIGHT_ANIMATIONS +#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_HUE_BREATHING +#undef ENABLE_RGB_MATRIX_HUE_PENDULUM +#undef ENABLE_RGB_MATRIX_HUE_WAVE +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +// #define WORK_LOUDER_LED_PIN_1 B7 +// #define WORK_LOUDER_LED_PIN_2 B6 +// #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk index 2ba72df3482c..4471b10f35b5 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk @@ -14,7 +14,9 @@ RAW_ENABLE = no # Disable raw HID commands RGBLIGHT_ENABLE = no # Disable RGB underglow RGB_MATRIX_ENABLE = no # Disable RGB key matrix SPACE_CADET_ENABLE = no # Free up space -# TAP_DANCE_ENABLE = yes + +# Update keymap before removing +TAP_DANCE_ENABLE = yes # Enable Link Time Optimizations LTO_ENABLE = yes From 2e8f2c500eebb9592064fbb0dafd3e2435a024dc Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sat, 10 Dec 2022 12:21:35 -0600 Subject: [PATCH 17/32] chore: update layers on micro --- .../micro/keymaps/PeterFalken/config.h | 10 +- .../micro/keymaps/PeterFalken/keymap.c | 108 ++++++++++++------ 2 files changed, 80 insertions(+), 38 deletions(-) diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h index 4127b9492f38..562f935d6291 100644 --- a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h @@ -58,6 +58,10 @@ /* disable print */ // #define NO_PRINT -// #define WORK_LOUDER_LED_PIN_1 B7 -// #define WORK_LOUDER_LED_PIN_2 B6 -// #define WORK_LOUDER_LED_PIN_3 B5 +#undef WORK_LOUDER_LED_PIN_1 +#undef WORK_LOUDER_LED_PIN_2 +#undef WORK_LOUDER_LED_PIN_3 + +#define WORK_LOUDER_LED_PIN_1 B5 +#define WORK_LOUDER_LED_PIN_2 B7 +#define WORK_LOUDER_LED_PIN_3 B6 diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c index 6b5541e01790..bb4ca91716a4 100644 --- a/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c @@ -3,36 +3,71 @@ #include QMK_KEYBOARD_H -enum custom_keycodes { - LED_LEVEL = SAFE_RANGE, + +enum wl_micro_layers { + _L0, + _L1, + _L2, + _L3, + _L4, + _L5, + _L6, + _ADJUST }; +// enum custom_keycodes { +// LED_LEVEL = SAFE_RANGE, +// }; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( + [_L0] = LAYOUT( KC_MPLY, KC_9, KC_0, KC_NO, KC_5, KC_6, KC_7, KC_8, KC_1, KC_2, KC_3, KC_4, - TO(1), KC_DOT, KC_COMM, LED_LEVEL + TO(1), KC_DOT, KC_COMM, _______ ), - LAYOUT( + [_L1] = LAYOUT( KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_A, KC_B, TO(2), KC_C, KC_D, KC_E ), - LAYOUT( - KC_1, KC_2, KC_3, KC_4, - KC_5, KC_6, KC_7, KC_8, - KC_9, KC_0, KC_A, KC_B, - TO(3), KC_C, KC_D, KC_E + [_L2] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(3), _______, _______, _______ ), - LAYOUT( - KC_1, KC_2, KC_3, KC_4, - KC_5, KC_6, KC_7, KC_8, - KC_9, KC_0, KC_A, KC_B, - TO(0), KC_C, LED_LEVEL,KC_E + [_L3] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(4), _______, _______, _______ + ), + [_L4] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(5), _______, _______, _______ + ), + [_L5] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(6), _______, _______, _______ + ), + [_L6] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(7), _______, _______, _______ + ), + [_ADJUST] = LAYOUT( + QK_BOOT, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + TO(0), _______, _______, _______ ), - }; typedef union { @@ -44,22 +79,22 @@ typedef union { work_louder_config_t work_louder_config; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LED_LEVEL: - if (record->event.pressed) { - work_louder_config.led_level++; - if (work_louder_config.led_level > 4) { - work_louder_config.led_level = 0; - } - work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); - eeconfig_update_user(work_louder_config.raw); - layer_state_set_kb(layer_state); - } - break; - } - return true; -} +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case LED_LEVEL: +// if (record->event.pressed) { +// work_louder_config.led_level++; +// if (work_louder_config.led_level > 4) { +// work_louder_config.led_level = 0; +// } +// work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); +// eeconfig_update_user(work_louder_config.raw); +// layer_state_set_kb(layer_state); +// } +// break; +// } +// return true; +// } #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { @@ -72,9 +107,12 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { layer_state_t layer_state_set_user(layer_state_t state) { - layer_state_cmp(state, 1) ? work_louder_micro_led_1_on(): work_louder_micro_led_1_off(); - layer_state_cmp(state, 2) ? work_louder_micro_led_2_on(): work_louder_micro_led_2_off(); - layer_state_cmp(state, 3) ? work_louder_micro_led_3_on(): work_louder_micro_led_3_off(); + // Get highest layer as number + int layer = get_highest_layer(state); + // Toggle leds based on binary layer number [2 1 3] + layer & 0x01 ? work_louder_micro_led_1_on(): work_louder_micro_led_1_off(); + layer & 0x02 ? work_louder_micro_led_2_on(): work_louder_micro_led_2_off(); + layer & 0x04 ? work_louder_micro_led_3_on(): work_louder_micro_led_3_off(); return state; } From 0debac42ca40eeb97eeee9b2df133e07dff73ca9 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sat, 10 Dec 2022 16:26:19 -0600 Subject: [PATCH 18/32] chore: consitent rules.mk --- keyboards/planck/keymaps/PeterFalken/rules.mk | 6 ++---- keyboards/preonic/keymaps/PeterFalken/rules.mk | 6 ++---- .../system76/launch_1/keymaps/PeterFalken/rules.mk | 13 ++++++++++--- .../work_board/keymaps/PeterFalken/rules.mk | 3 ++- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/keyboards/planck/keymaps/PeterFalken/rules.mk b/keyboards/planck/keymaps/PeterFalken/rules.mk index bb8c109ffede..d61ea02f792c 100644 --- a/keyboards/planck/keymaps/PeterFalken/rules.mk +++ b/keyboards/planck/keymaps/PeterFalken/rules.mk @@ -3,9 +3,10 @@ # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in -DIP_SWITCH_ENABLE = no # Won't use for now +CAPS_WORD_ENABLE = yes # Enable Caps Word COMMAND_ENABLE = no # Won't use for now CONSOLE_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now ENCODER_ENABLE = no # Won't use for now GRAVE_ESC_ENABLE = no # Not needed MAGIC_ENABLE = no # Won't use for now @@ -14,9 +15,6 @@ RAW_ENABLE = no # Disable raw HID commands RGBLIGHT_ENABLE = no # Won't use for now SPACE_CADET_ENABLE = no # Free up space -# Enable QMK features -CAPS_WORD_ENABLE = yes - # Enable Link Time Optimizations LTO_ENABLE = yes diff --git a/keyboards/preonic/keymaps/PeterFalken/rules.mk b/keyboards/preonic/keymaps/PeterFalken/rules.mk index bb8c109ffede..d61ea02f792c 100644 --- a/keyboards/preonic/keymaps/PeterFalken/rules.mk +++ b/keyboards/preonic/keymaps/PeterFalken/rules.mk @@ -3,9 +3,10 @@ # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in -DIP_SWITCH_ENABLE = no # Won't use for now +CAPS_WORD_ENABLE = yes # Enable Caps Word COMMAND_ENABLE = no # Won't use for now CONSOLE_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now ENCODER_ENABLE = no # Won't use for now GRAVE_ESC_ENABLE = no # Not needed MAGIC_ENABLE = no # Won't use for now @@ -14,9 +15,6 @@ RAW_ENABLE = no # Disable raw HID commands RGBLIGHT_ENABLE = no # Won't use for now SPACE_CADET_ENABLE = no # Free up space -# Enable QMK features -CAPS_WORD_ENABLE = yes - # Enable Link Time Optimizations LTO_ENABLE = yes diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk index 6c8d0857c7aa..2a90ae155be5 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk @@ -3,10 +3,17 @@ # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in +CAPS_WORD_ENABLE = yes # Enable Caps Word +COMMAND_ENABLE = no # Won't use for now +CONSOLE_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now +ENCODER_ENABLE = no # No encouders on launch_1 GRAVE_ESC_ENABLE = no # Not needed -MAGIC_ENABLE = no # No MAGIC functions needed +MAGIC_ENABLE = no # Won't use for now +MOUSEKEY_ENABLE = no # Won't use for now RAW_ENABLE = no # Disable raw HID commands +RGBLIGHT_ENABLE = no # Disable RGB underglow SPACE_CADET_ENABLE = no # Free up space -# Enable QMK features -CAPS_WORD_ENABLE = yes +# Enable Link Time Optimizations +LTO_ENABLE = yes diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk index 4471b10f35b5..9888af21d012 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk @@ -3,9 +3,10 @@ # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in -DIP_SWITCH_ENABLE = no # Won't use for now +CAPS_WORD_ENABLE = yes # Enable Caps Word COMMAND_ENABLE = no # Won't use for now CONSOLE_ENABLE = no # Won't use for now +DIP_SWITCH_ENABLE = no # Won't use for now ENCODER_ENABLE = yes # Enable both encoders GRAVE_ESC_ENABLE = no # Not needed MAGIC_ENABLE = no # Won't use for now From 0f8162996cde24e24e5c8fe54347eb1f1e8436ed Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 15:53:47 -0600 Subject: [PATCH 19/32] chore: disable TAP_DANCE --- keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk index 9888af21d012..3727983b5d87 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk @@ -16,8 +16,8 @@ RGBLIGHT_ENABLE = no # Disable RGB underglow RGB_MATRIX_ENABLE = no # Disable RGB key matrix SPACE_CADET_ENABLE = no # Free up space -# Update keymap before removing -TAP_DANCE_ENABLE = yes +# # Update keymap before removing +# TAP_DANCE_ENABLE = yes # Enable Link Time Optimizations LTO_ENABLE = yes From 996d66a25b2e2d49e605f608da16701084ee5f8c Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 15:54:42 -0600 Subject: [PATCH 20/32] chore: update CAPS_WORD keycode --- keyboards/planck/keymaps/PeterFalken/keymap.c | 2 +- .../preonic/keymaps/PeterFalken/keymap.c | 2 +- .../launch_1/keymaps/PeterFalken/keymap.c | 2 +- .../work_board/keymaps/PeterFalken/keymap.c | 64 +++++++++++-------- 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/keyboards/planck/keymaps/PeterFalken/keymap.c b/keyboards/planck/keymaps/PeterFalken/keymap.c index a9c443a5090c..3c320151b1dd 100644 --- a/keyboards/planck/keymaps/PeterFalken/keymap.c +++ b/keyboards/planck/keymaps/PeterFalken/keymap.c @@ -30,7 +30,7 @@ enum custom_keycodes { }; // Custom definitions for keys -#define CK_CW CAPS_WORD // CAPS_WORD for Caps Word feature +#define CK_CW CW_TOGG // CAPS_WORD for Caps Word feature #define CK_SLP KC_SLEP // System Sleep #define CK_M1 C(KC_UP) // Mission Control - All apps #define CK_M2 C(KC_DOWN) // Mission Control - One apps diff --git a/keyboards/preonic/keymaps/PeterFalken/keymap.c b/keyboards/preonic/keymaps/PeterFalken/keymap.c index 5ce0c39a6064..3d96505c708b 100644 --- a/keyboards/preonic/keymaps/PeterFalken/keymap.c +++ b/keyboards/preonic/keymaps/PeterFalken/keymap.c @@ -30,7 +30,7 @@ enum custom_keycodes { }; // Custom definitions for keys -#define CK_CW CAPS_WORD // CAPS_WORD for Caps Word feature +#define CK_CW CW_TOGG // CAPS_WORD for Caps Word feature #define CK_SLP KC_SLEP // System Sleep #define CK_M1 C(KC_UP) // Mission Control - All apps #define CK_M2 C(KC_DOWN) // Mission Control - One apps diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c index 565cd66664e0..6d994267254a 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c @@ -30,7 +30,7 @@ enum custom_keycodes { }; // Custom definitions for keys -#define CK_CW CAPS_WORD // CAPS_WORD for Caps Word feature +#define CK_CW CW_TOGG // CAPS_WORD for Caps Word feature #define CK_SLP KC_SLEP // System Sleep #define CK_M1 C(KC_UP) // Mission Control - All apps #define CK_M2 C(KC_DOWN) // Mission Control - One apps diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c index 14fb5014c784..14d1b2c3de83 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c @@ -23,16 +23,30 @@ enum planck_layers { _ADJUST }; -enum tap_dances { - ENC_TAP, +// Custom keycode definitions +enum custom_keycodes { + KC_LAUNCHPAD = SAFE_RANGE }; +// Custom definitions for keys +#define CK_CW CW_TOGG // CAPS_WORD for Caps Word feature +#define CK_SLP KC_SLEP // System Sleep +#define CK_M1 C(KC_UP) // Mission Control - All apps +#define CK_M2 C(KC_DOWN) // Mission Control - One apps +#define CK_LP KC_LAUNCHPAD // LaunchPad Key +#define CK_CO G(KC_C) // COPY = CMD + C +#define CK_CU G(KC_X) // CUT = CMD + X +#define CK_MV LAG(KC_V) // MOVE = CMD + OPT + V +#define CK_PA G(KC_V) // PASTE = CMD + V +#define CK_UN G(KC_Z) // UNDO = CMD + Z + +// Layer activation #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, TD(ENC_TAP), + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, _______, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, MO(3), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT @@ -61,30 +75,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void dance_enc_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code(KC_MPLY); - } else if (state->count == 2) { - register_code(KC_MNXT); - } else { - register_code(KC_MPRV); - } -} +// void dance_enc_finished(qk_tap_dance_state_t *state, void *user_data) { +// if (state->count == 1) { +// register_code(KC_MPLY); +// } else if (state->count == 2) { +// register_code(KC_MNXT); +// } else { +// register_code(KC_MPRV); +// } +// } -void dance_enc_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code(KC_MPLY); - } else if (state->count == 2) { - unregister_code(KC_MNXT); - } else { - unregister_code(KC_MPRV); - } -} +// void dance_enc_reset(qk_tap_dance_state_t *state, void *user_data) { +// if (state->count == 1) { +// unregister_code(KC_MPLY); +// } else if (state->count == 2) { +// unregister_code(KC_MNXT); +// } else { +// unregister_code(KC_MPRV); +// } +// } -// Tap Dance definitions -qk_tap_dance_action_t tap_dance_actions[] = { - [ENC_TAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_enc_finished, dance_enc_reset), -}; +// // Tap Dance definitions +// qk_tap_dance_action_t tap_dance_actions[] = { +// [ENC_TAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_enc_finished, dance_enc_reset), +// }; layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); From ae8c4693387b8e384b64388ea33bbd27ce2c5a41 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 16:18:50 -0600 Subject: [PATCH 21/32] chore: work_board clean up --- .../work_board/keymaps/PeterFalken/config.h | 15 ++++------- .../work_board/keymaps/PeterFalken/keymap.c | 26 ------------------- .../work_board/keymaps/PeterFalken/rules.mk | 3 --- 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h index 123b2182fa78..d867908d40b0 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h @@ -24,6 +24,11 @@ #define USB_MAX_POWER_CONSUMPTION 100 #endif +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif + // Configuration #define RGB_DISABLE_WHEN_USB_SUSPENDED @@ -67,13 +72,3 @@ #undef ENABLE_RGB_MATRIX_PIXEL_RAIN #undef ENABLE_RGB_MATRIX_PIXEL_FLOW #undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -// #define WORK_LOUDER_LED_PIN_1 B7 -// #define WORK_LOUDER_LED_PIN_2 B6 -// #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c index 14d1b2c3de83..54e6a725d69d 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c @@ -74,32 +74,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -// void dance_enc_finished(qk_tap_dance_state_t *state, void *user_data) { -// if (state->count == 1) { -// register_code(KC_MPLY); -// } else if (state->count == 2) { -// register_code(KC_MNXT); -// } else { -// register_code(KC_MPRV); -// } -// } - -// void dance_enc_reset(qk_tap_dance_state_t *state, void *user_data) { -// if (state->count == 1) { -// unregister_code(KC_MPLY); -// } else if (state->count == 2) { -// unregister_code(KC_MNXT); -// } else { -// unregister_code(KC_MPRV); -// } -// } - -// // Tap Dance definitions -// qk_tap_dance_action_t tap_dance_actions[] = { -// [ENC_TAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_enc_finished, dance_enc_reset), -// }; - layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk index 3727983b5d87..a7f60627a394 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk @@ -16,8 +16,5 @@ RGBLIGHT_ENABLE = no # Disable RGB underglow RGB_MATRIX_ENABLE = no # Disable RGB key matrix SPACE_CADET_ENABLE = no # Free up space -# # Update keymap before removing -# TAP_DANCE_ENABLE = yes - # Enable Link Time Optimizations LTO_ENABLE = yes From 9e6f76011d87e25fe1e56dd68d1fab421ff76786 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 19:46:06 -0600 Subject: [PATCH 22/32] chore: fixes for adafruit/macropad --- .../adafruit/macropad/keymaps/PeterFalken/config.h | 11 ----------- .../adafruit/macropad/keymaps/PeterFalken/rules.mk | 3 --- 2 files changed, 14 deletions(-) diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h b/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h index 4127b9492f38..b48f4c9abb45 100644 --- a/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h +++ b/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h @@ -20,7 +20,6 @@ #undef LOCKING_RESYNC_ENABLE // Space optimizations - 02 -#undef RGBLIGHT_ANIMATIONS #undef RGB_MATRIX_FRAMEBUFFER_EFFECTS #undef ENABLE_RGB_MATRIX_ALPHAS_MODS #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -51,13 +50,3 @@ #undef ENABLE_RGB_MATRIX_PIXEL_RAIN #undef ENABLE_RGB_MATRIX_PIXEL_FLOW #undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -// #define WORK_LOUDER_LED_PIN_1 B7 -// #define WORK_LOUDER_LED_PIN_2 B6 -// #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk b/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk index 0df4d62cba6c..6d78ef158b18 100644 --- a/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk +++ b/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now From e3c75cded963d8a94190ebfdefbf72bd8ce2bdc0 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 19:46:38 -0600 Subject: [PATCH 23/32] chore: fixes for planck/rev6_drop --- keyboards/planck/keymaps/PeterFalken/config.h | 8 -------- keyboards/planck/keymaps/PeterFalken/readme.md | 2 -- keyboards/planck/keymaps/PeterFalken/rules.mk | 3 --- 3 files changed, 13 deletions(-) delete mode 100644 keyboards/planck/keymaps/PeterFalken/readme.md diff --git a/keyboards/planck/keymaps/PeterFalken/config.h b/keyboards/planck/keymaps/PeterFalken/config.h index 9ae01f11a81b..24ba47a96d17 100644 --- a/keyboards/planck/keymaps/PeterFalken/config.h +++ b/keyboards/planck/keymaps/PeterFalken/config.h @@ -28,18 +28,10 @@ #define USB_SUSPEND_WAKEUP_DELAY 200 #endif -// Setup RGB Lighting (Underglow) -#define RGBLIGHT_SLEEP -#define RGBLIGHT_DISABLE_KEYCODES -#define RGBLIGHT_DEFAULT_VAL 60 - // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE -// Space optimizations - 02 -#undef RGBLIGHT_ANIMATIONS - // Default settings #ifdef AUDIO_ENABLE # define STARTUP_SONG SONG(PLANCK_SOUND) diff --git a/keyboards/planck/keymaps/PeterFalken/readme.md b/keyboards/planck/keymaps/PeterFalken/readme.md deleted file mode 100644 index de9680b49851..000000000000 --- a/keyboards/planck/keymaps/PeterFalken/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# The Default Planck Layout - diff --git a/keyboards/planck/keymaps/PeterFalken/rules.mk b/keyboards/planck/keymaps/PeterFalken/rules.mk index d61ea02f792c..32ca55107490 100644 --- a/keyboards/planck/keymaps/PeterFalken/rules.mk +++ b/keyboards/planck/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in CAPS_WORD_ENABLE = yes # Enable Caps Word From 47f3a1a96e62d524ab02f50a25433ffce6e66b04 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 19:47:00 -0600 Subject: [PATCH 24/32] chore: fixes for preonic/rev3_drop --- keyboards/preonic/keymaps/PeterFalken/config.h | 8 -------- keyboards/preonic/keymaps/PeterFalken/readme.md | 1 - keyboards/preonic/keymaps/PeterFalken/rules.mk | 3 --- 3 files changed, 12 deletions(-) delete mode 100644 keyboards/preonic/keymaps/PeterFalken/readme.md diff --git a/keyboards/preonic/keymaps/PeterFalken/config.h b/keyboards/preonic/keymaps/PeterFalken/config.h index 9ae01f11a81b..24ba47a96d17 100644 --- a/keyboards/preonic/keymaps/PeterFalken/config.h +++ b/keyboards/preonic/keymaps/PeterFalken/config.h @@ -28,18 +28,10 @@ #define USB_SUSPEND_WAKEUP_DELAY 200 #endif -// Setup RGB Lighting (Underglow) -#define RGBLIGHT_SLEEP -#define RGBLIGHT_DISABLE_KEYCODES -#define RGBLIGHT_DEFAULT_VAL 60 - // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE -// Space optimizations - 02 -#undef RGBLIGHT_ANIMATIONS - // Default settings #ifdef AUDIO_ENABLE # define STARTUP_SONG SONG(PLANCK_SOUND) diff --git a/keyboards/preonic/keymaps/PeterFalken/readme.md b/keyboards/preonic/keymaps/PeterFalken/readme.md deleted file mode 100644 index e911968dd964..000000000000 --- a/keyboards/preonic/keymaps/PeterFalken/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/PeterFalken/rules.mk b/keyboards/preonic/keymaps/PeterFalken/rules.mk index d61ea02f792c..32ca55107490 100644 --- a/keyboards/preonic/keymaps/PeterFalken/rules.mk +++ b/keyboards/preonic/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in CAPS_WORD_ENABLE = yes # Enable Caps Word From 073c96b3cd0231f04ebb90621ba22e5c14475603 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 19:47:25 -0600 Subject: [PATCH 25/32] chore: fixes for system76/launch_1 --- keyboards/system76/launch_1/keymaps/PeterFalken/config.h | 2 +- keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h index 4705030f106c..b14b634fa661 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/config.h @@ -47,7 +47,7 @@ // Redefine values // Number of milliseconds to wait until RGB automatically turns off - #define RGB_DISABLE_TIMEOUT 5000 + #define RGB_MATRIX_TIMEOUT 5000 // Limits maximum brightness of LEDs to 120 out of 255 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // Sets the default startup mode diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk index 2a90ae155be5..1bb6383c3e6c 100644 --- a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk +++ b/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in CAPS_WORD_ENABLE = yes # Enable Caps Word From 551019db1febd73c67ec2cd6cf3a1dcb46962fb8 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Sun, 11 Dec 2022 20:46:42 -0600 Subject: [PATCH 26/32] chore: update work_louder keyboards. --- .../loop/keymaps/PeterFalken/config.h | 12 ---------- .../loop/keymaps/PeterFalken/readme.md | 1 - .../loop/keymaps/PeterFalken/rules.mk | 7 ------ .../micro/keymaps/PeterFalken/config.h | 7 +----- .../micro/keymaps/PeterFalken/rules.mk | 3 --- .../nano/keymaps/PeterFalken/config.h | 16 +++++++++++++ .../nano/keymaps/PeterFalken/readme.md | 1 - .../nano/keymaps/PeterFalken/rules.mk | 3 --- .../work_board/keymaps/PeterFalken/config.h | 9 ++----- .../work_board/keymaps/PeterFalken/keymap.c | 24 +++++++++++++++++++ .../work_board/keymaps/PeterFalken/readme.md | 1 - .../work_board/keymaps/PeterFalken/rules.mk | 3 --- 12 files changed, 43 insertions(+), 44 deletions(-) delete mode 100644 keyboards/work_louder/loop/keymaps/PeterFalken/readme.md create mode 100644 keyboards/work_louder/nano/keymaps/PeterFalken/config.h delete mode 100644 keyboards/work_louder/nano/keymaps/PeterFalken/readme.md delete mode 100644 keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/config.h b/keyboards/work_louder/loop/keymaps/PeterFalken/config.h index c29c852a4200..7b56dd210f32 100644 --- a/keyboards/work_louder/loop/keymaps/PeterFalken/config.h +++ b/keyboards/work_louder/loop/keymaps/PeterFalken/config.h @@ -23,8 +23,6 @@ #undef LOCKING_RESYNC_ENABLE // Space optimizations - 02 -#undef RGBLIGHT_ANIMATIONS -#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS #undef ENABLE_RGB_MATRIX_ALPHAS_MODS #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN #undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT @@ -54,13 +52,3 @@ #undef ENABLE_RGB_MATRIX_PIXEL_RAIN #undef ENABLE_RGB_MATRIX_PIXEL_FLOW #undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -// #define WORK_LOUDER_LED_PIN_1 B7 -// #define WORK_LOUDER_LED_PIN_2 B6 -// #define WORK_LOUDER_LED_PIN_3 B5 diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/readme.md b/keyboards/work_louder/loop/keymaps/PeterFalken/readme.md deleted file mode 100644 index d11673e0625b..000000000000 --- a/keyboards/work_louder/loop/keymaps/PeterFalken/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for loop diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk index 6913dbb9143e..6d41108d4a0e 100644 --- a/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now @@ -17,7 +14,3 @@ SPACE_CADET_ENABLE = no # Free up space # Enable Link Time Optimizations LTO_ENABLE = yes - -SRC += rgb_functions.c - -DEFAULT_FOLDER = work_louder/loop/rev3 diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h index 562f935d6291..761fe95c0a6b 100644 --- a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/config.h @@ -15,12 +15,7 @@ #define USB_SUSPEND_WAKEUP_DELAY 200 #endif -// Space optimizations - 01 -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -// Space optimizations - 02 -#undef RGBLIGHT_ANIMATIONS +// Space optimizations #undef RGB_MATRIX_FRAMEBUFFER_EFFECTS #undef ENABLE_RGB_MATRIX_ALPHAS_MODS #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk index 0df4d62cba6c..6d78ef158b18 100644 --- a/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/config.h b/keyboards/work_louder/nano/keymaps/PeterFalken/config.h new file mode 100644 index 000000000000..44db428ddec2 --- /dev/null +++ b/keyboards/work_louder/nano/keymaps/PeterFalken/config.h @@ -0,0 +1,16 @@ +// Copyright 2022 PeterFalken (@PeterFalken) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +// Fix warning - "Attached USB accessory uses too much power." +#ifndef USB_MAX_POWER_CONSUMPTION + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +// Fix unresponsive on wake from sleep +#ifndef USB_SUSPEND_WAKEUP_DELAY + #define USB_SUSPEND_WAKEUP_DELAY 200 +#endif diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/readme.md b/keyboards/work_louder/nano/keymaps/PeterFalken/readme.md deleted file mode 100644 index 1ca552d7219c..000000000000 --- a/keyboards/work_louder/nano/keymaps/PeterFalken/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for nano diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk index 2ba72df3482c..947801371912 100644 --- a/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in DIP_SWITCH_ENABLE = no # Won't use for now diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h index d867908d40b0..4993d8953a84 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h @@ -29,19 +29,14 @@ #define USB_SUSPEND_WAKEUP_DELAY 200 #endif - // Configuration - #define RGB_DISABLE_WHEN_USB_SUSPENDED - - // Space optimizations - 01 - #undef LOCKING_SUPPORT_ENABLE - #undef LOCKING_RESYNC_ENABLE +// Configuration +#define RGB_DISABLE_WHEN_USB_SUSPENDED // Space optimizations - 01 #undef LOCKING_SUPPORT_ENABLE #undef LOCKING_RESYNC_ENABLE // Space optimizations - 02 -#undef RGBLIGHT_ANIMATIONS #undef RGB_MATRIX_FRAMEBUFFER_EFFECTS #undef ENABLE_RGB_MATRIX_ALPHAS_MODS #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c index 54e6a725d69d..da3dcc0309f5 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c @@ -40,6 +40,30 @@ enum custom_keycodes { #define CK_PA G(KC_V) // PASTE = CMD + V #define CK_UN G(KC_Z) // UNDO = CMD + Z + +// Process custom keycodes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // case KC_MISSION_CONTROL: + // if (record->event.pressed) { + // host_consumer_send(0x29F); + // } else { + // host_consumer_send(0); + // } + // return false; // Skip all further processing of this key + case KC_LAUNCHPAD: + if (record->event.pressed) { + host_consumer_send(0x2A0); + } else { + host_consumer_send(0); + } + return false; // Skip all further processing of this key + default: + return true; // Process all other keycodes normally + } +} + + // Layer activation #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md b/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md deleted file mode 100644 index cbfb7a01df05..000000000000 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for work_board diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk index a7f60627a394..cd113e951f97 100644 --- a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk @@ -1,6 +1,3 @@ -# Enable VIAL support when merged into QMK -# ENABLE_VIAL = yes - # Setup QMK features BOOTMAGIC_ENABLE = yes # Enable QMK_Boot on plug-in CAPS_WORD_ENABLE = yes # Enable Caps Word From e128a728c47a0c0e3f5516515f046fd7b88999ea Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Mon, 12 Dec 2022 17:43:15 -0600 Subject: [PATCH 27/32] chore: update profile to 'peterfalken' --- .../macropad/keymaps/{PeterFalken => peterfalken}/config.h | 0 .../macropad/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 .../macropad/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 keyboards/planck/keymaps/{PeterFalken => peterfalken}/config.h | 0 keyboards/planck/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 keyboards/planck/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 keyboards/preonic/keymaps/{PeterFalken => peterfalken}/config.h | 0 keyboards/preonic/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 keyboards/preonic/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 .../launch_1/keymaps/{PeterFalken => peterfalken}/config.h | 0 .../launch_1/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 .../launch_1/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 .../loop/keymaps/{PeterFalken => peterfalken}/config.h | 0 .../loop/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 .../loop/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 .../micro/keymaps/{PeterFalken => peterfalken}/config.h | 0 .../micro/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 .../micro/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 .../nano/keymaps/{PeterFalken => peterfalken}/config.h | 0 .../nano/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 .../nano/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 .../work_board/keymaps/{PeterFalken => peterfalken}/config.h | 0 .../work_board/keymaps/{PeterFalken => peterfalken}/keymap.c | 0 .../work_board/keymaps/{PeterFalken => peterfalken}/rules.mk | 0 24 files changed, 0 insertions(+), 0 deletions(-) rename keyboards/adafruit/macropad/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/adafruit/macropad/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/adafruit/macropad/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) rename keyboards/planck/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/planck/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/planck/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) rename keyboards/preonic/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/preonic/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/preonic/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) rename keyboards/system76/launch_1/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/system76/launch_1/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/system76/launch_1/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) rename keyboards/work_louder/loop/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/work_louder/loop/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/work_louder/loop/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) rename keyboards/work_louder/micro/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/work_louder/micro/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/work_louder/micro/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) rename keyboards/work_louder/nano/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/work_louder/nano/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/work_louder/nano/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) rename keyboards/work_louder/work_board/keymaps/{PeterFalken => peterfalken}/config.h (100%) rename keyboards/work_louder/work_board/keymaps/{PeterFalken => peterfalken}/keymap.c (100%) rename keyboards/work_louder/work_board/keymaps/{PeterFalken => peterfalken}/rules.mk (100%) diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/config.h b/keyboards/adafruit/macropad/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/adafruit/macropad/keymaps/PeterFalken/config.h rename to keyboards/adafruit/macropad/keymaps/peterfalken/config.h diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/keymap.c b/keyboards/adafruit/macropad/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/adafruit/macropad/keymaps/PeterFalken/keymap.c rename to keyboards/adafruit/macropad/keymaps/peterfalken/keymap.c diff --git a/keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk b/keyboards/adafruit/macropad/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/adafruit/macropad/keymaps/PeterFalken/rules.mk rename to keyboards/adafruit/macropad/keymaps/peterfalken/rules.mk diff --git a/keyboards/planck/keymaps/PeterFalken/config.h b/keyboards/planck/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/planck/keymaps/PeterFalken/config.h rename to keyboards/planck/keymaps/peterfalken/config.h diff --git a/keyboards/planck/keymaps/PeterFalken/keymap.c b/keyboards/planck/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/planck/keymaps/PeterFalken/keymap.c rename to keyboards/planck/keymaps/peterfalken/keymap.c diff --git a/keyboards/planck/keymaps/PeterFalken/rules.mk b/keyboards/planck/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/planck/keymaps/PeterFalken/rules.mk rename to keyboards/planck/keymaps/peterfalken/rules.mk diff --git a/keyboards/preonic/keymaps/PeterFalken/config.h b/keyboards/preonic/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/preonic/keymaps/PeterFalken/config.h rename to keyboards/preonic/keymaps/peterfalken/config.h diff --git a/keyboards/preonic/keymaps/PeterFalken/keymap.c b/keyboards/preonic/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/preonic/keymaps/PeterFalken/keymap.c rename to keyboards/preonic/keymaps/peterfalken/keymap.c diff --git a/keyboards/preonic/keymaps/PeterFalken/rules.mk b/keyboards/preonic/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/preonic/keymaps/PeterFalken/rules.mk rename to keyboards/preonic/keymaps/peterfalken/rules.mk diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/config.h b/keyboards/system76/launch_1/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/system76/launch_1/keymaps/PeterFalken/config.h rename to keyboards/system76/launch_1/keymaps/peterfalken/config.h diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c b/keyboards/system76/launch_1/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/system76/launch_1/keymaps/PeterFalken/keymap.c rename to keyboards/system76/launch_1/keymaps/peterfalken/keymap.c diff --git a/keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk b/keyboards/system76/launch_1/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/system76/launch_1/keymaps/PeterFalken/rules.mk rename to keyboards/system76/launch_1/keymaps/peterfalken/rules.mk diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/config.h b/keyboards/work_louder/loop/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/work_louder/loop/keymaps/PeterFalken/config.h rename to keyboards/work_louder/loop/keymaps/peterfalken/config.h diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/loop/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/work_louder/loop/keymaps/PeterFalken/keymap.c rename to keyboards/work_louder/loop/keymaps/peterfalken/keymap.c diff --git a/keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/loop/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/work_louder/loop/keymaps/PeterFalken/rules.mk rename to keyboards/work_louder/loop/keymaps/peterfalken/rules.mk diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/config.h b/keyboards/work_louder/micro/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/work_louder/micro/keymaps/PeterFalken/config.h rename to keyboards/work_louder/micro/keymaps/peterfalken/config.h diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/work_louder/micro/keymaps/PeterFalken/keymap.c rename to keyboards/work_louder/micro/keymaps/peterfalken/keymap.c diff --git a/keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/micro/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/work_louder/micro/keymaps/PeterFalken/rules.mk rename to keyboards/work_louder/micro/keymaps/peterfalken/rules.mk diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/config.h b/keyboards/work_louder/nano/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/work_louder/nano/keymaps/PeterFalken/config.h rename to keyboards/work_louder/nano/keymaps/peterfalken/config.h diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/nano/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/work_louder/nano/keymaps/PeterFalken/keymap.c rename to keyboards/work_louder/nano/keymaps/peterfalken/keymap.c diff --git a/keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/nano/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/work_louder/nano/keymaps/PeterFalken/rules.mk rename to keyboards/work_louder/nano/keymaps/peterfalken/rules.mk diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/config.h b/keyboards/work_louder/work_board/keymaps/peterfalken/config.h similarity index 100% rename from keyboards/work_louder/work_board/keymaps/PeterFalken/config.h rename to keyboards/work_louder/work_board/keymaps/peterfalken/config.h diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c b/keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c similarity index 100% rename from keyboards/work_louder/work_board/keymaps/PeterFalken/keymap.c rename to keyboards/work_louder/work_board/keymaps/peterfalken/keymap.c diff --git a/keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk b/keyboards/work_louder/work_board/keymaps/peterfalken/rules.mk similarity index 100% rename from keyboards/work_louder/work_board/keymaps/PeterFalken/rules.mk rename to keyboards/work_louder/work_board/keymaps/peterfalken/rules.mk From f22143fa06a5ffdae18d46b294bfe7ef44025ed2 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Mon, 12 Dec 2022 18:13:13 -0600 Subject: [PATCH 28/32] chore: use default indicator led map --- .../micro/keymaps/peterfalken/config.h | 14 ------ .../micro/keymaps/peterfalken/keymap.c | 47 +++++++++++-------- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/config.h b/keyboards/work_louder/micro/keymaps/peterfalken/config.h index 761fe95c0a6b..c45061c1ccdb 100644 --- a/keyboards/work_louder/micro/keymaps/peterfalken/config.h +++ b/keyboards/work_louder/micro/keymaps/peterfalken/config.h @@ -46,17 +46,3 @@ #undef ENABLE_RGB_MATRIX_PIXEL_RAIN #undef ENABLE_RGB_MATRIX_PIXEL_FLOW #undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -#undef WORK_LOUDER_LED_PIN_1 -#undef WORK_LOUDER_LED_PIN_2 -#undef WORK_LOUDER_LED_PIN_3 - -#define WORK_LOUDER_LED_PIN_1 B5 -#define WORK_LOUDER_LED_PIN_2 B7 -#define WORK_LOUDER_LED_PIN_3 B6 diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c index bb4ca91716a4..6193ee473e89 100644 --- a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c +++ b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c @@ -19,6 +19,9 @@ enum wl_micro_layers { // LED_LEVEL = SAFE_RANGE, // }; +#define CK_UNDO G(KC_Z) // UNDO = CMD + Z +#define CK_REDO LSG(KC_Z) // REDO = CMD + SHIFT + Z + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L0] = LAYOUT( KC_MPLY, KC_9, KC_0, KC_NO, @@ -70,14 +73,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -typedef union { - uint32_t raw; - struct { - uint8_t led_level : 3; - }; -} work_louder_config_t; +// typedef union { +// uint32_t raw; +// struct { +// uint8_t led_level : 3; +// }; +// } work_louder_config_t; -work_louder_config_t work_louder_config; +// work_louder_config_t work_louder_config; // bool process_record_user(uint16_t keycode, keyrecord_t *record) { // switch (keycode) { @@ -98,7 +101,11 @@ work_louder_config_t work_louder_config; #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { - { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(C(KC_Z), C(KC_Y)) }, + { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(CK_UNDO, CK_REDO) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, + { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }, @@ -110,20 +117,20 @@ layer_state_t layer_state_set_user(layer_state_t state) { // Get highest layer as number int layer = get_highest_layer(state); // Toggle leds based on binary layer number [2 1 3] - layer & 0x01 ? work_louder_micro_led_1_on(): work_louder_micro_led_1_off(); - layer & 0x02 ? work_louder_micro_led_2_on(): work_louder_micro_led_2_off(); - layer & 0x04 ? work_louder_micro_led_3_on(): work_louder_micro_led_3_off(); + layer & 0x02 ? work_louder_micro_led_1_on(): work_louder_micro_led_1_off(); + layer & 0x04 ? work_louder_micro_led_2_on(): work_louder_micro_led_2_off(); + layer & 0x01 ? work_louder_micro_led_3_on(): work_louder_micro_led_3_off(); return state; } -void eeconfig_init_user(void) { - work_louder_config.raw = 0; - work_louder_config.led_level = 1; - eeconfig_update_user(work_louder_config.raw); -} +// void eeconfig_init_user(void) { +// work_louder_config.raw = 0; +// work_louder_config.led_level = 1; +// eeconfig_update_user(work_louder_config.raw); +// } -void matrix_init_user(void) { - work_louder_config.raw = eeconfig_read_user(); - work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); -} +// void matrix_init_user(void) { +// work_louder_config.raw = eeconfig_read_user(); +// work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); +// } From 014e3a8443f9c25c51b1716a27bf77d161048bd7 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Mon, 12 Dec 2022 18:26:57 -0600 Subject: [PATCH 29/32] chore: cleanup --- .../micro/keymaps/peterfalken/keymap.c | 43 +------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c index 6193ee473e89..fd0ee63b3f0b 100644 --- a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c +++ b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c @@ -3,7 +3,6 @@ #include QMK_KEYBOARD_H - enum wl_micro_layers { _L0, _L1, @@ -15,10 +14,7 @@ enum wl_micro_layers { _ADJUST }; -// enum custom_keycodes { -// LED_LEVEL = SAFE_RANGE, -// }; - +// Shorter custom keycodes #define CK_UNDO G(KC_Z) // UNDO = CMD + Z #define CK_REDO LSG(KC_Z) // REDO = CMD + SHIFT + Z @@ -73,32 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -// typedef union { -// uint32_t raw; -// struct { -// uint8_t led_level : 3; -// }; -// } work_louder_config_t; - -// work_louder_config_t work_louder_config; - -// bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// switch (keycode) { -// case LED_LEVEL: -// if (record->event.pressed) { -// work_louder_config.led_level++; -// if (work_louder_config.led_level > 4) { -// work_louder_config.led_level = 0; -// } -// work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); -// eeconfig_update_user(work_louder_config.raw); -// layer_state_set_kb(layer_state); -// } -// break; -// } -// return true; -// } - #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(CK_UNDO, CK_REDO) }, @@ -123,14 +93,3 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } - -// void eeconfig_init_user(void) { -// work_louder_config.raw = 0; -// work_louder_config.led_level = 1; -// eeconfig_update_user(work_louder_config.raw); -// } - -// void matrix_init_user(void) { -// work_louder_config.raw = eeconfig_read_user(); -// work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); -// } From a6ed5d02ca6a94d7799b88d18d72fefa88890745 Mon Sep 17 00:00:00 2001 From: PeterFalken Date: Mon, 12 Dec 2022 18:39:15 -0600 Subject: [PATCH 30/32] chore: cleanup --- .../micro/keymaps/peterfalken/keymap.c | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c index fd0ee63b3f0b..aee188e4df48 100644 --- a/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c +++ b/keyboards/work_louder/micro/keymaps/peterfalken/keymap.c @@ -3,6 +3,7 @@ #include QMK_KEYBOARD_H + enum wl_micro_layers { _L0, _L1, @@ -15,8 +16,8 @@ enum wl_micro_layers { }; // Shorter custom keycodes -#define CK_UNDO G(KC_Z) // UNDO = CMD + Z -#define CK_REDO LSG(KC_Z) // REDO = CMD + SHIFT + Z +#define CK_UNDO LGUI(KC_Z) // UNDO = CMD + Z +#define CK_REDO SGUI(KC_Z) // REDO = CMD + SHIFT + Z const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L0] = LAYOUT( @@ -69,6 +70,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; +typedef union { + uint32_t raw; + struct { + uint8_t led_level : 3; + }; +} work_louder_config_t; + +work_louder_config_t work_louder_config; + +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case LED_LEVEL: +// if (record->event.pressed) { +// work_louder_config.led_level++; +// if (work_louder_config.led_level > 4) { +// work_louder_config.led_level = 0; +// } +// work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); +// eeconfig_update_user(work_louder_config.raw); +// layer_state_set_kb(layer_state); +// } +// break; +// } +// return true; +// } + #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(CK_UNDO, CK_REDO) }, @@ -86,10 +113,21 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { layer_state_t layer_state_set_user(layer_state_t state) { // Get highest layer as number int layer = get_highest_layer(state); - // Toggle leds based on binary layer number [2 1 3] + // Toggle leds based on binary layer number [2 3] layer & 0x02 ? work_louder_micro_led_1_on(): work_louder_micro_led_1_off(); layer & 0x04 ? work_louder_micro_led_2_on(): work_louder_micro_led_2_off(); layer & 0x01 ? work_louder_micro_led_3_on(): work_louder_micro_led_3_off(); return state; } + +void eeconfig_init_user(void) { + work_louder_config.raw = 0; + work_louder_config.led_level = 1; + eeconfig_update_user(work_louder_config.raw); +} + +void matrix_init_user(void) { + work_louder_config.raw = eeconfig_read_user(); + work_louder_micro_led_all_set((uint8_t)(work_louder_config.led_level * 255 / 4)); +} From 21ef89fbe07facfd41f6c38d1ecba178d4570c1e Mon Sep 17 00:00:00 2001 From: Luis Garcia Date: Tue, 13 Dec 2022 08:37:45 -0600 Subject: [PATCH 31/32] Comment from faux park on preonic config.h Co-authored-by: Ryan --- keyboards/preonic/keymaps/peterfalken/config.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/preonic/keymaps/peterfalken/config.h b/keyboards/preonic/keymaps/peterfalken/config.h index 24ba47a96d17..9c329cd65b1c 100644 --- a/keyboards/preonic/keymaps/peterfalken/config.h +++ b/keyboards/preonic/keymaps/peterfalken/config.h @@ -59,8 +59,5 @@ */ //#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 From b03ce99a7ac2dbeece922a55175c908039d097ec Mon Sep 17 00:00:00 2001 From: Luis Garcia Date: Tue, 13 Dec 2022 08:38:13 -0600 Subject: [PATCH 32/32] Comment from fauxpark on Planck config.h Co-authored-by: Ryan --- keyboards/planck/keymaps/peterfalken/config.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/planck/keymaps/peterfalken/config.h b/keyboards/planck/keymaps/peterfalken/config.h index 24ba47a96d17..9c329cd65b1c 100644 --- a/keyboards/planck/keymaps/peterfalken/config.h +++ b/keyboards/planck/keymaps/peterfalken/config.h @@ -59,8 +59,5 @@ */ //#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