Deadkey fires despite being turned into a hotkey or hotstring Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Bernd
Posts: 56
Joined: 03 Sep 2016, 13:56

Deadkey fires despite being turned into a hotkey or hotstring

Post by Bernd » 14 May 2021, 10:49

I turned the grave accent deadkey into a hotkey.
However, it still fires a ` into the next empty space (expected behaviour: hà llo , reality: hà`llo, hàllo`).
Turning it into a hotstring gave the same results.

Anybody has the same issue?
Is it possible to make deadkeys "undeadkeys" in AHK?
User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Deadkey fires despite being turned into a hotkey or hotstring

Post by mikeyww » 14 May 2021, 11:58

It helps if you post your script-- easier to debug it that way!
Bernd
Posts: 56
Joined: 03 Sep 2016, 13:56

Re: Deadkey fires despite being turned into a hotkey or hotstring

Post by Bernd » 14 May 2021, 14:44

Sorry:

Code: Select all

`::
	{
	SendInput {U+0300}
	}
return
and

Code: Select all

:?c*:``::
	{
	SendInput {U+0300}
	}
return
[Mod edit: [code][/code] tags added.]

My OS is Windows 10. I tried it both in Word and Notepad.

Update: the stray ` is U+0060 ` (spacing) GRAVE ACCENT.
User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Deadkey fires despite being turned into a hotkey or hotstring

Post by mikeyww » 14 May 2021, 16:46

OK. I'm not sure exactly what you are trying to achieve, but many examples of using the accent symbols are available here on the forum. One example is below.

Code: Select all

:*?:``a::á
:*?:``e::é
:*?:``i::í
:*?:``o::ó
:*?:``u::ú
:*?:``n::ñ
Alternatively, the backtick can be used as a hotkey if needed. Example is below.

Code: Select all

`::Send f
Bernd
Posts: 56
Joined: 03 Sep 2016, 13:56

Re: Deadkey fires despite being turned into a hotkey or hotstring

Post by Bernd » 14 May 2021, 17:20

Thanks, but I try to make "flying diacritics" for Cyrillic characters. It works in principle (ы̀), if it were not for the additional spacing grave/acute/circumflex (ы̀`)... how to get rid of it?

This is likely because of the deadkeys status. Can you UNmake a deadkey in AHK?
gregster
Posts: 8916
Joined: 30 Sep 2013, 06:48

Re: Deadkey fires despite being turned into a hotkey or hotstring

Post by gregster » 14 May 2021, 19:05

So just to be clear (based on your code above): instead of typing `a to get à (normal dead key behaviour), you want to type a` instead... ?

Edit:
If that's the case, this seems to work (on my keyboard layout which has ` as a dead key):

Code: Select all

$`::SendInput {U+0300}
Different editors seem to react differently to this, though. On some, space`a will also result in à, but with a different placement of `over the letter a - sligthly shifted to the left.

(the $ modifier prevents that sending ` will trigger it's own hotkey.)
Last edited by gregster on 14 May 2021, 19:49, edited 3 times in total.
Reason: Edited multiple times while testing.
Bernd
Posts: 56
Joined: 03 Sep 2016, 13:56

Re: Deadkey fires despite being turned into a hotkey or hotstring  Topic is solved

Post by Bernd » 15 May 2021, 03:37

Thanks so much!

Code: Select all

$
does the trick! :)
Post Reply

Return to “Ask for Help (v1)”