diff --git a/include/squirrel_keymap.h b/include/squirrel_keymap.h index bba0f71..c982e69 100644 --- a/include/squirrel_keymap.h +++ b/include/squirrel_keymap.h @@ -2,6 +2,7 @@ #define SQUIRREL_KEYMAP_H #include "squirrel_key.h" +int key_index_from_xy(int x, int y, int width); struct key nop(void); struct key keyboard(uint8_t keycode); struct key keyboard_modifier(uint8_t modifier); diff --git a/src/squirrel_keymap.c b/src/squirrel_keymap.c index ada945f..4cbc6ce 100644 --- a/src/squirrel_keymap.c +++ b/src/squirrel_keymap.c @@ -2,6 +2,8 @@ #include "squirrel_quantum.h" #include +int key_index_from_xy(int x, int y, int width) { return y * width + x; } + struct key nop(void) { return (struct key){ .pressed = key_nop,