Since keyboard_layout.[ch] has gained more features, and handles more than just
filling out the keyboard report, move it to action.[ch] instead. I see no sane
way to separate the keyboard and mouse report filling, unless we want to loop
over key states twice, hence them being in the same file.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Due to a copy & paste error, Mod+d was doing Shift+Tab instead of Alt+Tab, this
fixes that.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This sets up the `Mouse` layer to have all the keys in their right place, even
if they do nothing for now. A number of enums were introduced to make it easier
to describe mouse key behaviour.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Adds `Fn` and `Mouse` layers, so the switcher keys actually work. Also
rearranged `Mod` to follow the factory layout, with the added change that
`Shift` keys are also included on the layer. The `Fn` layer was laid out,
according to the factory layout. The `Mouse` layer is mostly empty, except for
some modifiers and the switcher key.
The most significant difference from the factory layout is that modifiers are
present on all layers, in the same position.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This does a lot of things - all of this together, because it would have been
much harder to split them up into many small commits.
We get rid of the helper macros used in default_layout.c, drop the .raw member
of uhk_key_t, use a singleton keymap, and prepare the prevKeyStates to handle
all slots. Also drops the TRNS macro.
With these changes, default_layout.h became obsolete, and was deleted too.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
This changes the keymap layout to be as described in #17, and updates the
default layout to follow. (Also adds the missing Space and Mod keys on the two
keys below the bottom row)
The layout itself was considerably simplified by introducing a few local macros
to hide some of the uglier details.
Fixes#17.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
We now use a 32-bit structure to describe each key, and an `uhk_key_t` type that
wraps all the supported things into a union. But this is not the only change: to
be able to move the Fn/Mod keys anywhere, instead of hardcoding their location,
they are now proper layer keys. To make it easier to handle turning a layer off,
key releases can be handled explicitly, too.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>