Commit Graph

3 Commits (5fecdd39294869257e7a8ea5bea9d1b754f4cb30)

Author SHA1 Message Date
nirenjan 5fecdd3929 feat: Generate identifiers for communication
In order to improve security around the command processing, I plan to
upgrade the communication protocol to use a fixed structure with an
optional payload. As a first pass on this, I added a script to generate
the IDs automatically from the configuration, as well as a script to map
the module names and log levels to integer IDs.

This also replaces the manual lmap_* and array_get_index lookup tables,
so I don't have to always deal with creating an entry in constants.h and
command.c and making sure they are in sync.
2026-04-22 09:02:17 -07:00
nirenjan 75f0125f54 feat: Add layout file parsing to x52d
This change is an initial step to adding support for profiles in x52d.
This will allow the user to create a keyboard layout in an easy to
read/write text based format, and have it compiled into a flat layout
that's easy for the daemon to parse and load into memory. This layout
can then be used to map a user's action key to the actual input usage
needed. This is necessary, because keyboards don't actually send the
character that is typed, but just the position on the keyboard. For
example, on a French AZERTY keyboard, the A key would actually send the
usage for `Keyboard_q_and_Q`. The OS would translate that into the
letter 'a' (or 'A' if Shift key is held) and pass that to the active
window.

This commit adds the full logic necessary for the layout loading,
validation and compiling, as well as tests for the compiler and loader.
2026-04-04 23:16:51 -07:00
nirenjan de465fbf6a refactor: Rename daemon sources to remove x52d_ prefix 2026-04-03 23:50:18 -07:00