fix shift-control-t
deduplicate the chordal functions
This commit is contained in:
parent
ec10618bb9
commit
4f4e8fcadc
|
@ -89,6 +89,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
char chordal_hold_handedness(keypos_t key)
|
||||||
|
{
|
||||||
|
// special handle thumb keys
|
||||||
|
if (key.row == 3 || key.row == 7) return '*';
|
||||||
|
return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R';
|
||||||
|
}
|
||||||
|
|
||||||
|
bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record,
|
||||||
|
uint16_t other_keycode, keyrecord_t* other_record) {
|
||||||
|
// Allow hold between any pair of mod-tap keys.
|
||||||
|
if (IS_QK_MOD_TAP(tap_hold_keycode) && IS_QK_MOD_TAP(other_keycode)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise defer to the opposite hands rule.
|
||||||
|
return get_chordal_hold_default(tap_hold_record, other_record);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NO_LED
|
#ifndef NO_LED
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
char chordal_hold_handedness(keypos_t key)
|
|
||||||
{
|
|
||||||
// special handle thumb keys
|
|
||||||
if (key.row == 3 || key.row == 7) return '*';
|
|
||||||
return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R';
|
|
||||||
}
|
|
||||||
|
|
||||||
// layout helper macro, we just use 42 keys
|
// layout helper macro, we just use 42 keys
|
||||||
#undef LAYOUT
|
#undef LAYOUT
|
||||||
#define LAYOUT(\
|
#define LAYOUT(\
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
char chordal_hold_handedness(keypos_t key)
|
|
||||||
{
|
|
||||||
// special handle thumb keys
|
|
||||||
if (key.row == 3 || key.row == 7) return '*';
|
|
||||||
return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R';
|
|
||||||
}
|
|
||||||
|
|
||||||
// layout helper macro, we just use 42 keys
|
// layout helper macro, we just use 42 keys
|
||||||
#undef LAYOUT
|
#undef LAYOUT
|
||||||
#define LAYOUT(\
|
#define LAYOUT(\
|
||||||
|
|
|
@ -5,13 +5,6 @@
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
char chordal_hold_handedness(keypos_t key)
|
|
||||||
{
|
|
||||||
// special handle thumb keys
|
|
||||||
if (key.row == 3 || key.row == 7) return '*';
|
|
||||||
return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R';
|
|
||||||
}
|
|
||||||
|
|
||||||
// layout helper macro, we just use 42 keys
|
// layout helper macro, we just use 42 keys
|
||||||
#undef LAYOUT
|
#undef LAYOUT
|
||||||
#define LAYOUT(\
|
#define LAYOUT(\
|
||||||
|
|
Loading…
Reference in a new issue