multi-group support/scancode handling #46
Replies: 1 comment 1 reply
-
updateafter doing some research, I came across this pynput issue that revealed to me SnapKey doesn't handle i've implemented a scancode solution to my fork and after some testing, the following games now respond properly to SnapKey inputs:
these are only from my testing, I'm sure many more games listed as incompatible will benefit from the fix. i'm in the middle of cleaning up the implementation, but bump to @cafali to ask if this is alright to create a PR for? |
Beta Was this translation helpful? Give feedback.
-
multigroup support
with the new updates that add multiple key groups, i've extended the functionality to add theoretically infinite key groups with equally infinite amounts of keys within them (with the limitation of how many keys your keyboard has, lol)
you can test it here on my fork (build instructions remain the same)
the config can be defined as such:
where
[Group]
denotes a new key group to register and key names do not have to bekey1, key2, etc...
; what matters is they begin withkey
, so you can now have names for each such askey_back, key_forward, key_left, etc...
the program now handles multiple groups in separate from each other, and will error if there are overlapping keys in the config
thread blocking (potentially)
while implementing this extension, I took notice that some games like CS:Source and CS1.6 do not respond at all to inputs generated by my fork of SnapKey
it, as I figured, has something to do with Windows'
SendInput
, as the inputs generated are very clearly synthetic to the system; unlike usingXTest
oruinput
on Linux, where they emulate real keypresses - though the python librarypynput
as far as I know uses the same Windows API to implement the same functionality, so I could be wrong herei'll keep looking into this, but open to suggestions as I don't have extensive knowledge on specifically this part of the Windows API, being more of a Linux dev for most of my career (and am close to finishing a native Linux implementation of SnapKey ^^)
Beta Was this translation helpful? Give feedback.
All reactions