Office Word like approach to type accented characters

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
m4mmt
Posts: 1
Joined: 07 Feb 2020, 06:22

Office Word like approach to type accented characters

07 Feb 2020, 06:35

Hello everyone, this is my first post in the forum and I'm a novice in using ahk too. I'm italian but I have a laptop with a us keyboard layout. Italian language uses a lot accented vocals (both acute and grave accents) but I couldn't find an easy way to type them. Until I used Word 365, which has a really user friendly way of typing them. Basically I can press ctrl+`, release and press the vocals I need to have it typed with a grave accent. The same is valid for acute accented vocals, if I type ctrl+', release and then press on the vocal I get an acute accented vocal. Unfortunately that works only in Office Word. Is there a way to replicate this behaviour on a system level using ahk? Thanks in advance for your help.
User avatar
Yakshongas
Posts: 590
Joined: 21 Jan 2020, 08:41

Re: Office Word like approach to type accented characters

07 Feb 2020, 19:28

I made something that works as you said but, when I try to put the ´ accent it outputs the accent and also a letter
Â
I don't know why but I couldn't find a way to fix it
Does anyone know how to fix this?

Code: Select all

^a:: ; acute accent
Sendraw, ``
return
^g:: ; grave accent
Sendraw, ´`
return
Please mark your topics as solved if you don't need any further help. ✅

Need a little more help? Discord : Yakshongas#9893 🕹
wbm1113
Posts: 18
Joined: 28 Aug 2018, 11:19

Re: Office Word like approach to type accented characters

07 Feb 2020, 20:11

Code: Select all

global Trigger := 0
return

^`::
    Trigger := 1
return


#If % Trigger=1
    :*?:a:: ; the vowel that you want to type goes where the 'a' is
        SendInput á ; the character you want to replace it with goes where the 'á' is
        Trigger := 0
    return

    :*?:e::
        SendInput é ; and so on, 
        Trigger := 0
    return

    :*?:PUT_A_LETTER_HERE::
        SendInput PUT_AN_ACCENTED_CHARACTER_HERE ; and so on, 
        Trigger := 0
    return

    ; next...

    ; next...

    ; etc...
#If

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Draken, Google [Bot], oktavimark and 394 guests