Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rin67630
Posts: 5
Joined: 10 Aug 2022, 06:01

Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Post by rin67630 » 10 Aug 2022, 06:11

Hi Experts here,
using Autohotkey V1, I cannot reassign German keyboard's ö, ä, ü

Code: Select all

!ä::Send {Asc 0156}
!+ä::Send {Asc 0140}
!ö::Send {Asc 145}
!+ö::Send {Asc 146}
are not accepted in the script.

Then I tried with the scan codes, which lines are accepted, but do not work.

Code: Select all

!SC0x4C::Send {Asc 0156}
!+SC0x4C::Send {Asc 0140}
!SC0x52::Send {Asc 145}
!+SC0x52::Send {Asc 146}
Has anyone got a clue how to do it right?
Do I have to change the AHK version?

Regards and thank you for helping.
Laszlo

User avatar
mikeyww
Posts: 26851
Joined: 09 Sep 2014, 18:38

Re: Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Post by mikeyww » 10 Aug 2022, 06:43

Welcome to this AutoHotkey forum!

Although others here know more about German keyboards, my general understanding is that while scan codes use hex values, they omit the 0x notation.

Explained: Key namesExample
3-digit hexadecimal value

gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Post by gregster » 10 Aug 2022, 07:15

Autohotkey V1 cannot reassign German keyboard's ö, ä, ü
If that was true, I think we would have noticed.

Did you save your script in UTF-8 with BOM encoding?
If not, you should: https://www.autohotkey.com/docs/FAQ.htm#nonascii

rin67630
Posts: 5
Joined: 10 Aug 2022, 06:01

Re: Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Post by rin67630 » 10 Aug 2022, 09:16

gregster wrote:
10 Aug 2022, 07:15
Autohotkey V1 cannot reassign German keyboard's ö, ä, ü
If that was true, I think we would have noticed.

Did you save your script in UTF-8 with BOM encoding?
If not, you should: https://www.autohotkey.com/docs/FAQ.htm#nonascii
Thank you for that information that i missed.
I now saved my file in UTF with BOM now, but with no more success:

the lines
!ä::Send {Asc 0156}
!+ä::Send {Asc 0140}
!ö::Send {Asc 145}
!+ö::Send {Asc 146}

are still wrongly interpreted:
Image

Can it be that the version V1 that I downloaded yesterday still is not UTF-aware?
Attachments
image.png
image.png (4.99 KiB) Viewed 590 times

gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Post by gregster » 10 Aug 2022, 09:23

With german Umlauts, for me also the ANSI version works. But generally I would recommend to use a Unicode version.
What version are you using anyway? Edit: I guess the latest v1, if you downloaded it yesterday.
I am using v1.1.34.03 Unicode 64 bit, but Unicode 32 bit and ANSI (also available in the installation folder) worked for me as well.

That error looks more like you are still not using UTF-8 with BOM encoding - at least like an encoding problem of the script file.
Perhaps try a fresh file... and exit all already running scripts.

Btw, I would recommend this method instead of the Ascii codes:

Code: Select all

!ä::Send {text}œ

rin67630
Posts: 5
Joined: 10 Aug 2022, 06:01

Solved: Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Post by rin67630 » 10 Aug 2022, 09:39

rin67630 wrote:
10 Aug 2022, 09:16
Can it be that the version V1 that I downloaded yesterday still is not UTF-aware?
The issue is solved:
Loaded V2 and it works like a charm.

gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: Autohotkey V1 cannot reassign German keyboard's ö, ä, ü

Post by gregster » 10 Aug 2022, 09:41

Well, v2 (beta) doesn't require a BOM (byte order mark) anymore, it's true. But the syntax is pretty different now.
Still, v1 should work with BOM.

Post Reply

Return to “Ask for Help (v1)”