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

small changes, game layer #21375

Merged
merged 6 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 9 additions & 9 deletions keyboards/keebio/iris/keymaps/mattly/config.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*p
mattly marked this conversation as resolved.
Show resolved Hide resolved
Copyright 2017 Danny Nguyen <[email protected]>

This program is free software: you can redistribute it and/or modify
Expand All @@ -22,15 +22,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#undef RGBLED_NUM
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#undef RGBLIGHT_EFFECT_RAINBOW_MOOD
#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#undef RGBLIGHT_EFFECT_CHRISTMAS
#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
#undef RGBLIGHT_EFFECT_RGB_TEST
#undef RGBLIGHT_EFFECT_ALTERNATING
#undef RGBLIGHT_EFFECT_TWINKLE
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why the previous person added all these in a fix commit, but they broke my lighting setup.

#define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT
#define RGBLED_NUM 12
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
Expand Down
36 changes: 22 additions & 14 deletions keyboards/keebio/iris/keymaps/mattly/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_CAPS, A_CTL, S_ALT, D_GUI, F_SFT, KC_G, KC_H, J_SFT, K_GUI, L_ALT, MINSCTL, KC_QUOT,
NAVLOCK, KC_Z, KC_X, KC_C, KC_V, KC_B, ENT_SYM, TAB_NUM, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
ESC_HYP, TAB_NUM, SPC_SFT, SPC_SFT, BSP_SYM, DEL_WRP
),
),

[_OVER_WIN] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand All @@ -30,31 +30,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),

[_NAVNUM] = LAYOUT(
XXXXXXX, XXXXXXX, XXXXXXX, M_NXWIN, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX,
XXXXXXX, M_NAVFW, M_BWORD, KC_UP, M_FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX,
XXXXXXX, M_NAVBK, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX,
_______, M_PVTAB, KC_HOME, M_PVWIN, KC_END, M_NXTAB, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______,
XXXXXXX, XXXXXXX, XXXXXXX, M_BPARA, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, XXXXXXX,
XXXXXXX, KC_HOME, M_BWORD, KC_UP, M_FWORD, KC_PGUP, KC_DLR, KC_P7, KC_P8, KC_P9, KC_DOT, XXXXXXX,
XXXXXXX, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PERC, KC_P4, KC_P5, KC_P6, KC_EQL, XXXXXXX,
_______, XXXXXXX, M_BLINE, M_NPARA, M_ELINE, XXXXXXX, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_COMM, _______,
_______, _______, _______, _______, _______, KC_P0
),
[_NAVNUM_WIN] = LAYOUT(
_______, _______, _______, W_NXWIN, _______, _______, _______, _______, _______, _______, _______, _______,
_______, W_NAVFW, W_BWORD, _______, W_FWORD, _______, _______, _______, _______, _______, _______, _______,
_______, W_NAVBK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, W_PVTAB, _______, W_PVWIN, _______, W_NXTAB, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, W_BWORD, _______, W_FWORD, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),

[_GAME] = LAYOUT(
KC_BSPC, 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_SCLN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_MINS, KC_QUOT,
KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_NAVNUM), MO(_SYMBOL), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_LGUI, KC_LSFT
),

[_FUNCT] = LAYOUT(
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
QK_BOOT, XXXXXXX, XXXXXXX, M_NXWIN, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_K, QK_BOOT,
DB_TOGG, XXXXXXX, M_PVTAB, M_PVWIN, M_NXTAB, XXXXXXX, XXXXXXX, TOG_WIN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
QK_BOOT, M_NAVFW, XXXXXXX, M_NXWIN, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_K, QK_BOOT,
DB_TOGG, M_NAVBK, M_PVTAB, M_PVWIN, M_NXTAB, XXXXXXX, XXXXXXX, TOG_WIN, TOG_GAM, XXXXXXX, XXXXXXX, XXXXXXX,
KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD,
_______, _______, _______, _______, _______, _______
),
[_FUNCT_WIN] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, W_NXWIN, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, W_PVTAB, W_PVWIN, W_NXTAB, _______, _______, _______, _______, _______, _______, _______,
_______, W_NAVFW, _______, W_NXWIN, _______, _______, _______, _______, _______, _______, _______, _______,
_______, W_NAVBK, W_PVTAB, W_PVWIN, W_NXTAB, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
Expand Down
5 changes: 4 additions & 1 deletion users/mattly/mattly.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ void layer_state_set_rgb(layer_state_t state) {
case _NAVNUM_WIN:
rgblight_sethsv_noeeprom(HSV_NAVNUM);
break;
case _GAME:
rgblight_sethsv_noeeprom(HSV_GAME);
break;
case _FUNCT:
case _FUNCT_WIN:
rgblight_sethsv_noeeprom(HSV_FUNCT);
Expand Down Expand Up @@ -69,7 +72,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {

void keyboard_post_init_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable_noeeprom();
rgblight_enable();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps there's a larger bug but my lighting setup no longer works without this change

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see that issue with a different board. So very odd.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... it's working now, perhaps I didn't do enough A/B testing against the def changes

set_lights_default();
#endif
}
81 changes: 44 additions & 37 deletions users/mattly/mattly.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ enum {
_NAVNUM,
_NAVNUM_WIN,
_SYMBOL,
_GAME,
_FUNCT,
_FUNCT_WIN,
};

// == System
#define TOG_WIN TG(_OVER_WIN)
#define TOG_GAM TG(_GAME)

// == Thumbs
// left hand
Expand All @@ -47,68 +49,73 @@ enum {
#define NAVLOCK TG(_NAVNUM)
#define SYMLOCK TG(_SYMBOL)


// == QWERTY
// left hand home row
#define A_CTL MT(MOD_LCTL, KC_A)
#define A_GUI MT(MOD_LGUI, KC_A)
#define S_ALT MT(MOD_LALT, KC_S)
#define D_GUI MT(MOD_LGUI, KC_D)
#define D_CTL MT(MOD_LCTL, KC_D)
#define F_SFT MT(MOD_LSFT, KC_F)
#define A_CTL MT(MOD_LCTL, KC_A)
#define A_GUI MT(MOD_LGUI, KC_A)
#define S_ALT MT(MOD_LALT, KC_S)
#define D_GUI MT(MOD_LGUI, KC_D)
#define D_CTL MT(MOD_LCTL, KC_D)
#define F_SFT MT(MOD_LSFT, KC_F)
// left hand aux
#define W_CTL MT(MOD_LCTL, KC_W)
#define W_GUI MT(MOD_LGUI, KC_W)
#define E_ALT MT(MOD_LALT, KC_E)
#define R_GUI MT(MOD_LGUI, KC_R)
#define R_CTL MT(MOD_LCTL, KC_R)
#define W_CTL MT(MOD_LCTL, KC_W)
#define W_GUI MT(MOD_LGUI, KC_W)
#define E_ALT MT(MOD_LALT, KC_E)
#define R_GUI MT(MOD_LGUI, KC_R)
#define R_CTL MT(MOD_LCTL, KC_R)

// right hand home row
#define J_SFT MT(MOD_RSFT, KC_J)
#define K_GUI MT(MOD_RGUI, KC_K)
#define K_CTL MT(MOD_RCTL, KC_K)
#define L_ALT MT(MOD_RALT, KC_L)
#define J_SFT MT(MOD_RSFT, KC_J)
#define K_GUI MT(MOD_RGUI, KC_K)
#define K_CTL MT(MOD_RCTL, KC_K)
#define L_ALT MT(MOD_RALT, KC_L)
#define MINSCTL MT(MOD_RCTL, KC_MINS)
#define MINSGUI MT(MOD_RGUI, KC_MINS)
// right hand aux
#define U_GUI MT(MOD_RGUI, KC_U)
#define U_CTL MT(MOD_RCTL, KC_U)
#define I_ALT MT(MOD_RALT, KC_I)
#define O_CTL MT(MOD_RCTL, KC_O)
#define O_GUI MT(MOD_RGUI, KC_O)
#define U_GUI MT(MOD_RGUI, KC_U)
#define U_CTL MT(MOD_RCTL, KC_U)
#define I_ALT MT(MOD_RALT, KC_I)
#define O_CTL MT(MOD_RCTL, KC_O)
#define O_GUI MT(MOD_RGUI, KC_O)

// == OS X default keys
// movement by word
// movement by text
#define M_BWORD LALT(KC_LEFT)
#define W_BWORD LCTL(KC_LEFT)
#define M_FWORD LALT(KC_RIGHT)
#define W_FWORD LCTL(KC_RIGHT)

#define M_BLINE LGUI(KC_LEFT)
#define M_ELINE LGUI(KC_RIGHT)

#define M_BPARA LOPT(KC_UP)
#define M_NPARA LOPT(KC_DOWN)

// gui navigation
#define M_NXWIN LGUI(KC_GRV) // Next Window
#define M_NXWIN LGUI(KC_GRV) // Next Window
#define W_NXWIN LALT(KC_TAB)
#define M_PVWIN LGUI(LSFT(KC_GRV)) // Prev Window
#define M_PVWIN LGUI(LSFT(KC_GRV)) // Prev Window
#define W_PVWIN LALT(LSFT(KC_TAB))
#define M_NXTAB LGUI(LSFT(KC_RBRC)) // Next Tab
#define M_NXTAB LGUI(LSFT(KC_RBRC)) // Next Tab
#define W_NXTAB LCTL(KC_PGDN)
#define M_PVTAB LGUI(LSFT(KC_LBRC)) // Prev Tab
#define M_PVTAB LGUI(LSFT(KC_LBRC)) // Prev Tab
#define W_PVTAB LCTL(KC_PGUP)
#define M_NAVBK LGUI(KC_LBRC) // Navigate Forward
#define M_NAVBK LGUI(KC_LBRC) // Navigate Forward
#define W_NAVBK LALT(KC_LEFT)
#define M_NAVFW LGUI(KC_RBRC) // Navigate Back
#define M_NAVFW LGUI(KC_RBRC) // Navigate Back
#define W_NAVFW LALT(KC_RIGHT)

// == UNDERGLOW
#ifdef RGBLIGHT_ENABLE
#define HSV_CAPS 55, 255, 255
#define HSV_ERR 30, 196, 196
#define HSV_MAC 20, 255, 128
#define HSV_WIN 10, 255, 128
#define HSV_SYMBOL 235, 255, 255
#define HSV_NAVNUM 250, 255, 255
#define HSV_FUNCT 210, 255, 255
#define HSV_RESET 180, 255, 255
#define HSV_CAPS 55, 255, 255
#define HSV_ERR 0, 255, 96
#define HSV_MAC 250, 255, 255
#define HSV_WIN 250, 128, 192
#define HSV_SYMBOL 235, 255, 255
#define HSV_NAVNUM 20, 255, 255
#define HSV_GAME 40, 255, 255
#define HSV_FUNCT 200, 255, 255
#define HSV_RESET 180, 255, 255
#endif

#endif