While you're here, please consider supporting GamingOnLinux on:
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
- Proton Experimental brings lots of bug fixes, controller support in a few launchers
- RimWorld - Anomaly expansion and big free update out now
- GE-Proton 9-3 and 9-4 released with a new option to help with modded games
- Palworld is getting a major content update this Summer, plus a PvP Arena mode later
- PathBlasters is like a competitive vertical-scrolling Bomberman
- > See more over 30 days here
-
Former Nouveau driver lead joins NVIDIA and sent a mass…
- pilk -
Pick up some classics in the Good Old Games sale at GOG…
- Linux_Rocks -
Check out the demo for Just Crow Things, a cute sandbox…
- Linux_Rocks -
Former Nouveau driver lead joins NVIDIA and sent a mass…
- ShabbyX -
RimWorld - Anomaly expansion and big free update out no…
- Ilya - > See more comments
Latest Forum Posts
- What sorta display and audio setup do you folks got?
- pleasereadthemanual - Weekend Players' Club 4/12/2024
- Pengling - The Evercade Outpost!
- StoneColdSpider - Deus Ex GOTY Weird Resolution Issue on Steam But Not GOG…
- Vortex_Acherontic - Colin McRae Rally 3 at 22 years young looking great!
- Pengling - See more posts
I want to change some buttons for one game (settler 7). The buttons to rotate the camera are "end" and "del". It so uncomfortable so i want to change the to "q" and "e"
To do this i found the programm " autokey".
I want to make a script. But its just not working. Is there any website, to learn scripting for autokey?
Or maybe an even easier solution?
Last edited by Spirimint on 15 January 2020 at 10:59 am UTC
View PC info
Chances are your distribution or desktop environment has a GUI tool for this somewhere, but if not, you could write a pretty simple script and have Autokey run it when you use your chosen shortcut. You can search for "key swapping" or "key remapping" and find plenty of tutorials. First, you want to run
xmodmap -pk
to figure out the right codes for your keys. You’re looking for the number code (KeyCode Value) and the name of the key (KeySym Name). Then, usingxmodmap -e "keycode 52 = e" && xmodmap -e "keycode 26 = z"
for example will switch the values for E (normally 26 on my keyboard) and Z (normally 52). Making Autokey run that for you would look like this:if store.get_value("runs") == 1:
output = system.exec_command('xmodmap -e "keycode 52 = e" && xmodmap -e "keycode 26 = z"')
store.set_value("runs", 0)
else:
output = system.exec_command('xmodmap -e "keycode 52 = z" && xmodmap -e "keycode 26 = e"')
store.set_value("runs", 1)
The condition makes it so that each time you execute that shortcut, it will alternate states, so you could run it once before you play, then a second time when you’re done to return to normal. I believe the changes would revert anyway at the end of your user session if you forget to turn it off.
Hope that helps!
Last edited by Salvatos on 15 January 2020 at 5:20 pm UTC
xmodmap -e "keycode 26 = Delete"
xmodmap -e "keycode 115 = e"
xmodmap -e "keycode 24 = End"
xmodmap -e "keycode 119 = q"
and after i reboot my Os everything is normal again!!!
This is sooo good!
View PC info
im not in favor of rebooting to revert settings
perhaps create another script to revert so you dont need to reboot.
or in the same script, run the program in the middle and after end of the program run the second part of the script to revert
so it becomes an all in one experience (one step process)