mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
* 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.
13 lines
427 B
C
13 lines
427 B
C
|
|
#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) |