Skip to content

Commit

Permalink
[Keymap] Simplifying ortho-4x12 jotix's layout (qmk#19336)
Browse files Browse the repository at this point in the history
  • Loading branch information
jotix authored and Siddharth Bhal committed Dec 30, 2022
1 parent 841f037 commit 6a1bd5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 25 deletions.
36 changes: 11 additions & 25 deletions layouts/community/ortho_4x12/jotix/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

enum layers {
_QWERTY,
_TCURSOR,
_LOWER,
_RAISE,
_NUMPAD,
_ADJUST,
};

#define TCURSOR TG(_TCURSOR)
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define NUMPAD MO(_NUMPAD)
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define NUMPAD TG(_NUMPAD)
#define ADJUST MO(_ADJUST)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

Expand All @@ -24,19 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
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_LCTL,KC_LGUI,KC_LALT,NUMPAD, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

[_TCURSOR] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_UP, _______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______,KC_SLSH,KC_LEFT,KC_DOWN,KC_RGHT
KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

Expand All @@ -60,13 +47,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END
_______,_______,_______,_______,ADJUST, _______,NUMPAD, _______,KC_HOME,KC_PGDN,KC_PGUP,KC_END
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),

[_NUMPAD] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
_______,KC_BTN1,KC_MS_U,KC_BTN2,KC_WH_U,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,_______,
NUMPAD, KC_BTN1,KC_MS_U,KC_BTN2,KC_WH_U,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_D,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
Expand All @@ -78,21 +65,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_ADJUST] = LAYOUT_ortho_4x12 (
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
_______,QK_BOOT,_______,_______,RGB_TOG,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,_______,_______,_______,
_______,QK_BOOT,_______,_______,QK_RBT, _______,_______,_______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,RGB_SAI,RGB_SAD,_______,_______,RGB_HUI,RGB_HUD,_______,_______,_______,_______,
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,RGB_VAI,RGB_VAD,_______,RGB_MOD,RGB_RMOD,TCURSOR,_______,
_______,_______,_______,_______,_______,_______,_______,QK_MAKE,_______,_______,_______,_______,
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
),
};

layer_state_t layer_state_set_user(layer_state_t state) {
state = update_tri_layer_state(state, _NUMPAD, _RAISE, _ADJUST);
#ifdef JOTANCK_LEDS
writePin(JOTANCK_LED2, (IS_LAYER_ON(_TCURSOR)));
writePin(JOTANCK_LED2, (IS_LAYER_ON_STATE(state, _NUMPAD)));
#endif
return state;
}
Expand Down
1 change: 1 addition & 0 deletions layouts/community/ortho_4x12/jotix/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DYNAMIC_MACRO_ENABLE = yes
BOOTMAGIC_ENABLE = yes

0 comments on commit 6a1bd5b

Please sign in to comment.