Autohotkey-like program that works with wayland?

Anybody know of an autohotkey-like program that works with wayland?

All i’m trying to do is have a script which runs in the backround that when Left Mouse Button is held, it repeatedly sends Left Mouse Button at set intervals.

Another one would hold Left Mouse Button for a set interval, then release, on repeat when Left Mouse Button is held.

Please always post your garuda-inxi when you open a topic in the Issues & Assistance category.

I am not aware of any alternative to AHK that works on Wayland, at least not in terms of AHK’s range of functions, such as mouse clicks.

Is there a specific reason why you don’t just use x11 instead of Wayland?

2 Likes

I am still using X11 for its wider compatibility with older software, but mostly because of all the accessibility options that are available with X11.

Unfortunately, KDE has announced that support for X11 will be ending in a little over a year. So, really the clock is ticking down rather quickly on X11. That is, unless you intend to switch to one of the as yet unproven forks/modified versions of X11 in development.

I really feel KDE has jumped the gun here, as KDE has switched to Wayland long before they have even begun coding accessibility features into the newer iterations of KDE.

I’ve used KDE for 20 years, and I did make a financial contribution to KDE this December. Unfortunately, I’m not sure how much longer that will continue if they don’t start responding to the concerns of those that require desktop accessibility features. They’ve sped up their timetable to fully deprecate X11, while having not even started development on essential accessibility features that are lacking under Wayland.

I think KDE has really dropped the ball when it comes to supporting their user base that depends on those accessibility features. I’ve used KDE for so long, I can’t imagine switching to another desktop, but that may be what I have to do if KDE doesn’t start improving support for those with impairments. :-1:

5 Likes

Just tends to be a better experience for me on my hardware, and as tbg said KDE is dropping support soon so i’d rather familiarize myself with the tools there.

that said, that sucks. Was hoping for some alternatives.

Edit: in some research i’ve noticed there’s something called dotool and ydotool that might work? however i’m not versed enough to make scripts myself so it doesn’t help me that much, unless someone smart enough would be so kind as to poke around and make some.

dotool and ydotool are compatible with Wayland, and mouse commands should™ also function. But I don’t know if mouse clicks will work the way you want them to. You should simply test it out.

Perhaps now is the right time to learn it? :slightly_smiling_face:

3 Likes

On the topic of wayland and accessibility. One of the biggest problems is that Wayland has no full featured Onscreen Keyboard (OSK) available. The ones that are available are so basic that they are completely useless for day to day computing needs for those with disabilities.

As far as I know this can not even be implemented currently under Wayland because of the security features deliberately designed into it. KDE has stated they intend to rectify this, but as yet I don’t believe they have even begun work on the framework required to fix this serious omission.

Correct.

@Zeron
Don’t ask what Garuda can do for you — ask what you can do for Garuda.
:slight_smile:

3 Likes

I ended up finding a python script that does most of what i need(toggles autofire left click,) it requires Pynputinstalled in order to work.

I unfortunately don’t have the time to learn to make my own scripts at present, but this works as of python 3.13.11 for any future googlers out there.

Just run it in your terminal as a script. Set the start_stop_key (toggles it on and off) and the exit_key(exits script) to your preference. Delay and button pressed are also customizable.

#!/usr/bin/env python3

import time
import threading
from pynput.mouse import Button, Controller
from pynput.keyboard import Listener, KeyCode


delay = 0.100
button = Button.left
start_stop_key = KeyCode(char='v')
exit_key = KeyCode(char=';')


class ClickMouse(threading.Thread):
    def __init__(self, delay, button):
        super(ClickMouse, self).__init__()
        self.delay = delay
        self.button = button
        self.running = False
        self.program_running = True

    def start_clicking(self):
        self.running = True

    def stop_clicking(self):
        self.running = False

    def exit(self):
        self.stop_clicking()
        self.program_running = False

    def run(self):
        while self.program_running:
            while self.running:
                mouse.click(self.button)
                time.sleep(self.delay)
            time.sleep(0.1)


mouse = Controller()
click_thread = ClickMouse(delay, button)
click_thread.start()


def on_press(key):
    if key == start_stop_key:
        if click_thread.running:
            click_thread.stop_clicking()
        else:
            click_thread.start_clicking()
    elif key == exit_key:
        click_thread.exit()
        listener.stop()


with Listener(on_press=on_press) as listener:
    listener.join()

2 Likes

Well, if this satisfies your needs, then you should probably mark your last post as the solution.

Glad you found something that worked for you @Zeron

1 Like

I think the only okay one is on the steam deck at this point. Im hoping it becomes the standard as valve takes over.

1 Like

I’m not a gamer @elite, so I’m not familiar with that. Is it a fully featured keyboard that includes the the function keys and the other keys that the better OSK’s such as Onboard come with.

I don’t think they have added that but i think they let you make like a menu, radial or something and you can map it to any key on the keyboard but yeah, i cant say its that good but it could be made that good if someone forked it. It would be adding a row or a layer.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.