Comments (5)
Yes, it works. I'm typing using the PR version right now!
It's great!
from kanata.
That's a cool use case, thanks for sharing it! 👍
from kanata.
You've probably found this already, but for reference, the input reading is done in:
https://github.com/jtroo/kanata/blob/main/src/oskbd/linux.rs
Currently, the event loop does blocking calls to fetch_events
for a single device, so would need to rearchitect the input event handling to be able to handle multiple devices. It would be good to dig into evsieve
's source as inspiration for how they do it.
Edit:
Browsing through evsieve's source, it uses C style code using epoll and raw file descriptors. Quite efficient, but a lot more complicated than what kanata's doing.
from kanata.
I've added a kanata-evsieve crate exposing the evsieve functionality as a library. Not sure yet if using it is a viable strategy, but seems like it should work out okay.
from kanata.
@br-lemes please test the code in the new PR at your leisure. I haven't actually tested it on multiple keyboards myself since I don't have a convenient way to do so, but I think it should work.
Config change:
;; If you want to read from multiple devices, separate them by `:`.
;; linux-dev /dev/input/<dev1>:/dev/input/<dev2>
from kanata.
Related Issues (20)
- Bug: unable to globally swap caps and esc HOT 2
- Feature request: modular per-platform config.adoc HOT 9
- Feature request: togglable `caps-word` HOT 2
- Bug: In WSL space is inserted after shift or control when running kanata in host HOT 1
- Bug: windows iconbar icon isn't removed when app is killed HOT 1
- Bug: Dead keys cause keyboard modifier state to get corrupt - witnessed on colemak HOT 7
- Feature request: support platform-specific IPC which has greater convenience than TCP
- Feature request: Auto Mouse Keys layer HOT 2
- Feature request: support BSD HOT 5
- Unable to send key input due to key having not been physically released yet. HOT 3
- Bug: Release 1.6.1 macos_x86_64 executable isn't what it says. HOT 6
- Feature request: Show keystroke or can let other app know the real key is stroked. HOT 2
- Feature request: Can we have a more flexible unmod? HOT 1
- See if windows shift workaround can be compiled out for winiov2 HOT 1
- Bug: kanata does not work properly with listary HOT 3
- `release-key` releases both sides of a mod and not just one, e.g. `lctl` and `rctl` or `lmet` and `rmet` HOT 7
- Feature request: Compile-time conditional mappings HOT 1
- chordsv2 activation does not trigger early interruption of `tap-hold-press|release` HOT 9
- make macro-release-cancel also cancel virtual keys HOT 1
- Bug: switch's layer logic not recognized HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kanata.