I'm not an expert in AHK but not long ago I made a very simple code to change the behaviour of the apostrophe dead key. What I wanted was to have the key to print the apostrophe directly if pressed alone and to have its normal dead key function if pressed with the right Ctrl.
My code was as follows
$'::send '{space}
^'::send '
plus some other stuff that I don't think is relevant. It worked fine for a while but lately it stopped, I suspect some update or something like it.
Now It behaves different than expected, a single alone press prints an apostrophe with no space after it (all good till now), but if I press it with Ctrl and then press any other letter it only prints the letter by itself. If I press it with Ctrl twice it prints two apostrophes after the second press and if I press it with Ctrl the first time followed by just the key itself (wothout Ctrl) it prints two apostrophes followed by one space.
In practice:
Ctrl+' followed by e = <e> with no apostrophe anywhere.
Ctrl+' followed by r = <r> again with no apostrophe anywhere.
Ctrl+' followed by Ctrl+' = <''>
Ctrl+' followed by just ' alone = <'' >
This leaves me very puzzled, anyone has any suggestions to get it working like before?
Thanks in advance.
Skipjack3, My fault, I switched the two keyboards in my previous answer. If you choose US (instead of US International), there are no dead keys that are being held back by the OS, thus these keys can be used by AHK to trigger on a string.
The way I did this years ago on my system (and am still using today) is :
:?C*:``a::à
:?C*:``i::ì
:?C*:``e::è
:?C*:``o::ò
:?C*:``u::ù
:?C*:``A::À
:?C*:``I::Ì
:?C*:``E::È
:?C*:``O::Ò
:?C*:``U::Ù
:?C*:^ :: ; Turn ^{Space} into neutral ^, else ^ will be used in next vowel.
Send, {^}{Space}{BackSpace}
Return
:?C*:^a::â
:?C*:^i::î
:?C*:^e::ê
:?C*:^o::ô
:?C*:^u::û
:?C*:^A::Â
:?C*:^I::Î
:?C*:^E::Ê
:?C*:^O::Ô
:?C*:^U::Û
:?C*:`" :: ; Turn "{Space} into neutral ", else " will be used in next vowel.
Send, +{'}{Space}{BackSpace}
Return
:?C*:`"a::ä
:?C*:`"i::ï
:?C*:`"e::ë
:?C*:`"o::ö
:?C*:`"u::ü
:?C*:`"A::Ä
:?C*:`"I::Ï
:?C*:`"E::Ë
:?C*:`"O::Ö
:?C*:`"U::Ü
:?C*:' :: ; Turn '{Space} into neutral ', else ' will be used in next vowel.
Send, {'}{Space}{BackSpace}
Return
:?C*:`'a::á
:?C*:`'i::í
:?C*:`'e::é
:?C*:`'o::ó
:?C*:`'u::ú
:?C*:`'A::Á
:?C*:`'I::Í
:?C*:`'E::É
:?C*:`'O::Ó
:?C*:`'U::Ú
:?C*:`'c::ç
:?C*:`'C::Ç
:?C*:ss\::ß
:?C*:ae\::æ
:?C*:AE\::Æ
:?C*:oe\::œ
:?C*:OE\::Œ