Looking for Up-to-Date AutoHotkey Alternatives for Linux

0
121
Asked By CoolCactus123 On

I'm searching for a modern AutoHotkey alternative that works on Linux. I stumbled upon AHK_X11, but it seems outdated, and it looks like AutoKey isn't being maintained anymore. I currently have an AutoHotkey script on Windows that disables the A and D keypresses to enhance my gameplay (specifically for bhop), and I'm struggling to find something similar for Linux. I'd appreciate any guidance on alternatives or suggestions on how to adapt my script for Linux. Here's the original script I'm using for reference:

#SingleInstance
SendMode Input

; Null Movement Script
; This updates the A and D keys so that only one is held down at a time
; This avoids the situation where game engines treat holding both strafe keys as not moving
; Instead holding both strafe keys will cause you to move in the direction of the last one pressed

a_held := 0 ; Variable that stores the actual keyboard state of the a key
d_held := 0 ; Variable that stores the actual keyboard state of the d key
a_scrip := 0 ; Variable that stores the state of the a key output from the script
d_scrip := 0 ; Variable that stores the state of the d key output from the script

... [script continues]

5 Answers

Answered By HelpfulHannah99 On

There's actually a resources page in the Linux4noobs wiki that could help you find what you need. You might want to check out this search link for more info on key remapping or similar topics: [Linux4Noobs Search](https://www.reddit.com/r/linux4noobs/search?q=flair%3A'learning%2Fresearch'&sort=new&restrict_sr=on). Just a reminder from Smokey: Always back up your work, experiment in a VM, and understand your commands before hitting Enter!

Answered By AutoKeyFan84 On

Have you considered using AutoKey? It's available on GitHub and might suit your needs! Just make sure to check its documentation for any setup details.

Answered By TechieTurtle88 On

You should check out Jtroo's Kanata over on GitHub. I've been using it and it's quite flexible. I remapped my Caps Lock key to make it way more useful. Just keep in mind that it might take a bit of tinkering to get it just right, especially with double-tap bindings! Here's a sample config you can start with:
```
(defsrc
process-unmapped-keys yes
)

(deflayermap (base-layer)
a (multi a (release-key d))
d (multi d (release-key a))
)
```

CoolCactus123 -

That sounds promising! I appreciate the suggestion, thanks!

Answered By GamerGeek77 On

You might want to clarify whether you’re using X11 or Wayland when asking around, as it impacts input handling. For my Wayland setup, I use keyd for some remapping, but it's hard to say if it will work for your exact scenario. If you're uncertain about the setup, specifying it might yield better suggestions.

Answered By PythonNinja42 On

It might be easier to just learn Python! It has powerful libraries for managing HID devices and can definitely handle the same functionality you're looking for. Plus, it's more robust overall than trying to find a direct alternative.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.