I'm interested in a creating a macro input system.
I want to be able to detect the state of keyboards and be able to filter block them.
Is there any established API for keyboard filtering? What about key injection? I looked in ports/sysutils and didn't see anything.
On the simple side what I'm imagining could be used for mapping keys to a game controller. I could just create a virtual keyboard for that but I might also want to monitor key states and perform different actions depending on them. On the more complex side what I'm imagining could be used with terminal filters and application detection for remapping keys dynamically per application.
I'm pretty much thinking I need to hack the console and tty drivers and expose some custom ioctrls of my own.
Thanks for any insights.
P.S. And yes obviously whatever I come up with will need root privileges to function and or install.
I want to be able to detect the state of keyboards and be able to filter block them.
Is there any established API for keyboard filtering? What about key injection? I looked in ports/sysutils and didn't see anything.
On the simple side what I'm imagining could be used for mapping keys to a game controller. I could just create a virtual keyboard for that but I might also want to monitor key states and perform different actions depending on them. On the more complex side what I'm imagining could be used with terminal filters and application detection for remapping keys dynamically per application.
I'm pretty much thinking I need to hack the console and tty drivers and expose some custom ioctrls of my own.
Thanks for any insights.
P.S. And yes obviously whatever I come up with will need root privileges to function and or install.