ajwalkiewicz / SoundPad

Simple desktop sound pad
MIT License
7 stars 0 forks source link

Use only KP_0-9 instead of 0-9 #12

Open olehj opened 1 year ago

olehj commented 1 year ago

As requested by another thread, the other issue would be to only recognize the numpad 0-9 instead of the regular 0-9 which should have another keybinds. Issue detected in linux. (I know there's separate inputs for numpad keys versus regular keys as I use num pad 0-9 for CS:GO keybinds (the only conflicting key is the KP_ENTER which act as any "ENTER" key).

ajwalkiewicz commented 1 year ago

I did some investigation and unfortunately this is much harder than I expected. The biggest problem is that module pynput that I'm using for global keys doesn't separate NumPad keys from NumRow keys. It suppose to do that, but based on those issues: https://github.com/moses-palmer/pynput/issues?q=is%3Aissue+is%3Aopen+numpad, I'm not the only one that struggles with it. It's not something new, so also I wouldn't expect it to be fixed soon.

There are 3 things that potentially can by done:

  1. I could use different library for keyboard control - but I couldn't find anything better than pynput
  2. I can try to fix pynput but I'm not sure if I'm able to do that, definitively huge amount of time would be required from my side.
  3. I can write my own implementation for keyboard control using evdev and ctypes modules - I opt fort that option, but still it require a lot of time.

So giving above reasons, I will park this issue for the further future. @olehj , If you feel that you can pull it of, than I encourage you to do that.

olehj commented 1 year ago

No problem, thanks for looking into it anyway :)