Comments (4)
Correct me if I'm wrong, but if you go through the kernel by using uinput then you wouldn't need to worry about X11/Wayland/etc...?
EDIT: there's a library for this: https://github.com/meh/rust-uinput
EDIT 2: Apparently there are issues with multiuser systems and keylogger concerns? (this is what a good friend of mine has said)
However, wayland doesn't give a specific way to do this, so you have to use uinput if you want to do it with wayland, it seems.
from inputbot.
@KitLing yes I think you are right. The best path might be to use uinput for generating events and using evdev for reading events to create hotkeys. Evdev has rust bindings as well https://github.com/myfreeweb/evdev .
from inputbot.
Hotkeys should now work on Wayland since I made InputBot use Libinput for event listening. I wanted to use the uinput crate for simulating events but the crate fails to build.
from inputbot.
Most functions of InputBot no longer rely on X11 APIs and should work on Wayland.
The parts left to port are the is_pressed()
function for keys and the move_abs()
function for the mouse cursor.
The is_pressed
function can be ported by keeping track of all key states internally and simply returning their state instead of using XQueryKeymap
.
from inputbot.
Related Issues (20)
- block_bind conflicts with is_pressed() HOT 3
- Doesn't detect pressing Alt's HOT 1
- Can't type the text HOT 2
- Is this project currently production-ready for both MacOS and Windows platforms?
- I just wanted to make a macro but I'm getting this error in runtime: ... HOT 2
- This crate does not work on different keyboard language layouts
- Can I simulate WIN key press on windows HOT 1
- Publish latest crate version HOT 3
- cannot transmute_copy if Dst is larger than Src on windows
- KeySequence send doesn't work properly, It didn't print the whole world HOT 3
- graceful way to end `inputbot::handle_input_events` HOT 3
- Add Event for Mouse Move
- Method to stop listening to inputs HOT 2
- build on Linux is broken HOT 2
- more efficient BUTTON_STATES HOT 1
- Does not support NumpadDecimal NumpadAdd, NumpadSubtract NumpadMultiply, NumpadDivide response?
- Static state is required? HOT 1
- `OtherKey` not working
- Handling of KeyUp events
- Unable to send KeySequence from a blockable bind. HOT 3
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 inputbot.