-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keymaps #29
base: master
Are you sure you want to change the base?
Keymaps #29
Conversation
- Hotkeys can now be customized via a JSON file in the current directory. - Only hotkeys arriving from specific devices will be registered, if requested.
This looks incredible, thanks very much for this! I sure wish Livesplit had per-device binding filters too. Couple questions for you:
|
Shoot, this won't work on Mac OS X. I had a quick look, and there doesn't seem to be any comparable library either. What might work better here is a three-tier process that fails gracefully:
Key remapping would still work with pynput, however it uses very different codes than evdev and hooks into the keyboard after keycodes have been interpreted; the latter means that the keypad's enter acts the same as normal enter in pynput, for instance, and pressing NumLock changes the keys it reads. Supporting both libraries would mean a rethink of keymap.json's layout. It may also mean adding some capability detection code via a python call-out, so the OCaml code can detect the issue and support that third tier. Give me a few days to mull over a new architecture. |
I see. Good luck! |
I see huge value in this functionality. I have been looking for a clean way to us the L and R shoulder triggers to control splits while playing NES games. Best of luck getting this merged in. I use linux not OSX so that is not a deal breaker for me. |
- pynput can now incorporate mouse events. - Added some python scripts to test out various configurations and python modules. - BROKEN. Tests fine outside the harness, but crashes hard within. Debugging ongoing..
- Added a device list to test_evdev.py, as it helps with the filter.
…nd, causing Xlib and therefore pynput to fail. Tests fine on a Linux computer with X11, after correcting the prior typo. - Updated the docs to reflect the code changes.
That took longer than a few days, but I'm pretty happy with the current state of this branch. Both While I was working on this, I also added the ability to bind events to mouse input for
would be of some use. |
Will this be integrated? this program is near perfect but cannot be used for PC games that dont use controller because how often space and other keys in PC gaming |
My primary use for
Over months of occasional use, the worst issue I've encountered is that |
This branch changes the python script that handles keymaps. It uses a different library, which allows for mice and other devices to be captured as well. It also allows custom keymaps, and a basic device filter so that a subset of plugged-in devices can control Flitter. The code that interfaces has been given a minor update, so that it now responds to categories of events rather that named buttons, an example keymap has been added, and the README has been updated.