tsunami

log in
history

AutoHotkey: accent characters

Luke Breuer
2016-07-29 03:25 UTC

#`::   ProcessAccent({"a":"à", "e":"è", "i":"ì", "o":"ò", "u":"ù"})
#'::   ProcessAccent({"a":"á", "e":"é", "i":"í", "o":"ó", "u":"ú"})
; #`::: did not work
#+`;:: ProcessAccent({"a":"ä", "e":"ë", "i":"ï", "o":"ö", "u":"ü"})
; couldn't get ^ or > to work; win-6 activates item in task bar
#.::   ProcessAccent({"a":"â", "e":"ê", "i":"î", "o":"ô", "u":"û"})
#-::   ProcessAccent({"a":"ā", "e":"ē", "i":"ī", "o":"ō", "u":"ū"}) 

ProcessAccent(dict)
{
    Input, c, L1
    ac := % dict[c]

    If !ac
        oc := c
    Else If c is lower
        oc := ac
    Else
        StringUpper oc, ac
    
    Send % oc
}