diff options
author | jotix <69703151+jotix@users.noreply.github.com> | 2022-08-03 07:32:23 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-03 11:32:23 +0100 |
commit | 4ec2626b4360b8b36e0f6773ad36280801786ce0 (patch) | |
tree | 044afa93c004a63ff7e937a5de5b5eadbc63789e /layouts/community/ortho_4x12 | |
parent | 0206bd9df31521fcfd764c3dd4cff383e4957151 (diff) |
jotix's community ortho_4x12 layout change (#17891)
Diffstat (limited to 'layouts/community/ortho_4x12')
-rw-r--r-- | layouts/community/ortho_4x12/jotix/keymap.c | 89 |
1 files changed, 60 insertions, 29 deletions
diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index 9d208f0a7a..393bb88863 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c @@ -4,14 +4,17 @@ enum layers { _QWERTY, _LOWER, _RAISE, + _GAME, + _NUMPAD, + _MOUSE, + _ADJUST, }; -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -static bool is_ctl_pressed; -static bool is_esc_pressed; -static bool is_bspc_pressed; +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define GAME TG(_GAME) +#define NUMPAD TG(_NUMPAD) +#define MOUSE TG(_MOUSE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -50,12 +53,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ ), + +[_GAME] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_UP, _______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,KC_SLSH,KC_LEFT,KC_DOWN,KC_RGHT +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), + +[_NUMPAD] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + NUMPAD ,_______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PSLS,KC_PENT, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,KC_P0, KC_PDOT,KC_PAST,_______ +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), + +[_MOUSE] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + MOUSE, KC_BTN1,KC_MS_U,KC_BTN2,KC_WH_U,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_D,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), + +[_ADJUST] = LAYOUT_ortho_4x12 ( +// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ + _______,RESET ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,GAME ,_______,_______,_______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,NUMPAD, MOUSE, _______,_______,_______,_______, +// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ +// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ +), }; layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); #ifdef JOTANCK_LEDS - writePin(JOTANCK_LED1, (get_highest_layer(state) == _LOWER)); - writePin(JOTANCK_LED2, (get_highest_layer(state) == _RAISE)); + writePin(JOTANCK_LED1, (get_highest_layer(state) == _MOUSE)); + writePin(JOTANCK_LED2, (get_highest_layer(state) == _NUMPAD)); #endif return state; } @@ -67,24 +119,3 @@ bool led_update_user(led_t led_state) { } return true; } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_LCTL: - is_ctl_pressed = record->event.pressed; - break; - case KC_ESC: - is_esc_pressed = record->event.pressed; - break; - case KC_BSPC: - is_bspc_pressed = record->event.pressed; - break; - }; - return true; -} - -void matrix_scan_user(void) { - if (is_ctl_pressed && is_esc_pressed && is_bspc_pressed) { - reset_keyboard(); - } -} |