I've just retired a trusty old keyboard which had separate macro keys which I would assign to commonly used email addresses and
other text - very handy.
Sadly, the shiny new keyboard has no such separate keys. Is there a way to map a key combo to a text string?
A bit of googling suggests xdotool and a custom shortcut might do the job, but surely there must be some straightforward way to do this? Any suggestions?
Yes absolutely, although atleast for me xdotool and custom shortcuts is the way to go.
Autokey gives you a bit more of a user friendly interface, but for the actual action you want to do in terms of a hotkey/macro - you will need some previous experience with scripting.
No matter what new tool i try out, i always return back to xdotool so i decided to just stick with it. Here's how i did it:
Navigate to your system settings
Keyboard
Custom keyboard shortcuts
Create a new one and give it a name
xdotool command to skip media: xdotool key XF86AudioNext
Cheers Jeff, glad to hear I had the right end of the stick, but... it doesn't seem to work:
Creating a custom shortcut, putting in the command: xdotool type "hello" and then assigning it to a key combo fails in every text input app (e.g. libreoffice) I've tried.
Entering the xdotool command in the terminal works fine.
Any suggestions?
meanwhile I'll try autokey next - blimey, how painful is this?! The old keyboard may be coming back at this rate.
I'm guessing this has to do with Xorg & Wayland — different types of display servers that exist in Linux — as xdotool seem to be only supported under Xorg.
Should you still be interested in trying it out, you can switch to Xorg at the login screen; click on the gear button at the lower right corner and select Zorin Desktop on Xorg: