Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/patrickt/centripedal
a tiny daemon for coalescing keyboard events
https://github.com/patrickt/centripedal
Last synced: 3 days ago
JSON representation
a tiny daemon for coalescing keyboard events
- Host: GitHub
- URL: https://github.com/patrickt/centripedal
- Owner: patrickt
- License: gpl-3.0
- Created: 2021-11-12T21:34:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-14T22:27:01.000Z (about 3 years ago)
- Last Synced: 2024-12-24T12:30:15.741Z (5 days ago)
- Language: C
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# centripedal
This is a tiny little daemon for macOS that coalesces keyboard modifier events (Ctrl, Alt, Cmd) between different keyboards (or other human interface devices like foot pedals) that are plugged into the same machine. By default, macOS keeps keyboard states independently of each other, so that pressing F on keyboard A while holding down CTRL on keyboard B is recognized only as an F. Though this behavior is sensible for an OS default, it interferes with workflows that use a dedicated input device for modifier events.
You'll need to grant this app accessibility privileges (in System Preferences.app) or run it as root.
## How it works
This uses the Quartz `CGEventTap` API to install a listener that listens for modifier-key events and adds them to other key-down events if necessary. Its state resets 10 seconds after the last modifier key is pressed, just to ensure that the system never gets in an unusable state. (In the event that it does, logging out and in will cure it.)
## To build
Run `xcodebuild`.
GPL3