diff options
Diffstat (limited to 'windows/autohotkey/Source')
| -rw-r--r-- | windows/autohotkey/Source/Changelog-and-Todo.ahk | 3 | ||||
| -rw-r--r-- | windows/autohotkey/Source/Methods-Other.ahk | 31 | 
2 files changed, 25 insertions, 9 deletions
diff --git a/windows/autohotkey/Source/Changelog-and-Todo.ahk b/windows/autohotkey/Source/Changelog-and-Todo.ahk index 1d65999..a49ea03 100644 --- a/windows/autohotkey/Source/Changelog-and-Todo.ahk +++ b/windows/autohotkey/Source/Changelog-and-Todo.ahk @@ -28,6 +28,9 @@      CHANGEHISTORY:
 +                  Revision 687 (von Dennis Heidsiek):
 +                  - Die SendUnicodeChar-Methode um den GDK-Workarround von Matthias Wächter ergänzt
 +                  - (An/Aus) Icons an Favicon der neuen Homepage angepasst
                    Revision 645 (von Martin Roppelt):
                    - Ellipse zusätzlich auf M3+x; 
                    - Lang-s-Tastatur probeweise auf M4+Esc
 diff --git a/windows/autohotkey/Source/Methods-Other.ahk b/windows/autohotkey/Source/Methods-Other.ahk index b937080..8021ad1 100644 --- a/windows/autohotkey/Source/Methods-Other.ahk +++ b/windows/autohotkey/Source/Methods-Other.ahk @@ -164,17 +164,30 @@ IsModifierPressed()  SendUnicodeChar(charCode)
  {
 -   VarSetCapacity(ki, 28 * 2, 0)
 +   IfWinActive, ahk_class gdkWindowToplevel
 +   {
 +      StringLower, charCode, charCode
 +      send "^+u" . SubStr(charCode,3) . " "
 +   } else {
 +      VarSetCapacity(ki, 28 * 2, 0)
 +
 +      EncodeInteger(&ki + 0, 1)
 +      EncodeInteger(&ki + 6, charCode)
 +      EncodeInteger(&ki + 8, 4)
 +      EncodeInteger(&ki +28, 1)
 +      EncodeInteger(&ki +34, charCode)
 +      EncodeInteger(&ki +36, 4|2)
 +
 +      DllCall("SendInput", "UInt", 2, "UInt", &ki, "Int", 28)
 +   }
 +}
 +/*
 +Über den GDK-Workarround:
 +Dieser basiert auf http://www.autohotkey.com/forum/topic32947.html
 -   EncodeInteger(&ki + 0, 1)
 -   EncodeInteger(&ki + 6, charCode)
 -   EncodeInteger(&ki + 8, 4)
 -   EncodeInteger(&ki +28, 1)
 -   EncodeInteger(&ki +34, charCode)
 -   EncodeInteger(&ki +36, 4|2)
 +Der Aufruf von »SubStr(charCode,3)« geht davon aus, dass alle charCodes in Hex mit führendem „0x“ angegeben sind. Die abenteuerliche „^+u“-Konstruktion benötigt im Übrigen den Hex-Wert in Kleinschrift, was derzeit nicht bei den Zeichendefinitionen umgesetzt ist, daher zentral und weniger fehlerträchtig an dieser Stelle. Außerdem ein abschließend gesendetes Space, sonst bleibt der „eingetippte“ Unicode-Wert noch kurz sichtbar stehen, bevor er sich GTK-sei-dank in das gewünschte Zeichen verwandelt.
 +*/
 -   DllCall("SendInput", "UInt", 2, "UInt", &ki, "Int", 28)
 -}
  BSSendUnicodeChar(charCode)
  {
  | 
