Hey all... I've been a fan of AHK for ages, as well as several GTK+ based programs on windows (i.e. GAIM / Pidgin, GIMP, and Inkscape)
Some of my most commonly used hotstrings are for characters like üäößÜÄÖ, etc. Those are the additional characters for German, which I've been in the slow process of learning for years. é is useful for the word pokémon... haha.
I implement these like this:
Code:
:c?*:uuU::Ü
:c?*:ooO::Ö
:c?*:aaA::Ä
:c?*:sS::ß
:c?*:oO::ö
:c?*:aA::ä
:c?*:uU::ü
:c?*:eE::é
Typing that stuff is second nature... and it's only a problem when stringing together words with no spaces... such as the occasional filename or going SSSssssssssssssssßSSSSsssssssssss. Not a very common problem, and fixable by just doing 's S' and going back and deleting the space.
When using a GTK+ program, however, those don't work. Hotstrings with regular characters do work, but not special characters. This is an ancient problem... and you'll find a few threads with search about this.
The fundamental flaw is that GTK+ uses input or encoding or something that is hex based. As my uncertainty there indicates, I don't know a ton about this, and knowing that fact didn't help me much. "Hex" doesn't get many results when you search for it here

I got clued in a few weeks ago though when reading a random email on the Pidgin developers list (I read but don't contribute, for I lack knowledge of that sort... it's still interesting). Lo and behold, someone mentions that Alt + ### doesn't work, and one of the developers replies that you need to use Ctrl + Shift + u + ## where the two ## are the hex code for that character. VOILA!
Next I found that a hotstring works for ü:
Code:
:c?*:uuU::^+uDC
In that case, DC is the hex code for the character... and it works!
Next I simply used #IfWinActive to identify all GTK+ windows. So far this works for all GTK+ windows I've tried:
Code:
#IfWinActive, ahk_class gdkWindowToplevel
And then I set up the rest of them after finding a page listing Hex codes.
(
http://www.indwes.edu/faculty/bcupp/things/latin1.htm)
Code:
:c?*:uuU::^+uDC
:c?*:ooO::^+uD6
:c?*:aaA::^+uC4
:c?*:sS::^+uDF
:c?*:oO::^+uF6
:c?*:aA::^+uE4
:c?*:eE::^+uE9
And tested... What do I get?
ü ö ä Ü Ö Ä ß é ---> ü 6 4 Ü 6 4 ß 9
So that didn't quite work.... If I compare the list with the hex codes in the set of hotstrings, I notice that all the ones with hex codes ending in numbers trigger prematurely or something. What it's sending instead is the hex characters D C F and E. Those are whitespace characters, iirc; D is Carriage Return, C is New Paragraph, A is New Line, B is Vertical Tab, etc.
And that has me stumped. How do I get it to interpret the number too and THEN send the special character?
Thanks in advance; and if you find this in the future, searching for a solution to this same general trick... hope it helps!
•Gertlex
Edit: Experimented a bit more today... turns out using lowercase letters solves the problem in all but one of the cases.
The final list:
Code:
:c?*:uuU::^+uDC
:c?*:ooO::^+ud6
:c?*:aaA::^+uc4
:c?*:sS::^+uDF
:c?*:oO::^+uf6
:c?*:aA::^+ue4
:c?*:eE::^+ue9
:c?*:_-::- ; ^+uAF
:?*:*?*::^+uBA^+uBF^+uBA
:?*:+or-::^+ub1
The last one doesn't work, however. It should produce ±, but doesn't work. Oh well. It's the least used of those.