summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/community/ortho_4x12/jotix/keymap.c89
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();
- }
-}