Skip to content

Commit

Permalink
Add workman layout
Browse files Browse the repository at this point in the history
  • Loading branch information
struckmb committed Apr 17, 2023
1 parent cd8dfb7 commit 7ce7a53
Show file tree
Hide file tree
Showing 8 changed files with 289 additions and 254 deletions.
2 changes: 1 addition & 1 deletion keyboards/redox/keymaps/struckmb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define QWERTZ_ENABLE
#define BONE_ENABLE
#define COLEMAK_ENABLE
#define LILYPOND_ENABLE
#define WORKMAN_ENABLE

#ifdef RGBLIGHT_ENABLE
#undef RGBLED_NUM
Expand Down
11 changes: 10 additions & 1 deletion keyboards/redox/keymaps/struckmb/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
________________________________________THUMB_5_5____________________________________10_
),
#endif // BONE_ENABLE
#ifdef WORKMAN_ENABLE
[_WORKMAN] = LAYOUT_redox_hrm_wrapper(
_____________________NUMBER_L0____________________6_, _____________________NUMBER_R0____________________6_,
____________________WORKMAN_L1____________________6_, ____________________WORKMAN_R1____________________6_,
____________________WORKMAN_L2____________________6_, ____________________WORKMAN_R2____________________6_,
____________________WORKMAN_L3____________________6_, ____________________WORKMAN_R3____________________6_,
________________________________________THUMB_5_5____________________________________10_
),
#endif // WORKMAN_ENABLE
#ifdef COLEMAK_ENABLE
[_COLMAK_DH] = LAYOUT_redox_hrm_wrapper(
_____________________NUMBER_L0____________________6_, _____________________NUMBER_R0____________________6_,
Expand All @@ -52,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#endif // LILYPOND_ENABLE

[_SYM_NUM] = LAYOUT_redox_wrapper(
______________________FUNC_L0_____________________6_, ______________________FUNC_R0_____________________6_,
_____________________NUMBER_L0____________________6_, _____________________NUMBER_R0____________________6_,
_____________________SYMBOLS_L1___________________6_, _____________________SYMBOLS_R1___________________6_,
_____________________SYMBOLS_L2___________________6_, _____________________SYMBOLS_R2___________________6_,
_____________________SYMBOLS_L3___________________6_, _____________________SYMBOLS_R3___________________6_,
Expand Down
3 changes: 2 additions & 1 deletion keyboards/splitkb/kyria/keymaps/struckmb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@

#define QWERTZ_ENABLE
#define BONE_ENABLE
#define WORKMAN_ENABLE
#define COLEMAK_ENABLE
#define LILYPOND_ENABLE

// deactivated some effects for size reasons
// deactivated some effects for size reasons
#ifdef RGBLIGHT_ENABLE
/* # define RGBLIGHT_EFFECT_BREATHING */
# define RGBLIGHT_EFFECT_RAINBOW_MOOD
Expand Down
35 changes: 21 additions & 14 deletions keyboards/splitkb/kyria/keymaps/struckmb/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,59 +34,65 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_____________________QWERTZ_L1____________________6_, _____________________QWERTZ_R1____________________6_,
_____________________QWERTZ_L2____________________6_, _____________________QWERTZ_R2____________________6_,
_____________________QWERTZ_L3____________________6_, _____________________QWERTZ_R3____________________6_,
________________________________________THUMB_5_5____________________________________10_
),
________________________________________THUMB_5_5____________________________________10_),
#endif
#ifdef BONE_ENABLE
[_BONE] = LAYOUT_kyria_hrm_wrapper(
_______________________BONE_L1____________________6_, _______________________BONE_R1____________________6_,
_______________________BONE_L2____________________6_, _______________________BONE_R2____________________6_,
_______________________BONE_L3____________________6_, _______________________BONE_R3____________________6_,
________________________________________THUMB_5_5____________________________________10_
________________________________________THUMB_5_5____________________________________10_
),
#endif // BONE_ENABLE
#ifdef WORKMAN_ENABLE
[_WORKMAN] = LAYOUT_kyria_hrm_wrapper(
____________________WORKMAN_L1____________________6_, ____________________WORKMAN_R1____________________6_,
____________________WORKMAN_L2____________________6_, ____________________WORKMAN_R2____________________6_,
____________________WORKMAN_L3____________________6_, ____________________WORKMAN_R3____________________6_,
________________________________________THUMB_5_5____________________________________10_
),
#endif // WORKMAN_ENABLE
#ifdef COLEMAK_ENABLE
[_COLMAK_DH] = LAYOUT_kyria_hrm_wrapper(
___________________COLEMAK_DH_L1__________________6_, ___________________COLEMAK_DH_R1__________________6_,
___________________COLEMAK_DH_L2__________________6_, ___________________COLEMAK_DH_R2__________________6_,
___________________COLEMAK_DH_L3__________________6_, ___________________COLEMAK_DH_R3__________________6_,
________________________________________THUMB_5_5____________________________________10_
________________________________________THUMB_5_5____________________________________10_
),
#endif // COLEMAK_ENABLE
#ifdef LILYPOND_ENABLE
[_LILYPOND] = LAYOUT_kyria_hrm_wrapper(
____________________LILYPOND_L1___________________6_, ____________________LILYPOND_R1___________________6_,
____________________LILYPOND_L2___________________6_, ____________________LILYPOND_R2___________________6_,
____________________LILYPOND_L3___________________6_, ____________________LILYPOND_R3___________________6_,
________________________________________THUMB_5_5____________________________________10_
________________________________________THUMB_5_5____________________________________10_
),
#endif // LILYPOND_ENABLE

[_SYM_NUM] = LAYOUT_kyria_wrapper(
_____________________SYMBOLS_L1___________________6_, _____________________SYMBOLS_R1___________________6_,
_____________________SYMBOLS_L2___________________6_, _____________________SYMBOLS_R2___________________6_,
_____________________SYMBOLS_L3___________________6_, _____________________SYMBOLS_R3___________________6_,
_____________________SYMBOLS_TB___________________6_
_____________________SYMBOLS_TB___________________6_
),
[_NAV_FUN] = LAYOUT_kyria_wrapper(
_______________NAVIGATION_L1______________________6_, _________________FUNCTION_R1______________________6_,
_______________NAVIGATION_L2______________________6_, _________________FUNCTION_R2______________________6_,
_______________NAVIGATION_L3______________________6_, _________________FUNCTION_R3______________________6_,
_____________NAVIGATION_AND_FUNCTION_TB___________6_
_____________NAVIGATION_AND_FUNCTION_TB___________6_
),
[_MSE_CTL] = LAYOUT_kyria_wrapper(
______________________MOUSE_L1____________________6_, ______________________MOUSE_R1____________________6_,
______________________MOUSE_L2____________________6_, ______________________MOUSE_R2____________________6_,
______________________MOUSE_L3____________________6_, ______________________MOUSE_R3____________________6_,
______________________MOUSE_TB____________________6_
______________________MOUSE_TB____________________6_
),
[_ADJUST] = LAYOUT_kyria_wrapper(
[_ADJUST] = LAYOUT_kyria_wrapper(
____________________CONFIG_L1_____________________6_, ____________________CONFIG_R1_____________________6_,
____________________CONFIG_L2_____________________6_, ____________________CONFIG_R2_____________________6_,
____________________CONFIG_L3_____________________6_, ____________________CONFIG_R3_____________________6_,
____________________CONFIG_TB_____________________6_
),

____________________CONFIG_TB_____________________6_
)
};

/* The default OLED and rotary encoder code can be found at the bottom of qmk_firmware/keyboards/splitkb/kyria/rev1/rev1.c
Expand All @@ -96,7 +102,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/

#ifdef OLED_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_180;
}

void render_logo_keyboard(uint8_t col, uint8_t row) {
// clang-format off
Expand Down Expand Up @@ -141,4 +149,3 @@ void render_logo_keyboard(uint8_t col, uint8_t row) {
oled_write_P(PSTR("Kyria rev1.4"), false);
}
#endif

13 changes: 9 additions & 4 deletions users/struckmb/bs-oled.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
#include "bs-oled.h"

/* #include <string.h> */
// Grab the print function
// Grab the print function
#ifdef ENCODER_ENABLE
# include "bs-encoder.h"
#endif // ENCODER_ENABLE

/* OLED
* This contains general purpose oled code
*/
*/

// Allow default to be overwritten by keymap if they return false
__attribute__ ((weak)) bool oled_task_keymap(void) {return true;}
Expand Down Expand Up @@ -83,14 +83,19 @@ void render_keymap(uint8_t col, uint8_t row, uint8_t def_layer) {
oled_write("BONE", false);
break;
# endif // BONE_ENABLE
# ifdef WORKMAN_ENABLE
case _WORKMAN:
oled_write("WRKMN", false);
break;
# endif // WORKMAN_ENABLE
# ifdef COLEMAK_ENABLE
case _COLMAK_DH:
oled_write("ColDH", false);
oled_write("COLMK", false);
break;
# endif // COLEMAK_ENABLE
# ifdef LILYPOND_ENABLE
case _LILYPOND:
oled_write("LyPnd", false);
oled_write("LYPND", false);
break;
# endif // LILYPOND_ENABLE
# ifdef ASETNIOP_ENABLE
Expand Down
Loading

0 comments on commit 7ce7a53

Please sign in to comment.