Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
cfab3e2d6e
|
@ -326,7 +326,7 @@ bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key
|
|||
|
||||
If you, for example, use multiple base layers for different key layouts, one for QWERTY, and another one for Colemak, you might want your combos to work from the same key positions on all layers. Defining the same combos again for another layout is redundant and takes more memory. The solution is to just check the keycodes from one layer.
|
||||
|
||||
With `#define COMBO_ONLY_FROM_LAYER _LAYER_A` the combos' keys are always checked from layer `_LAYER_A` even though the active layer would be `_LAYER_B`.
|
||||
With `#define COMBO_ONLY_FROM_LAYER 0` in config.h, the combos' keys are always checked from layer `0`, even if other layers are active.
|
||||
|
||||
## User callbacks
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
// jotix ortho_4x12_layout config.h
|
||||
|
||||
#define TAPPING_TOGGLE 2
|
||||
#define TAPPING_TERM 175
|
|
@ -2,19 +2,17 @@
|
|||
|
||||
enum layers {
|
||||
_QWERTY,
|
||||
_TCURSOR,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_GAME,
|
||||
_NUMPAD,
|
||||
_MOUSE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define GAME TG(_GAME)
|
||||
#define NUMPAD TG(_NUMPAD)
|
||||
#define MOUSE TG(_MOUSE)
|
||||
#define TCURSOR TG(_TCURSOR)
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define NUMPAD MO(_NUMPAD)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
@ -26,10 +24,22 @@ 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,KC_RALT,LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT
|
||||
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
|
||||
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_ortho_4x12 (
|
||||
// ┌───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┬───────┐
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
|
@ -54,49 +64,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
|
||||
),
|
||||
|
||||
[_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_BTN1,KC_MS_U,KC_BTN2,KC_WH_U,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,_______,
|
||||
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
|
||||
_______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,_______,
|
||||
_______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_D,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,_______,
|
||||
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
|
||||
_______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PSLS,KC_PENT,
|
||||
_______,_______,_______,_______,_______,_______,KC_NLCK,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 ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
_______,RESET ,_______,_______,RGB_TOG,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,_______,_______,_______,
|
||||
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
|
||||
_______,_______,_______,_______,_______,GAME ,_______,_______,_______,_______,_______,_______,
|
||||
_______,_______,RGB_SAI,RGB_SAD,_______,_______,RGB_HUI,RGB_HUD,_______,_______,_______,_______,
|
||||
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
|
||||
_______,_______,_______,_______,_______,_______,NUMPAD, MOUSE, _______,_______,_______,_______,
|
||||
_______,_______,_______,_______,_______,RGB_VAI,RGB_VAD,_______,RGB_MOD,RGB_RMOD,TCURSOR,_______,
|
||||
// ├───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┼───────┤
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______
|
||||
// └───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘
|
||||
|
@ -104,10 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
state = update_tri_layer_state(state, _NUMPAD, _RAISE, _ADJUST);
|
||||
#ifdef JOTANCK_LEDS
|
||||
writePin(JOTANCK_LED1, (get_highest_layer(state) == _MOUSE));
|
||||
writePin(JOTANCK_LED2, (get_highest_layer(state) == _NUMPAD));
|
||||
writePin(JOTANCK_LED2, (IS_LAYER_ON(_TCURSOR)));
|
||||
#endif
|
||||
return state;
|
||||
}
|
||||
|
@ -117,5 +102,8 @@ bool led_update_user(led_t led_state) {
|
|||
if (!led_state.num_lock) {
|
||||
tap_code(KC_NUMLOCK);
|
||||
}
|
||||
#ifdef JOTANCK_LEDS
|
||||
writePin(JOTANCK_LED1, led_state.caps_lock);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue