Setting up Autokey for german umlauts

169 views
Skip to first unread message

Hannibal King

unread,
Dec 14, 2021, 8:49:06 AM12/14/21
to autokey-users
Hello there,
I am switching from Windows 10 to Fedora and so far I really love it.

I am using a US-ANSI-Keyboard, therefore I wrote a small script for AHK:

Example: Alt + A sends the german "ä" via ASCII code

How do I translate this into Autokey? I am really lost and don't know how to solve that.

Can you guys help me?

Stephen Meech

unread,
Dec 14, 2021, 9:19:04 AM12/14/21
to autokey-users
In the Autokey Main Window, click [New]: Phrase or type <ctrl-n>.
Give it a name, e.g., “ä”
Replace “Enter phrase contents” in the right-hand pane, with “ä” (without the quotes).
In the pane below click [Set] on the Hotkey line, click [Press to set], type <a>, and select [Alt], then [OK].
Click [Save] and you should be good to go.

Little Girl

unread,
Dec 14, 2021, 9:32:30 AM12/14/21
to autokey-users
Here's an example of adding a German Umlaut A:
  1. Open the main window of AutoKey.
  2. Click the New button in the toolbar.
  3. Click Phrase in the drop-down menu that opens.
  4. Type in German Umlaut A as the name for the phrase.
  5. Click the OK button.
  6. Type ä into the phrase contents area (the text area on the right side of the screen).
  7. Click the Set button next to Hotkey: (None configured) at the bottom of the window.
  8. Click the Alt button in the little window that opens.
  9. Click the Press to set button in the same little window.
  10. Press the a key.
  11. Click the OK button.
  12. Close the main window of AutoKey.
Now, whenever you're in any window and press Alt+a, you'll get a lower-case Umlaut A (because that's what you typed into the contents of the phrase).

The problem will be that if you do upper-case and lower-case Umlaut A, then you'd need separate phrases for each.

My approach to this is that I made four phrases, one for the German sharp S and one each for the Umlaut A, Umlaut O, and Umlaut U. Then, instead of triggering them with a hotkey key combination as above, I trigger them with abbreviations (ss or ae or oe or ue). The advantage to the abbreviations is that you can match the case to the typed abbreviation, so if I type ae, I get ä, but if I type AE, I get Ä. As long as you're comfortable Americanizing your Umlauts by using them in combination with e, you can really fly when writing German. Also, if you ever have a word you'd like to type that should contain an ae instead of a German Umlaut A, press the Backspace key immediately after AutoKey does the conversion (in other words, type ae Backspace instead of just ae) and the change will be undone. Most of the time, I manage to do that, but you'll occasionally see an Umlaut sneaking its way into some of my text, because I didn't notice the conversion happening.

In case you're interested in doing it the way that I do, these are the steps I followed to set mine up, once again using the German Umlaut A as an example:
  1. Open the main window of AutoKey.
  2. Click the New button in the toolbar.
  3. Click Phrase in the drop-down menu that opens.
  4. Type in German Umlaut A as the name for the phrase.
  5. Click the OK button.
  6. Type ä into the phrase contents area (the text area on the right side of the screen).
  7. Click the Set button next to Abbreviations: (None configured) at the bottom of the window.
  8. Click the + Add button in the little window that opens up.
  9. Type ae into the box.
  10. Press the Enter key.
  11. Make sure the Remove typed abbreviation box is checked.
  12. Make sure the Match phrase case to typed abbreviation box is checked.
  13. Make sure the Ignore case of typed abbreviation box is checked.
  14. Make sure the Trigger when typed as part of a word box is checked.
  15. Make sure the Trigger immediately (don't require a trigger character) box is checked.
  16. Click the OK button.
  17. Close the main window of AutoKey.
Now, whenever AutoKey is running and you're in any window that accepts type, type your German normally and use ss for a sharp S and ae and oe and ue for the Umlauts and AutoKey will instantly make the changes for you.

One final note: These are not the only ways this can be done. You could create a script instead and use an if statement to detect what was typed and make the appropriate substitutions. I also have no doubt there are hundreds of other ways it could be done.

Have fun with it, and feel free to reach out if you run into any trouble.

Message has been deleted

Hannibal King

unread,
Dec 14, 2021, 11:55:08 AM12/14/21
to autokey-users
Hello there, thanks for your input! My problem is that Autokey absolutely does not register any key when I am trying to set a hotkey.
What am I doing wrong?

Johnny Rosenberg

unread,
Dec 14, 2021, 1:04:56 PM12/14/21
to autoke...@googlegroups.com
Some GNU/Linux-distributions have a very old version of AutoKey in their repositories, I don't know about Fedora since I don't use it myself, but the latest version is 0.95.10. If that's not what you are using, make sure it is.

On the other hand, you don't need AutoKey for this. YOu are using Linux, remember? 😁
You can just redefine your keyboard layout directly by manipulating the Evdev files. That's what I've done to get all kinds of characters on my (Swedish) keyboard.

If you don't want to do that, there are a few more options. One of them is to use the compose key. It's probably not set out of the box, but in your keyboard settings you can select which key is the Compose key. I use Caps Lock, since I find the Caps Lock function useless anyway, and mostly annoying when you hit it by mistake. With your Compose key active, you can easily compose (existing) characters with sensible key combinations. You usually first hit the Compose key, then you release it, hit another key, release that and finally hit a third key. Here are some examples:
Compose " u → ü (in my case: CapsLock " u → ü)
Compose " U → Ü
Compose " a → ä
Compose " A → Ä
Compose " o → ö
Compose " O → Ö
Compose c o → ǒ
Compose o c → ©
Compose " " → ¨
Compose - - - → — (em dash)
Compose - - . → – (en dash)
And so on. As you can see, sometimes you need three characters.
More information and a list of many possible combinations:
https://fsymbols.com/keyboard/linux/compose/

Then you can, of course, input the UNICODE code directly:
Ctrl+Shift+u 3 a 9 ↵ (or space) → Ω
Press and hold Ctrl+Shift+u, release all keys, then hit 3, release it, hit a, release it, hit 9, release it and finally hit space or enter.
But then you need to remember all those codes, at least those you need… 😁


Kind regards

Johnny Rosenberg
--
You received this message because you are subscribed to the Google Groups "autokey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autokey-users/d759e971-b51a-4f39-a40f-a7c81312c987n%40googlegroups.com.

Little Girl

unread,
Dec 14, 2021, 1:08:15 PM12/14/21
to autokey-users
Hey there,

Hannibal King wrote:

Hello there, thanks for your input! My problem is that Autokey absolutely does not register any key when I am trying to set a hotkey.
What am I doing wrong?

Whoops. My mistake. Sorry about that. I had AutoKey set to not need to save after changes. What my steps were missing was what Stephen Meech remembered to include in his reply above, which was a save. If you follow my steps, after you click the OK button and before you close the main window of AutoKey, you'll want to save the changes to finish setting up the phrase.
 
The steps for creating the example German Umlaut A phrase triggered by a hotkey should have been:
    1. Open the main window of AutoKey.
    2. Click the New button in the toolbar.
    3. Click Phrase in the drop-down menu that opens.
    4. Type in German Umlaut A as the name for the phrase.
    5. Click the OK button.
    1. Paste ä into the phrase contents area (the text area on the right side of the screen).
    1. Click the Set button next to Hotkey: (None configured) at the bottom of the window.
    2. Click the Alt button in the little window that opens.
    3. Click the Press to set button in the same little window.
    4. Press the a key.
    5. Click the OK button.
    1. Press Ctrl+s or click the Save button in the toolbar or click the File menu and then click the Save entry in the drop-down menu that opens.
    1. Close the main window of AutoKey.
      The steps for creating the example German Umlaut A phrase triggered by an abbreviation should have been:
        1. Open the main window of AutoKey.
        2. Click the New button in the toolbar.
        3. Click Phrase in the drop-down menu that opens.
        4. Type in German Umlaut A as the name for the phrase.
        5. Click the OK button.
        1. Paste ä into the phrase contents area (the text area on the right side of the screen).

        Little Girl

        unread,
        Dec 14, 2021, 1:17:35 PM12/14/21
        to autokey-users
        I'm going to try pasting those steps in one more time because Google made a complete mess of them. They came out fine in email, but if you go into a browser window and look at them, they're all messed up. Without further ado, here they are one more time and hopefully not messed up by Google:

        The steps for creating an example German Umlaut A phrase triggered by a hotkey:

        1. Open the main window of AutoKey.
        2. Click the New button in the toolbar.
        3. Click Phrase in the drop-down menu that opens.
        4. Type in German Umlaut A as the name for the phrase.
        5. Click the OK button.
        6. Paste ä into the phrase contents area (the text area on the right side of the screen).
        7. Click the Set button next to Hotkey: (None configured) at the bottom of the window.
        8. Click the Alt button in the little window that opens.
        9. Click the Press to set button in the same little window.
        10. Press the a key.
        11. Click the OK button.
        12. Press Ctrl+s or click the Save button in the toolbar or click the File menu and then click the Save entry in the drop-down menu that opens.
        13. Close the main window of AutoKey.

        The steps for creating an example German Umlaut A phrase triggered by an abbreviation:

        Hannibal King

        unread,
        Dec 14, 2021, 1:31:49 PM12/14/21
        to autokey-users
        Thank you!
        Unfortunately, AutoKey does absolutely nothing. The abbreviation does not work and the hotkey wont register, no matter what key I press.

        I read that Autokey does not work with Wayland, so that might be the problem...

        Johnny Rosenberg

        unread,
        Dec 14, 2021, 1:35:59 PM12/14/21
        to autoke...@googlegroups.com
        Den tis 14 dec. 2021 kl 19:31 skrev Hannibal King <hki...@gmail.com>:
        Thank you!
        Unfortunately, AutoKey does absolutely nothing. The abbreviation does not work and the hotkey wont register, no matter what key I press.

        I read that Autokey does not work with Wayland, so that might be the problem...

        That should probably be the first information to give us… No, it doesn't work with Wayland. I hope it will in the future (or that something similar will). Until then, no Wayland for me, at least. AutoKey is the single most important app I ever use.

        But as I said earlier, you can do this particular task without AutoKey.
        If you still need Autokey (after all, it's very useful), I guess you could try another GNU/Linux-distribution. I think you can run most of them without Wayland.



        Kind regards

        Johnny Rosenberg
         
        --
        You received this message because you are subscribed to the Google Groups "autokey-users" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.

        Little Girl

        unread,
        Dec 14, 2021, 1:38:32 PM12/14/21
        to autokey-users
        Ah, that's not good. I wasn't aware of that. It looks like there's an open issue for that that you may want to keep an eye on for any future developments: https://github.com/autokey/autokey/issues/87


        Hannibal King

        unread,
        Dec 14, 2021, 1:59:24 PM12/14/21
        to autokey-users
        Thanks guys, as this is crucial to me, I'll head back to Windows.

        As a german with a US ANSI keyboard, I really need hotkeys.

        Thanks again!

        Little Girl

        unread,
        Dec 14, 2021, 2:04:00 PM12/14/21
        to autokey-users
        Hey there,

        I'm sorry to hear that, Hannibal. Please consider doing what Johnny Rosenberg suggested and trying a different GNU/Linux distribution. Perhaps your distribution even offers some X11 alternatives to the Wayland you're currently using.


        Johnny Rosenberg

        unread,
        Dec 14, 2021, 2:21:07 PM12/14/21
        to autoke...@googlegroups.com
        Den tis 14 dec. 2021 kl 19:59 skrev Hannibal King <hki...@gmail.com>:
        Thanks guys, as this is crucial to me, I'll head back to Windows.

        As a german with a US ANSI keyboard, I really need hotkeys.

        So don't use Wayland then. Shouldn't that solve your problem?


        Kind regards

        Johnny Rosenberg
         

        Thanks again!

        Little Girl schrieb am Dienstag, 14. Dezember 2021 um 19:38:32 UTC+1:
        Ah, that's not good. I wasn't aware of that. It looks like there's an open issue for that that you may want to keep an eye on for any future developments: https://github.com/autokey/autokey/issues/87


        --
        You received this message because you are subscribed to the Google Groups "autokey-users" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.
        Reply all
        Reply to author
        Forward
        0 new messages