diff options
| author | jotix <47826561+jotix@users.noreply.github.com> | 2020-04-05 19:15:24 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-05 23:15:24 +0100 |
| commit | 26cb83b8c04029f8882f5d3f537c520dde17126e (patch) | |
| tree | 11fdfd4fa3fa19f4b41300b4244570277540a4b0 | |
| parent | 2392ddb76b3d7e267dfd3ea7bf33eed8a94444f9 (diff) | |
| download | qmk_firmware-26cb83b8c04029f8882f5d3f537c520dde17126e.tar.gz qmk_firmware-26cb83b8c04029f8882f5d3f537c520dde17126e.zip | |
jotix layouts (#8644)
* jotix layouts
* jotix ortho 4x4 layout
* Update layouts/community/ortho_4x4/jotix/keymap.c
Co-Authored-By: Drashna Jaelre <drashna@live.com>
* jotix
Co-authored-by: Drashna Jaelre <drashna@live.com>
| -rw-r--r-- | layouts/community/ortho_4x12/jotix/keymap.c | 36 | ||||
| -rw-r--r-- | layouts/community/ortho_4x4/jotix/keymap.c | 91 | ||||
| -rw-r--r-- | layouts/community/ortho_4x4/jotix/readme.md | 5 |
3 files changed, 77 insertions, 55 deletions
diff --git a/layouts/community/ortho_4x12/jotix/keymap.c b/layouts/community/ortho_4x12/jotix/keymap.c index fbbb7f251..600772288 100644 --- a/layouts/community/ortho_4x12/jotix/keymap.c +++ b/layouts/community/ortho_4x12/jotix/keymap.c | |||
| @@ -8,7 +8,7 @@ enum layers { | |||
| 8 | 8 | ||
| 9 | #define LOWER MO(_LOWER) | 9 | #define LOWER MO(_LOWER) |
| 10 | #define RAISE MO(_RAISE) | 10 | #define RAISE MO(_RAISE) |
| 11 | #define TGLOWER TG(_LOWER) | 11 | #define SHRAISE LM(_RAISE, MOD_LSFT) |
| 12 | 12 | ||
| 13 | static bool is_ctl_pressed; | 13 | static bool is_ctl_pressed; |
| 14 | static bool is_esc_pressed; | 14 | static bool is_esc_pressed; |
| @@ -20,35 +20,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 20 | // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ | 20 | // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ |
| 21 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | 21 | KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, |
| 22 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 22 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 23 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, | 23 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT, |
| 24 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 24 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 25 | KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_ENT, | 25 | KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP, KC_SLSH, |
| 26 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 26 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 27 | KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT | 27 | KC_LCTL,KC_LGUI,KC_LALT,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, SHRAISE,KC_LEFT,KC_DOWN,KC_RGHT |
| 28 | // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ | 28 | // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ |
| 29 | ), | 29 | ), |
| 30 | 30 | ||
| 31 | [_LOWER] = LAYOUT_ortho_4x12 ( | 31 | [_LOWER] = LAYOUT_ortho_4x12 ( |
| 32 | // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ | 32 | // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ |
| 33 | _______,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, | 33 | _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,_______, |
| 34 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 34 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 35 | _______,KC_MINS,KC_EQL, KC_LBRC,KC_RBRC,KC_BSLS,KC_GRV, _______,_______,_______,_______,_______, | 35 | _______,KC_F11, KC_F12, KC_INS, KC_HOME,KC_PGUP,_______,_______,_______,_______,_______,_______, |
| 36 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 36 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 37 | _______,KC_UNDS,KC_PLUS,KC_LCBR,KC_RCBR,KC_PIPE,KC_TILD,KC_CAPS,_______,_______,_______,_______, | 37 | _______,_______,_______,KC_DEL, KC_END, KC_PGDN,_______,_______,_______,KC_BTN1,KC_MS_U,KC_BTN2, |
| 38 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 38 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 39 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ | 39 | _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MS_L,KC_MS_D,KC_MS_R |
| 40 | // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ | 40 | // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ |
| 41 | ), | 41 | ), |
| 42 | 42 | ||
| 43 | [_RAISE] = LAYOUT_ortho_4x12 ( | 43 | [_RAISE] = LAYOUT_ortho_4x12 ( |
| 44 | // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ | 44 | // ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐ |
| 45 | _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, | 45 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, |
| 46 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 46 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 47 | _______,KC_F11, KC_F12, _______,_______,_______,_______,KC_VOLD,KC_MUTE,KC_VOLU,_______,_______, | 47 | KC_CAPS,_______,_______,_______,_______,_______,KC_LBRC,KC_RBRC,KC_BSLS,KC_QUOT,_______,_______, |
| 48 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 48 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 49 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | 49 | _______,_______,_______,_______,_______,_______,KC_MINS,KC_EQL, _______,_______,KC_VOLU,_______, |
| 50 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ | 50 | // ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤ |
| 51 | _______,_______,_______,_______,TGLOWER,_______,_______,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END | 51 | _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_BSPC,KC_VOLD,KC_MUTE |
| 52 | // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ | 52 | // └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘ |
| 53 | ), | 53 | ), |
| 54 | 54 | ||
| @@ -56,11 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 56 | 56 | ||
| 57 | uint32_t layer_state_set_user(uint32_t state) { | 57 | uint32_t layer_state_set_user(uint32_t state) { |
| 58 | #ifdef JOTANCK_LEDS | 58 | #ifdef JOTANCK_LEDS |
| 59 | if (biton32(state) == _LOWER) { | 59 | writePin(JOTANCK_LED2, (get_highest_layer(state) == _RAISE)); |
| 60 | writePinHigh(JOTANCK_LED1); | ||
| 61 | } else { | ||
| 62 | writePinLow(JOTANCK_LED1); | ||
| 63 | } | ||
| 64 | #endif | 60 | #endif |
| 65 | return state; | 61 | return state; |
| 66 | } | 62 | } |
| @@ -74,11 +70,7 @@ bool led_update_user(led_t led_state) { | |||
| 74 | 70 | ||
| 75 | #ifdef JOTANCK_LEDS | 71 | #ifdef JOTANCK_LEDS |
| 76 | // CapsLock led | 72 | // CapsLock led |
| 77 | if (led_state.caps_lock) { | 73 | writePin(JOTANCK_LED1, led_state.caps_lock); |
| 78 | writePinHigh(JOTANCK_LED2); | ||
| 79 | } else { | ||
| 80 | writePinLow(JOTANCK_LED2); | ||
| 81 | } | ||
| 82 | #endif | 74 | #endif |
| 83 | return true; | 75 | return true; |
| 84 | } | 76 | } |
diff --git a/layouts/community/ortho_4x4/jotix/keymap.c b/layouts/community/ortho_4x4/jotix/keymap.c index 91d0ed74d..9035860da 100644 --- a/layouts/community/ortho_4x4/jotix/keymap.c +++ b/layouts/community/ortho_4x4/jotix/keymap.c | |||
| @@ -1,41 +1,74 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include QMK_KEYBOARD_H |
| 2 | 2 | ||
| 3 | extern keymap_config_t keymap_config; | 3 | enum layers { |
| 4 | _NUMPAD, | ||
| 5 | _GAMEPAD, | ||
| 6 | _FN | ||
| 7 | }; | ||
| 4 | 8 | ||
| 5 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 9 | static bool is_p0_pressed; |
| 6 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | 10 | static bool is_p7_pressed; |
| 7 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | 11 | static bool is_pmns_pressed; |
| 8 | // entirely and just use numbers. | ||
| 9 | 12 | ||
| 10 | #define _NUMPAD 0 | 13 | #define TGGAME TG(_GAMEPAD) |
| 11 | #define _LOWER 1 | ||
| 12 | #define LOWER LT(_LOWER, KC_PENT) | ||
| 13 | 14 | ||
| 14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 15 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 15 | 16 | ||
| 16 | /* Numpad | ||
| 17 | * +-------+-------+-------+-------+ | ||
| 18 | * | 7 | 8 | 9 | - | | ||
| 19 | * +-------+-------+-------+-------+ | ||
| 20 | * | 4 | 5 | 6 | + | | ||
| 21 | * +-------+-------+-------+-------+ | ||
| 22 | * | 1 | 2 | 3 | / | | ||
| 23 | * +-------+-------+-------+-------+ | ||
| 24 | * | | 0 | . | * | | ||
| 25 | * +-------+-------+-------+-------+ | ||
| 26 | */ | ||
| 27 | [_NUMPAD] = LAYOUT_ortho_4x4 ( | 17 | [_NUMPAD] = LAYOUT_ortho_4x4 ( |
| 28 | KC_P7, KC_P8, KC_P9, KC_PMNS, | 18 | KC_P7, KC_P8, KC_P9, KC_PMNS, |
| 29 | KC_P4, KC_P5, KC_P6, KC_PPLS, | 19 | KC_P4, KC_P5, KC_P6, KC_PPLS, |
| 30 | KC_P1, KC_P2, KC_P3, KC_PSLS, | 20 | KC_P1, KC_P2, KC_P3, MO(_FN), |
| 31 | LOWER, KC_P0, KC_PDOT,KC_PAST | 21 | KC_P0, KC_PDOT,KC_PSLS,KC_PAST |
| 32 | ), | 22 | ), |
| 33 | 23 | ||
| 34 | /* Lower */ | 24 | [_GAMEPAD] = LAYOUT_ortho_4x4 ( |
| 35 | [_LOWER] = LAYOUT_ortho_4x4 ( | 25 | KC_5, KC_6, KC_7, KC_8, |
| 36 | KC_NLCK,_______,_______,RESET , | 26 | KC_1, KC_2, KC_3, KC_4, |
| 37 | _______,_______,_______,_______, | 27 | KC_Q, KC_W, KC_E, _______, |
| 38 | _______,_______,_______,_______, | 28 | KC_A, KC_S, KC_D, KC_SPC |
| 39 | _______,_______,_______,_______ | ||
| 40 | ), | 29 | ), |
| 30 | |||
| 31 | [_FN] = LAYOUT_ortho_4x4 ( | ||
| 32 | KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR, | ||
| 33 | KC_EXLM,KC_AT, KC_HASH,KC_DLR, | ||
| 34 | KC_Z, KC_X, KC_C, _______, | ||
| 35 | KC_NLCK,_______,_______,TGGAME | ||
| 36 | ) | ||
| 41 | }; | 37 | }; |
| 38 | |||
| 39 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 40 | #ifdef JOTPAD16_LEDS | ||
| 41 | writePin(JOTPAD16_LED1, (get_highest_layer(state) == _FN)); | ||
| 42 | writePin(JOTPAD16_LED2, (get_highest_layer(state) == _GAMEPAD)); | ||
| 43 | #endif | ||
| 44 | return state; | ||
| 45 | } | ||
| 46 | |||
| 47 | bool led_update_user(led_t led_state) { | ||
| 48 | // NumLock allways on | ||
| 49 | if (!led_state.num_lock) { | ||
| 50 | tap_code(KC_NUMLOCK); | ||
| 51 | } | ||
| 52 | return true; | ||
| 53 | } | ||
| 54 | |||
| 55 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 56 | switch (keycode) { | ||
| 57 | case KC_P0: | ||
| 58 | is_p0_pressed = record->event.pressed; | ||
| 59 | break; | ||
| 60 | case KC_P7: | ||
| 61 | is_p7_pressed = record->event.pressed; | ||
| 62 | break; | ||
| 63 | case KC_PMNS: | ||
| 64 | is_pmns_pressed = record->event.pressed; | ||
| 65 | break; | ||
| 66 | }; | ||
| 67 | return true; | ||
| 68 | } | ||
| 69 | |||
| 70 | void matrix_scan_user(void) { | ||
| 71 | if (is_p0_pressed && is_p7_pressed && is_pmns_pressed) { | ||
| 72 | reset_keyboard(); | ||
| 73 | } | ||
| 74 | } | ||
diff --git a/layouts/community/ortho_4x4/jotix/readme.md b/layouts/community/ortho_4x4/jotix/readme.md index 0624f6215..b4b56b58d 100644 --- a/layouts/community/ortho_4x4/jotix/readme.md +++ b/layouts/community/ortho_4x4/jotix/readme.md | |||
| @@ -1,6 +1,3 @@ | |||
| 1 | # Jotix ortho 4x4 keymap | 1 | # Jotix ortho 4x4 keymap |
| 2 | 2 | ||
| 3 |  | 3 | Tested on jotpad16 \ No newline at end of file |
| 4 | |||
| 5 | Enter is 'Lower' on hold. | ||
| 6 | |||
