Feature request: action accepting an arbitrary string handled by user-written code #797
Labels
enhancement
New feature or request
gauging interest
Looking for additional discussion and viewpoints
Is your feature request related to a problem? Please describe.
Have a mechanism for people willing to write Rust code to easily add their own desired behaviours without needing to know too much about the keyberon library or the kanata processing loop.
Describe the solution you'd like.
Add a new list action
(custom-behaviour "whatever string you want")
.kanata/parser/src/cfg/mod.rs
Line 1271 in 634ed97
Add a new custom action
CustomBehaviour(String)
kanata/parser/src/custom_action.rs
Line 12 in 634ed97
Add handling for press and release of
CustomBehaviour
. Define easy-to-find functions that accept the string defined inCustomBehaviour
, which would be where users can add their code. Probably makes sense to put in a new file. Custom behaviour will be stringly typed 🧵.kanata/src/kanata/mod.rs
Line 918 in 634ed97
Add some documentation for how to interact with OS and read layout state.
Describe alternatives you've considered.
A user could certainly write their own code using llhook/evdev to do custom behaviours. But since kanata already has a lot of nice built-in behaviours that work mostly-fine out of the box, it might be nice to fork and extend kanata and add that little bit extra that's missing.
Though perhaps
cmd
is already a sufficient mechanism for this... ?Additional context
N/A
The text was updated successfully, but these errors were encountered: