Skip to content

Native mode #25

Open
Open

Description

@robiot

A mode that uses uinput to send mouse events. This will work in wayland, but probably require root.

Activity

  1. robiot commented on Jun 2, 2022

    @robiot
    OwnerAuthor

    Maybe have a daemon running that handles all virtual input stuff?

  2. robiot commented on Jun 7, 2022

    @robiot
    OwnerAuthor

    This would be very complicated since almost everything builds on X's apis. :\

  3. nm004 commented on Jun 21, 2022

    @nm004

    Hi @robiot. Thank you for your great work 👍

    I have news for you.

    There are two wayland protocol extensions to get the state of input device (zwlr_virtual_pointer_v1, org_kde_kwin_fake_input), but they are compositor specific protocols (wlroots and KDE). There is another emulated input library called libei. But libei is still WIP, and needs an emulated input sever in wayland compositor. Currently, only GNOME has implemented it, but the commit has not yet be merged (https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1436).

    Uinput is another option, though it requires root permission (more precisely, read/write permissions for /dev/uinput and read permission for /dev/input/event*). Unfortunately, it has ~30hz rate limit for clicking. It is becuase libinput manages inputs and it looks like dealing with button bouncing.

    Working virtual input in wayland is still a long way to go...

  4. robiot commented on Jun 22, 2022

    @robiot
    OwnerAuthor

    Hi @robiot. Thank you for your great work +1

    I have news for you.

    There are two wayland protocol extensions to get input devices' state (zwlr_virtual_pointer_v1, org_kde_kwin_fake_input), but they are compositor specific protocols (wlroots and KDE). There is an another emulated input library called libei. But libei is still WIP, and needs an emulated input sever in wayland compositor. Currently, only GNOME has implemented it, but the commit is still not be merged (https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1436).

    I wrote a auto click program using uinput (https://gist.github.com/nm004/e34b40ef3c2ab3ab8ec3eab2376ca7ab). It requires root, of course (set read/write permission for /dev/uinput and set read permission for /dev/input/event*). My program works well for my needs, but it has ~30hz rate limit for clicking. It is becuase, in wayland, (mostly) libinput manages inputs and it deal with button bouncing (I'm not 100% sure, sorry). My program simulates clicking with an uinput device, so the click events are handled by libinput.

    Working virtual input in wayland is still a long way to go...

    Yep, it's sad that there isn't a nice way to do it, like you can in X. I looked into libei and it seemed kinda nice. But XClicker don't just send clicks. It also has the hotkey listener, mouse position chooser and hotkey chooser which all use X's APIs.

    I think the easiest thing to do here, would be to create a daemon, xclickerd or something, that provides the functionality to simulate mouse clicks and get key/mouse presses.

  5. twisted-nematic57 commented on Dec 22, 2022

    @twisted-nematic57

    I need this. GDM is being stubborn and refuses to boot into Xorg mode.

  6. wolf-yuan-6115 commented on Jan 3, 2023

    @wolf-yuan-6115

    Screencast from 2023-01-03 18-46-46.webm
    Hmm Xclicker on Wayland is working for me

  7. KotoWhiskas commented on Mar 21, 2023

    @KotoWhiskas

    Screencast from 2023-01-03 18-46-46.webm Hmm Xclicker on Wayland is working for me

    Because both XClicker and Brave use xwayland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions