You should look into some tools and accommodations to continue working. I can give a list of examples.
Use "Dragon naturally speaking" so you can use voice to text instead of having to type as much. Also look into other voice control and voice to text applications, but I think atm dragon is the most accurate.
Use a text expansion application like http://www.autotextexpander.com/, https://www.autohotkey.com/ or https://github.com/autokey/autokey applications like those can take short abbreviations and expand them into larger pieces of text. (like ;dat -> Nov. 30th, 2018, or ;knownissue2 -> <3 paragraphs about issue>) They can also automate filling in forms, clicking links and all sorts of stuff. The more you automate tasks that you repeat constantly the more you will save your wrists, and also speed up your workflow.
Ergonomic keyboards and mice. If possible try to not use the mouse too often and stick to keyboard shortcuts and voice commands. Get a keyboard that places your hands sideways so your wrists can relax. You might have to try out a few different ones.
Talk to your boss about taking on different tasks that don't involve as much constant typing. Maybe you could do some mentoring, editing of other people's writing, making phone calls, etc. If they are able to change your role some so you aren't typing constantly it will help.
Just as an FYI, RSI by itself is not going to get you any disability benefits. You will be told to get a different job that doesn't involve typing. You could do sales in an electronics store, drive a truck, etc. So there are other forms of work you would be able to do.
>Unfortunately, I haven't yet found a Linux alternative that has quite the same power and ease of use as Windows with AutoHotkey.
https://github.com/autokey/autokey
>But even beyond that, MS Office is pretty strong with it's automation, not sure that LibreOffice has quite that power.
So you make a little script using autokey, to send the keypress you want.
script is tiny, something like..
#Enter script code keyboard.send_keys("<up>")
Bind it to what key you want, and save.
https://github.com/autokey/autokey/wiki/Key-Combinations
If you want 5 Left arrows...
#Enter script code keyboard.send_keys("<left>") keyboard.send_keys("<left>") keyboard.send_keys("<left>") keyboard.send_keys("<left>") keyboard.send_keys("<left>")
I think I figured out a solution. The code I found online works at activating auto key.
I just need to figure out how to make a different function run when I release the button.
So far I have this code, but it only presses L, not K.
Another problem is that it presses the keys whenever I click any mouse button. It only prints btn9
when I click button 9. Maybe I could just detect when it prints btn9
?
Maybe I could use pydirectinput, but it'd be the same basic concept, right?
Thanks again for helping!
> Are you only using it for text input macros or for more stuff?
Nothing deeper at the time. I haven't devoted much time into learning any advanced use since its not clear if the program will be ported to Wayland.
If you are using X11 keyboard layouts would be a good way to go about this. AFAIK you can define hotkeys to switch between keyboard layouts, although it might be better to write a shell script which does this: > Layout switch -> Start game -> Wait for game to close -> Switch back to default layout
You might also want to take a look at the Keyboard Layout Files Creator.
There also is an alternative to Autohotkey, which is called Autokey (installation for various distributions explained in the readme). Understandably there is not as much documentation and help around the internet for it, but instead of AHK's weird scripting language it just uses Python, so we got that going for us, which is nice.
I don't really know anything about Autokey. The version that you have seems pretty out of date. Maybe you could update it? https://github.com/autokey/autokey
If your system came with python 2 preinstalled then it's almost certainly impossible to remove it. Changing python
so that it directs to python 3 is very likely to break something. Don't do either of those things.
There's a few. https://github.com/phil294/AHK_X11 https://github.com/autokey/autokey https://www.autohotkey.com/boards/viewtopic.php?f=80&t=77248
I can't speak to the efficacy of how well they work since I've never used them myself, but I hope this is helpful
https://github.com/autokey/autokey
use xdotool to get the focused window name. From there you just have to make a simple if-statement for your sxhkd-binds to only trigger if the focused window's name contains certain phrases.
For Linux have a look at AutoKey.
That said if you're new to mechanical keyboards, don't jump straight into the tiny keyboards. Go for Tenkeyless (TKL) and figure out what works for you before moving on to something else. For most people, say, 80%, TKL will be good enough.
Also obligatory... /r/mechanicalkeyboards
We don't really have a tutorial, but there are lots of examples and some articles on our wiki https://github.com/autokey/autokey/wiki
You can also ask questions in our support forum https://groups.google.com/forum/#!forum/autokey-users
Just to be clear, I am right clicking on the AutoKey icon in the panel. I am on KDE, using autokey-qt, but the GTK version should be the same with this feature. (I also have widgets locked. That's a KDE thing about not having the desktop editable.)
I don't have any idea how you could have installed it wrong and still have it working as much as it appears to be.
There is no reason to think that installing 0.96.0 would affect this.
There are two things you can do. One is to file an issue on https://github.com/autokey/autokey/issues
The other is to install autokey-qt and see if that front end works any better for you. (Both front ends can be installed without any conflicts. You have choose which one to run at any given time.) If you don't have any other KDE stuff installed, installing autokey-qt will pull in a bunch of kDE libraries, but they should be tagged as automatic, so if you uninstall autokey-qt later you should be able to autoremove them all again.
Whenever AutoKey appears to be misbehaving and staring at your code doesn't reveal the issue, you can run a trace to see things from its point of view. Our Problem Reporting Guide shows how to do this. https://github.com/autokey/autokey-python2/wiki/Problem-Reporting-Guide .
There isn't any overall troubleshooting guide.
As for the folder, it makes sense to me to keep phrases and scripts in separate folders and if you have a lot of either, then breaking them up by function into smaller groups may help.
Take a look at our wiki. There are a number of examples there. https://github.com/autokey/autokey/wiki
On the really simple end, I have a one line script that types the contents of the clipboard. It comes in handy on some banking websites that don't allow me to copy and paste passwords from my password manager.
On the more complicated end, I have two scripts that automate two different Print To File dialogs so they work nicely with my personal print queue application. One of these is in the wiki.
I'm not sure what's going on here, but it definitely looks weird. It needs to be filed as an issue so the developers will look at it. https://github.com/autokey/autokey/issues
AutoKey's script editors are probably the weakest features of the program.
That being said, the GTK front end for AutoKey 0.96.0 allows you to change editor themes. This probably won't fix anything, but the right theme might make it easier for you to see what you're doing.
Since AutoKey scripts are just text files of Python code, I almost always use an external editor (kate in my case) to edit them. AutoKey will usually see the changes right away and 0.96.0 is even better at noticing changes to files it cares about. If it doesn't, then quitting and restarting AutoKey always works.
If you haven't visited us in a while, our wiki has grown significantly in the last year or two and has lots of example scripts as well as a number of useful articles.
Can't guarantee it works well, but I think there are other similar tools in case not.
I used to use Autokey for one or two things that I couldn't get to work otherwise, but I don't remember if it can be configured per application.
I found those codes too. Interesting reads:
https://askubuntu.com/questions/12766/adjust-volume-via-commandline-so-that-volume-notify-pops-up
https://github.com/autokey/autokey/issues/127
Indeed xdotool key XF86AudioRaiseVolume
does work on the command line and does show the volume indicator! But sadly this command doesn't work properly in Autokey... As the second link shows, you have to add a delay before the command is actually performed by Autokey and the end result is very laggy!
But now I do have all the information I need. I know it is possible to display the volume indicator. I simply need to find how to integrate the commands in my tools.
Thanks again!
For text replacement I use autokey in a regular basis and works very well.
https://github.com/autokey/autokey
I also miss spotlight and but I was told to check recoll or docfetcher. I didn't test any of them myself but in the screenshots both seem a bit old-fashioned or less streamlined than spotlight. Worth a try nevertheless.
Not 100% sure how to do that, even with Keyboard Shortcut settings or editing certain files and changing <Super>Slash to <Super><Super> etc. Only easy way I know of editing your keys like that is by using AutoKey, if you're that desperate ofcourse lol.
6 years ago...
Well, best advice I can give you is that google is your friend. Plenty of articles like https://www.makeuseof.com/use-autokey-to-automate-repetitive-tasks-on-linux/ and the wiki https://github.com/autokey/autokey/wiki/Beginners-Guide
In 15.3 run sudo zypper in autokey
. I'm not aware of other versions but I'm on tumbleweed so can't easily check right now.
>I can normally enter Unicode with Ctrl+shift+u then the number
Tried that on my system (Kubuntu 21.04, KDE 21.08.2) and that doesn’t even work in Kate for me.
Some research indicated that this is a feature of Gnome, not KDE, but that post is already a bit old.
Try binding xdotool
to a keyboard combination for each character you want to type. Otherwise no idea, honestly.
Or try autokey and set up phrases or hotkeys to enter your symbols. (If you go that route, use the clipboard pasting method, because the built-in keyboard emulation doesn’t handle unicode keys well.) You can even bind those to the Factorio window, so that the trigger only inserts the symbol in Factorio and not in other applications.
Thx for your answer!!
This is the program: https://github.com/autokey/autokey
What I want is to press ALT+W and get the arrow up back. Or press ALT + A and it returns me left arrow.
I really like clipboard-indicator, and recently contributed some review time & code to get (jpg/png) images working in it. What if you use something else to change the keys? For example [autokey](https://github.com/autokey/autokey) ?
There's a keyboard setting utility within the settings which allows you to set shortcuts / key bindings.
As an alternative to autohotkey there's Auto key.
However on Linux you do tasks automation by writing shell scripts, maybe using xdotool, which helps in managing windows and mouse.
We are gradually improving our wiki with examples and how-to pages. Feedback always welcome.
I write a pile of bash and love it (when I'm not stuck trying to escape things from expanding when I don't want them to!)
A long time ago, that was broken. I'm asking on Gitter about its current status.
It's not very difficult to write your own script if you're just doing simple deterministic actions.
All you need is a bunch of keyboard.send_keys("your text")
commands one after the other with an occasional time.sleep(0.1)
thrown in between them to slow things down so the receiving application can keep up.
When you need special keys, we have a whole list that you can use here.
If you need to use any non-English-US characters, then it gets a bit more interesting, but that shouldn't apply here.
If you want to, you can get the date from within Python without starting another process.
I think you can also append the space.
keyboard.send_keys(output + " ")
should work.
Sorry for not replying sooner. I'm everywhere else, but I just got to our reddit group.
I don't believe that AutoKey knows anything about how long you are pressing a key.
The only thing I can think of would be going back to ancient days before arrow keys existed. Then, people used a section of the keyboard for movement. Something like Super+E for up, Super+X for down, Super+S for left and Super+D for right. The physical location of the keys helps you remember which is which.
You should be able to implement this all with phrases. Just make the body of the phrase, the special token for the key you want. You can find all of them at https://github.com/autokey/autokey/wiki/Special-Keys .
If, for some reason, that doesn't work, you can write a one line script for each of these:
keyboard.send_keys("<left>")
...
You need to make sure whatever hotkey you assign to any phrase or script isn't already in use for something else. That's why I suggested Super instead of Ctrl.
No, but please share some screen shots and your files so we can help you better. For even better help go-to our wiki at https://GitHub.com/autokey/autokey/wiki, I recommend going to the discussions section and joining our hitter which is super active.
Please share your script so I can see if there is another way to do it.
Explore the https://GitHub.com/autokey/autokey/wiki for deep details and links to our official presence on gutter.im and unofficial on discord.
Inserting text snippets is one capability of <em>AutoKey</em>, which, according to its GitHub page, might work on Wayland.
>I made a custom keyboard shortcut under Settings > Keyboard shortcuts
Those are for invoking commands. So binding an appropriate invocation of xte or xdotool should work - on X11 that is, not Wayland.
> Are you sure that Autokey isn't capable, as "Autohotkey" certainly is on Windows?
Here's someone asking pretty much the same question you are on the AutoKey Github (just a couple of days ago in fact), and the recommended solution posted is just a toggle loop: https://github.com/autokey/autokey/issues/504
Here is my script from autokey. I copy the name of the branch I want to check out and then enter the macro in my terminal. It clones it from its url, goes into the cloned folder, checksout the branch and install the requirements.
content = clipboard.get_clipboard()
text += ' && virtualenv venv --python=python3.8' text += ' && source venv/bin/activate' text += ' && git clone URL_HERE' text += ' && cd REPONAME' text += ' && git checkout -b {branch_name}' text += ' && pip install -r requirements.txt'
keyboard.send_keys(text.format(new_dir=branch_name))
My usual workflow is to run that and then open the folder in pycharm. PyCharm will turn that into a project and (usually) select the venv as the interpreter for it.
> When the case with Wayland is that it's impossible to port a tool like <code>autokey</code>; you need to write it to the compositor itself. This results in disjoint functionality available in different compositors, with complete non-portability of such features.
No, it's possible to define a new Wayland protocol to provide this functionality. This way programs can work across compositors using the same code.
While you are correct about XGrabDevice(Key)
, it is mostly because there's not enough interest to fix it. It's completely supported to load a security extension to Xorg to allow that functionality to only certain apps, but I guess nobody truly cares :/.
Also, funny that you should mention hacks and workarounds with Xorg.. When the case with Wayland is that it's impossible to port a tool like <code>autokey</code>; you need to write it to the compositor itself. This results in disjoint functionality available in different compositors, with complete non-portability of such features. Granted, even Xorg needed to support XGrabDeviceKey
, but I think the beauty is that I believe autokey
was created because XGrabDeviceKey
was there, not vice versa.
Window manager/compositor features were used in ways unforeseen, not that there's one feature per one application. To me it seems Wayland doesn't even want features where all the possible use cases aren't known up-front. I haven't followed but I surely hope someone out there is trying to make a compositor-portable plugin-system for Wayland :/.
As the development of Xorg is—I assume—petering down, I would hope Wayland would rise to the occasion to satisfy not only all use cases of Xorg but also more than what was possible before, and in a more safe manner. But I'm not just seeing it.
Another way is to use a text substitution utility like AutoKey or texpander. I use AutoKey, and the shortcut I use for ñ is n==.
https://github.com/autokey/autokey
https://github.com/leehblue/texpander
There's a (keyboard) automation tool written in Python here:
https://github.com/autokey/autokey
Maybe you can use that thing as a base somehow. It cannot do mouse gestures, it's only for keyboard from what I can gather.
This "Autokey" project is a sort of library to help with writing Python scripts that send key presses to X programs, plus it has a UI to organize keybinds and scripts. Go into the "wiki" area on that github page for more explanations:
https://github.com/autokey/autokey/wiki
The whole program seems to be written in Python, and the scripts you are supposed to write as a user are also Python.
>We recently got a new laptop A third solution, and the only one I would consider if it were an option, would be to return the laptop. It sounds as if there is a problem with the keyboard itself, and I would never accept that from a new piece of equipment. It is sure to get worse over time. If replacing the laptop is not possible, I would consider replacing the keyboard itself.
I think a software solution is going to get ugly very quickly. AutoKey is a Linux alternative to AutoHotKey; I primarily use it for key substitution and to execute simple scripts, and it has worked well for me. A combination of xmodmap and sxhkd or xbindkeys might another solution, but I have little experience with xmodmap and no experience with either sxhkd or xbindkeys.
The version in the current repos is not the most recent, but it works fine for me. More information at https://github.com/autokey/autokey.
Well, given their description, I cite:
" AutoKey, a desktop automation utility for Linux and X11 "
I guess not? :-) Because what he's working on is a Win-system. (for now)
I wrote a pretty sophisticated AHK bot a while back that I got a lot of 99s in being a color bot, but pretty much only I can use it since it's so complex. I can give it to you, but it was so complex I would just recommend getting into scripting one yourself.
If you're also good at Java, you can decompile most servers, figure out the packets, and write a full bot. Lastly, if it's a 317 server and non-obfuscated, you can run a full fledged bot with Parabot as well.
If you're on Linux, I recommend Autokey, it's about as powerful as AHK and can also record actions.
I also abuse Ghostmouse a lot. Using the free version, record a script, save it, then open the file in notepad and copy-paste it 100,000 times to make it last longer.
if the program relies on the system tray support for it to function, that may be a problem.
I can't get several programs to reliabley use the system tray even when using a gnome extension to enable the tray.
it might work better if you installed using pip, to get the latest version.
it seems it was last updated 2 months ago, so it's not a dead project.
https://github.com/autokey/autokey/blob/master/README.rst#install-via-pip3
Autokey has a lot of overlap with AutoHotKey, but it's different. It does some things AHK doesn't, and doesn't do other things AHK does. If you're familiar with writing your own scripts it probably will do what you need.
It's available in the Ubuntu package archives via apt / Software Center.
The wiki of Autokey on this GitHub page: https://github.com/autokey/autokey/blob/master/README.rst seems to work.
There's also xdotool, i don't know if it can listen for hotkeys/triggers, but some desktop environments have built on support for custom hotkeys (i know that gnome and KDE do).
I wondered, but no. :)
Does AutoKey work with scripts which were written with the popular AutoHotKey Windows application?
"No. AutoKey's built-in Python scripting is arguably much more powerful than the AHK language and makes it possible to do many of the things that AutoHotKey? scripts can do on Windows, in addition to some things AHK doesn't support."
>python3-dbus-python-devel
Thanks! This allowed me to install AutoKey using pip. Unfortunately, I now run into the same "Could not find the program 'autokey-qt'" error reported by this Tumbleweed user.
The only report I've sound of someone getting AutoKey working on Leap 15 was by a user who upgraded to the "latest" KDE... this seems like a bad idea(?) as I chose Leap over Tumbleweed for stability.
https://github.com/autokey/autokey. There are multiple ways to install it, and they're detailed in the README.
I set the normal-window flag to true in rofi to no effect. (and I'm running rofi version 1.5.1)
I already tried to use Pyperclip, this is more or less a workaround: https://github.com/autokey/autokey/issues/120
Although I don't use native Python, but Autokey.
Which actually should do exactly, what I try do to here, but the Problem is, that Autokey always crashed every like 10 times when I inserted via Keyboard or Clipboard.
Should I verify if theres something wrong with my Python installation? How do I do that?
Edit: I jsut saw someone answered on that Github Issue and recommended clipboard.fill_clipboard(contents), I wil ltry that tomorrow.
This won't work for capslock without some extra work with xmodmap, xcape etc - "Caps lock key is really out of autokey's scope"
I used <capslock> as per the special keys, it doesn't work. Also if you click 'press to set' in autokey's 'set hotkey' dialog, capslock doesn't register, at least in ubuntu 18.04.
You should try Autokey.
sudo apt install autokey-gtk
It has a semi-decent GUI and configuring keyboard shortcuts on it is relatively straightforward.
EDIT: Nevermind. I guess it can't handle remapping the escape key.
Oops turn out I use a i3 specific (with xbindkeys) script to achieve that. Sorry for wasting you time.
You might want to look into autokey https://github.com/autokey/autokey. You can use it remap keys for specific windows I believe. It also have front ends (autokey-gtk, autokey-qt. Script is in python so you could have complex logic to mimics the vim keybindings. But note that it only works with X.
If you're willing to learn something new, look at AutoKey. It's a flexible hotkey and desktop automation program. I have hotkeys set up to move active windows to different areas and sizes depending on my needs. It has applications far exceeding just window management and it's worth taking the time to learn.
The thing is I don't prefer dedicated Home/End/Page Up/Page Down keys. On a standard ISO 105 keyboard (aswell as an ANSI 104 keyboard) both the arrow keys and the Insert/Delete/Home/End/Page Up/Page Down keys are a bit too far away to me.
On a compact keyboard like this the arrow keys are right below the right shift key. That is the primary reason I like the arrow keys to begin with - they are fairly close to the home row.
Using more than two modifiers to achieve Home/End/Page Up/Page Down functionality using the arrow keys would defeat the benefit of using your thumb to decide between word or line jumping (Cmd or Opt), and your pinky to decide wether or not to select the text (Shift).
I know my use case might be a bit niche, especially in terms of getting the same layout on Linux. But that is why I was here asking for help. :-)
My initial thought was it would be a bit too hacky to get it work the way it does on macOS. AutoKey would have been a perfect solution, sadly it's not maintained anymore.