this post was submitted on 14 Apr 2025
31 points (100.0% liked)

Linux Gaming

18454 readers
693 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

No memes/shitposts/low-effort posts, please.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 2 years ago
MODERATORS
 

Background/Problem Statement:

I've recently returned to playing Foxhole, an MMO war game that involves lots of repetitive clicking, e.g., Shift+clicking ten times to gather supplies at mines, or clicking-and-holding for minutes at a time to construct buildings and vehicles. I'm looking for the easiest way to do on Linux what AutoHotkey does for Windows users.

Potential Solutions:

I'm using Bazzite Linux, Gnome, Wayland. I know how to set custom shortcuts in Gnome settings (Settings > Keyboard > Keyboard Shortcuts). The thing is I don't want these custom shortcuts to be always active, so I'm considering writing a pair of executable scripts that would enable me to quickly & easily start listening for the macro shortcuts at the beginning of my gaming session and stop listening when I'm done gaming.

So my workflow would be as follows:

  1. At the beginning of my gaming session, I'll double click the first script to initiate something like ydotoold. This script will also contain two or three lines of gsettings set commands to create custom keyboard shortcuts, which trigger ydotool commands to emulate mouse clicks. For Windows users, the AHK version of this would be simply double clicking to start the AHK script.
  2. At the end of my gaming session, since I don't want to leave these custom shortcuts out there when I'm not playing, I will double click the second script, which stops ydotoold and removes the two or three custom keyboard shortcuts for the mouse clicking macros. This is where Windows users simply close AHK.

While I'm comfortable with the command line, this approach of managing Gnome settings through the command line would be new territory for me, and it will require a decent amount of trial and error. Before I proceed, I’d like to know if there’s a more straightforward way to achieve this.

Has anyone else accomplished something similar, and if so, would you be kind enough to share how you did it? Thanks!

EDIT: Adding links to some documentation I've found in my research so far. I haven't set anything up yet, but I figure this might help others trying to do something similar.

you are viewing a single comment's thread
view the rest of the comments
[–] yo_scottie_oh@lemmy.ml 1 points 4 weeks ago

qmk

I had to look that up to remember what it was. I don't think my keyboard is supported, nonetheless here's the website in case anyone else out there is interested in learning more.