better chordal_hold_handedness

planck is the only tricky one
This commit is contained in:
Christoph Cullmann 2024-12-26 17:29:58 +01:00
parent 338ba782d6
commit 05eccc1311
No known key found for this signature in database
5 changed files with 24 additions and 7 deletions

View file

@ -89,13 +89,6 @@ 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';
}
#ifndef CC_NO_LED #ifndef CC_NO_LED
void keyboard_post_init_user(void) { void keyboard_post_init_user(void) {

View file

@ -20,5 +20,11 @@ KC_NO, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29
KC_NO, K30, K31, K32, K33, KC_NO\ KC_NO, K30, K31, K32, K33, KC_NO\
) )
// define handness manually, just to be sure
char chordal_hold_handedness(keypos_t key)
{
return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R';
}
// our shared 42 keys keymap // our shared 42 keys keymap
#include "common/keymap.h" #include "common/keymap.h"

View file

@ -23,5 +23,11 @@ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29
// no led // no led
#define CC_NO_LED #define CC_NO_LED
// define handness manually, just to be sure
char chordal_hold_handedness(keypos_t key)
{
return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R';
}
// our shared 42 keys keymap // our shared 42 keys keymap
#include "common/keymap.h" #include "common/keymap.h"

View file

@ -20,5 +20,11 @@ K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29
KC_NO, KC_NO, KC_NO, K30, K31, KC_NO, KC_NO, K32, K33, KC_NO, KC_NO, KC_NO\ KC_NO, KC_NO, KC_NO, K30, K31, KC_NO, KC_NO, K32, K33, KC_NO, KC_NO, KC_NO\
) )
// define handness manually, just to be sure
char chordal_hold_handedness(keypos_t key)
{
return ((pos.row < 3) || (pos.row == 3 && pos.col < 3) || (pos.row == 7 && pos.col > 2)) ? 'L' : 'R';
}
// our shared 42 keys keymap // our shared 42 keys keymap
#include "common/keymap.h" #include "common/keymap.h"

View file

@ -23,5 +23,11 @@ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29
// no led // no led
#define CC_NO_LED #define CC_NO_LED
// define handness manually, just to be sure
char chordal_hold_handedness(keypos_t key)
{
return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R';
}
// our shared 42 keys keymap // our shared 42 keys keymap
#include "common/keymap.h" #include "common/keymap.h"