Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix snowe keymap after updates to QMK #16777

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion keyboards/crkbd/keymaps/snowe/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define IGNORE_MOD_TAP_INTERRUPT
//#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY

#define LAYER_STATE_8BIT
#define LAYER_STATE_8BIT
#define SPLIT_WPM_ENABLE
19 changes: 19 additions & 0 deletions keyboards/crkbd/keymaps/snowe/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
)
// clang-format on
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
// clang-format off
#define LAYOUT_crkbd_no_hold_shortcuts( \
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
) \
LAYOUT_wrapper( \
KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
GUI_ESC, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
KC_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_BSLS, \
KC_LCTL, LOWER, KC_BSPC, KC_ENTER, SP_RAIS, KC_LALT \
)
// clang-format on
#define LAYOUT_crkbd_no_hold_shortcuts_wrapper(...) LAYOUT_crkbd_no_hold_shortcuts(__VA_ARGS__)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// clang-format off
Expand All @@ -77,6 +91,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),
[_GAMING] = LAYOUT_crkbd_no_hold_shortcuts_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),

/* Lower
* ,-----------------------------------------------. .-----------------------------------------------.
Expand Down
2 changes: 1 addition & 1 deletion users/snowe/ocean_dream.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Features:
* You can turn on and off features in this section
*/
#define ENABLE_MOON // Uses 182 bytes
//#define ENABLE_MOON // Uses 182 bytes
#define ENABLE_WAVE // Uses 844 bytes
#define ENABLE_SHOOTING_STARS // Uses 872 bytes
#define ENABLE_ISLAND
Expand Down
24 changes: 14 additions & 10 deletions users/snowe/oled_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
# include <stdio.h> // for keylog?

oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_master) {
if (!is_keyboard_master()) {
return OLED_ROTATION_270; // flips the display 180 degrees if offhand
}
return OLED_ROTATION_270;
}

# define L_BASE 0
# define L_LOWER 2
# define L_RAISE 4
# define L_GAME 2
# define L_LOWER 4
# define L_RAISE 6
# define L_ADJUST 8

void oled_render_layer_state(void) {
Expand All @@ -42,18 +43,21 @@ void oled_render_layer_state(void) {
case L_BASE:
oled_write_ln_P(PSTR("Main"), false);
break;
case L_GAME:
oled_write_ln_P(PSTR("Game"), false);
break;
case L_LOWER:
oled_write_ln_P(PSTR("Bot"), false);
break;
case L_RAISE:
oled_write_ln_P(PSTR("Top"), false);
break;
case L_ADJUST:
case L_ADJUST | L_LOWER:
case L_ADJUST | L_RAISE:
case L_ADJUST | L_LOWER | L_RAISE:
oled_write_ln_P(PSTR("Comb"), false);
break;
// case L_ADJUST:
// case L_ADJUST | L_LOWER:
// case L_ADJUST | L_RAISE:
// case L_ADJUST | L_LOWER | L_RAISE:
// oled_write_ln_P(PSTR("Comb"), false);
// break;
}
}

Expand Down Expand Up @@ -122,7 +126,7 @@ void render_bootmagic_status(void) {
}

bool oled_task_user(void) {
if (is_master) {
if (is_keyboard_master()) {
oled_render_layer_state();
oled_render_keylog();
render_bootmagic_status();
Expand Down
2 changes: 1 addition & 1 deletion users/snowe/snowe.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif


enum layers { _MAIN, _LOWER, _UPPER, _ADJUST };
enum layers { _MAIN, _GAMING, _LOWER, _UPPER, _ADJUST };
2 changes: 1 addition & 1 deletion users/snowe/wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ NOTE: These are all the same length. If you do a search/replace


#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG
#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM
#define _________________ADJUST_L2_________________ MU_TOG , TG(_GAMING), AU_ON, AU_OFF, AG_NORM
#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, _______
#define _________________ADJUST_R1_________________ _______, _______, _______, _______, _______
#define _________________ADJUST_R2_________________ RESET, CG_TOGG, _______, _______, _______
Expand Down