Initial work on keymap transforms for non-standard matrixes.
* Allows "gaps" for keyboards like Kyra. * Allows keyboards with matrixes that don't map the logical key locations to have normal looking keymaps when defined.
This commit is contained in:
parent
0712dadd29
commit
1751470785
12 changed files with 1028 additions and 0 deletions
13
app/include/dt-bindings/zmk/keymap-transform.h
Normal file
13
app/include/dt-bindings/zmk/keymap-transform.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
#include <zmk/util.h>
|
||||
|
||||
#define KT_ROW(item) (item >> 8)
|
||||
#define KT_COL(item) (item & 0xFF)
|
||||
|
||||
#define _ROW_COL(row, col) (((row) << 8) + (col))
|
||||
|
||||
#define _IDENTITY_ENTRY(col, row) _ROW_COL(row, col)
|
||||
#define IDENTITY_ROW(row, count) UTIL_LISTIFY(count, _IDENTITY_ENTRY, row)
|
||||
|
||||
#define _OFFSET_ENTRY(col, offset, row) _ROW_COL(row, col + offset)
|
||||
#define OFFSET_ROW(offset, row, count) UTIL_LISTIFY(count, _OFFSET_ENTRY, offset, row)
|
||||
Loading…
Add table
Add a link
Reference in a new issue