Giter Club home page Giter Club logo

Comments (4)

kitlith avatar kitlith commented on September 1, 2024

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.

obv-mikhail avatar obv-mikhail commented on September 1, 2024

@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.

obv-mikhail avatar obv-mikhail commented on September 1, 2024

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.

obv-mikhail avatar obv-mikhail commented on September 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.