diff options
Diffstat (limited to 'app/include/zmk/kscan-mock.h')
-rw-r--r-- | app/include/zmk/kscan-mock.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/include/zmk/kscan-mock.h b/app/include/zmk/kscan-mock.h new file mode 100644 index 0000000..d481899 --- /dev/null +++ b/app/include/zmk/kscan-mock.h @@ -0,0 +1,8 @@ +#pragma once + +#define ZMK_MOCK_IS_PRESS(v) ((v & (0x01 << 31)) != 0) +#define ZMK_MOCK_PRESS(row, col, msec) (row + (col << 8) + (msec << 16) + (0x01 << 31)) +#define ZMK_MOCK_RELEASE(row, col, msec) (row + (col << 8) + (msec << 16)) +#define ZMK_MOCK_ROW(v) (v & 0xFF) +#define ZMK_MOCK_COL(v) ((v >> 8) & 0xFF) +#define ZMK_MOCK_MSEC(v) ((v & ~(0x01 << 31)) >> 16) |