Open rah2501 opened 3 years ago
I'm wondering if there's a particular reason for scc-daemon to send scan codes instead of key events?
It seemd like best solution at the time (what's code phrase for 'i can't remember why I did it like this'). I don't have any problem with changing so it works better.
I'm trying to set my controller to send keys which aren't ordinarily on the keyboard to act as a push-to-talk button for Mumble without interfering with the operation of other software. I've been trying to set it to send the F13 key but the scc-daemon crashes:
It seems that there is a static list of key scan codes which the scc-daemon emulates:
https://github.com/kozec/sc-controller/blob/ce92c773b8b26f6404882e9209aff212c4053170/scc/uinput.py#L58
Going deeper into uinput, it seems scc-daemon is sending keyboard scan codes when it could be sending raw key events, as shown in the example from the kernel documentation:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/input/uinput.rst?id=a38fd8748464831584a19438cbb3082b5a2dab15#n95
I'm wondering if there's a particular reason for scc-daemon to send scan codes instead of key events? Sending key events would eliminate the need for the restricted list of static key codes and scc-daemon could send any key at all from its list of key codes generated from the kernel headers.