Is it possible to expand word's accent feature over all programs?

2

In word, there's this cool keyboard shortcut to insert letters with symbols over them. For example, the first À character you'd press the ctrl key and the ` key and then press Shift and A to create a capital A with the accent mark. (Source)

Is there a way to expand that over all of windows?

Jon

Posted 2014-04-27T23:06:54.637

Reputation: 8 089

Answers

2

The differences between Word and the solution proposed by drk.com.ar are

  • immediately showing diacritic ('"^~`) as opposed to needing the space bar
  • needing ctrl + diacritic as opposed to just the diacritic

If you feel like that's "unacceptable" (like me), the following AutoHotkey script achieves exactly Word's feature, but then system-wide:

StringCaseSense, On
^'::
{
   Input, char, L1
   if char = a
      Send á
   else if char = A
      Send Á
   else if char = e
      Send é
   else if char = E
      Send É
   else if char = i
      Send í
   else if char = I
      Send Í
   else if char = o
      Send ó
   else if char = O
      Send Ó
   else if char = u
      Send ú
   else if char = U
      Send Ú
   else if char = c
      Send ç
   else if char = C
      Send Ç
   else if char = y
      Send ý
   else if char = Y
      Send Ý
   else 
      Send %char% ;ignores ctrl+' is if it isn't followed by any of aeioucyAEIOUCY
   return
}

^`::
{
   Input, char, L1
   if char = a
      Send à
   else if char = A
      Send À
   else if char = e
      Send è
   else if char = E
      Send È
   else if char = i
      Send ì
   else if char = I
      Send Ì
   else if char = o
      Send ò
   else if char = O
      Send Ò
   else if char = u
      Send ù
   else if char = U
      Send Ù
   else 
      Send %char% ;ignores ctrl+` is if it isn't followed by any of aeiouAEIOU
   return
}


^+6:: ; +6 is circumflex
{
   Input, char, L1
   if char = a
      Send â
   else if char = A
      Send Â
   else if char = e
      Send ê
   else if char = E
      Send Ê
   else if char = i
      Send î
   else if char = I
      Send Î
   else if char = o
      Send ô
   else if char = O
      Send Ô
   else if char = u
      Send û
   else if char = U
      Send Û
   else 
      Send %char% ;ignores ctrl+^ is if it isn't followed by any of aeiouAEIOU
   return
}

^~::
{
   Input, char, L1
   if char = a
      Send ã
   else if char = A
      Send Ã
   else if char = i
      Send ĩ
   else if char = I
      Send Ĩ
   else if char = n
          Send ñ
   else if char = N
      Send Ñ
   else if char = o
      Send õ
   else if char = O
      Send Õ
   else 
      Send %char% ;ignores ctrl+~ is if it isn't followed by any of ainoAINO
   return
}

^"::
{
   Input, char, L1
   if char = a
      Send ä
   else if char = A
      Send Ä
   else if char = e
      Send ë
   else if char = E
      Send Ë
   else if char = i
      Send ï
   else if char = I
      Send Ï
   else if char = o
      Send ö
   else if char = O
      Send Ö
   else if char = u
      Send ü
   else if char = U
      Send Ü
   else if char = y
      Send ÿ
   else if char = Y
      Send Ÿ
   else 
      Send %char% ;ignores ctrl+" is if it isn't followed by any of aeiouyAEIOUY
   return
}

I placed a compiled version in my windows startup folder to have these shortcuts at my disposal automatically.

JBSnorro

Posted 2014-04-27T23:06:54.637

Reputation: 146

2

You can get a similar behavior: You have to setup your keyboard to user a layout with dead keys. Which is pretty common if you use, for example, a Spanish keyboard. But you can do the same with an English one. In Windows it's called United-States international. And you can select that in Control Panel > Region and Languages > Keyboards and Languages > Change keyboards...

After that, when you press the single quote key ' and then any vowel, you will have you accented character like this Á and if you press the ` key and then a vowel you will have the other accent À. Finally if you want to print a single quote, you will have to press ' key and then space

drk.com.ar

Posted 2014-04-27T23:06:54.637

Reputation: 2 287

Can you add a tutorial for windows 8? – Jon – 2014-04-28T02:23:08.717

I don't have Windows 8 installed. I've found this on Google: http://www.howtogeek.com/121169/how-to-change-your-keyboard-layout-in-windows-8/

– drk.com.ar – 2014-04-28T02:26:31.883