Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

How to enter basic Spanish accented characters


  • Please log in to reply
16 replies to this topic
se
  • Guests
  • Last active:
  • Joined: --
The characters that I've been trying to get to work are the following:

Alt+ 0225 ---á
Alt+ 0233 ---é
Alt+ 0237 ---í
Alt+ 0243 ---ó
Alt+ 0250 ---ú
Alt+ 0241 ---ñ

I've tried to use the hotstrings method but that simply send the numbers...so if anybody can help that would be great!

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
hello se,
example for ñ
transform,NI,chr,241
msgbox,%NI%     ;or send
return


Helpy
  • Guests
  • Last active:
  • Joined: --
Send á é í ó ú ñ
works for me...
Send {Asc nnn} can be another solution.
Also Send % Chr(nnn)
And so on...

*MsgBox
  • Guests
  • Last active:
  • Joined: --
I made this for my son who is leaning Spanish.
To use, press the hotkey then:
the key you want to accent. If you forget to accent the letter you can press the hotkey then Spacebar, the previous letter will then magically become "accented". All letters can be capitalised.
question mark key unshifted inserts ¿?. Select some text then press hotkey shift ? to surround the text with ¿?
Same as above for ¡!
2 inserts ü, shifted capitalises.

Hope this helps. :)

;_____________________________
; \____Spanish Accents_____/

; Coded by MsgBox.                                        Last Edit:- 03/24/07

/*

Insert Spanish accents within 3 seconds of pressing hotkey.

á Á é É í Í ó Ó ú Ú ñ Ñ ¿ ¡ ü Ü

hotkey "a" = "á"
hotkey "A" = "Á"
hotkey "2" = "ü"
hotkey """ = "Ü"
...etc.

Left Alt plus numpad number:
á 160    Á 193    ñ 164    Ñ 165
é 130    É 144    ¿ 168    ¡ 173
í 161    Í 0205   ü 129    Ü 154
ó 162    Ó 0211
ú 163    Ú 0218

*/

#c::
StringCaseSense, On
Input key, L1 T3 C, {Space}?!, a,A,e,E,i,I,o,O,u,U,n,N,2,",1,/
If ErrorLevel = EndKey:Space
{
   ClipSaved := ClipboardAll
   Clipboard=
   Send +{Left}^c
   key = %Clipboard%
   Replace(key)
   Clipboard = %ClipSaved%
   ClipSaved=
   Return
   }
If ErrorLevel = EndKey:?
{
   Send ^c{Asc 168}^v?
   Return
   }
If ErrorLevel = EndKey:!
{
   Send ^c{Asc 173}^v{!}
   Return
   }
If ErrorLevel <> Match
   Return

Replace(key)

Replace(key)
{
   IfEqual key, a, Send {Asc 160}
   IfEqual key, A, Send {Asc 0193}
   IfEqual key, e, Send {Asc 130}
   IfEqual key, E, Send {Asc 144}
   IfEqual key, i, Send {Asc 161}
   IfEqual key, I, Send {Asc 0205}
   IfEqual key, o, Send {Asc 162}
   IfEqual key, O, Send {Asc 0211}
   IfEqual key, u, Send {Asc 163}
   IfEqual key, U, Send {Asc 0218}
   IfEqual key, n, Send {Asc 164}
   IfEqual key, N, Send {Asc 165}
   IfEqual key, 2, Send {Asc 129}
   IfEqual key, ", Send {Asc 154}
   Send {Right}
   IfEqual key, /, Send {Asc 168}?{left 1}
   IfEqual key, 1, Send {Asc 173}{!}{left 1}
   
   }
Return


atnbueno
  • Members
  • 91 posts
  • Last active: Feb 16 2016 07:04 PM
  • Joined: 24 Mar 2007
Hi,

(Spaniard with a Spanish keyboard here)

just an idea. Wouldn't it be more natural to assign those characters to a sequence of keys? For example, to get an "á" I press "´" (nothing happens) and then "a" (and an "á" appears). The same with "ü" ("¨", then "u"). The only exception is the "ñ" which I have a key for. I suppose you don't have "´" and "¨" in your keyboards, but just a couple of "special" keys would give you the full character range (all letters and also upper/lowercase), and at the same time it would be similar to the behaviour of a SP keyboard.

About the "ñ"... With my keyboard I get a "~" that behaves like an accentuation mark with AltGr+4. That is, AltGr+4 and then "n" gives me an "ñ". I'm curious if AltGr+4 behaves like that somewhere else.


Regards,
Antonio

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

About the "ñ"... With my keyboard I get a "~" that behaves like an accentuation mark with AltGr+4. That is, AltGr+4 and then "n" gives me an "ñ". I'm curious if AltGr+4 behaves like that somewhere else.

Yes, on my French keyboard, except that's AltGr+2 for me.
It is called dead keys, it also works for ` ^ ¨ for me.
There are various AHK solutions for input of accented chars, eg. Use CapsLock: get special letters in two key combos or Inserting unicode special characters or Insert special characters (just as in MS Word) or Extended character/diacritical hotstrings or High ASCII replacement hotstrings, and a question and so on...
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

atnbueno
  • Members
  • 91 posts
  • Last active: Feb 16 2016 07:04 PM
  • Joined: 24 Mar 2007
Ouch. French keyboards. Never in my life I've typed slower :D

I think PhiLho's links are more than enough but just in case it can inspire better key sequences, a couple of non-AHK links:
Unicode Diacritics System Keyboard
Unicode Diacritics Macro for MS Word
...just to look at the key sequences mentioned. I'm not suggesting using those per se.


Regards,
Antonio

se
  • Guests
  • Last active:
  • Joined: --
Hey thanks for helping me out! I just installed the program yesterday for the main purpose of making the accented characters...but now perhaps for other things as well! :)

I was trying to get it to work and following the example set by the following:

Send á é í ó ú ñ
works for me...
Send {Asc nnn} can be another solution.
Also Send % Chr(nnn)
And so on...


I was able to get my own set of codes! So thanks very much everyone! Here's the set of codes I was able to make:

::a'::{Asc 0225}
::e'::{Asc 0233}
::i'::{Asc 0237}
::o'::{Asc 0243}
::u'::{Asc 0250}
::n'::{Asc 0241}

The above gives the accented characters that I wanted (á é í ó ú ñ) by just typing the letter and an apostrophe (though I can see how that can interfere with normal day typing)!

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
maybe put the apostrophe before the letter? Either way, since you are not using the * option for the hotstring you actually have to type the letter, the apostrophe, and then a space (or certain other keys)

you may want to turn on the * option:

:*:'a::{Asc 0225}
:*:'e::{Asc 0233}
:*:'i::{Asc 0237}
:*:'o::{Asc 0243}
:*:'u::{Asc 0250}
:*:'n::{Asc 0241}

Those combinations are very hard to hit while typing naturally in English.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

Those combinations are very hard to hit while typing naturally in English.

I doubt that's for typing English, anyway! ;-) :-D
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005

I doubt that's for typing English, anyway! ;-) :-D


My point was that when the OP is not trying to type accented chars, (for example the English language), he is more likely to hit a' than 'a (for example the possesive Claudia's)

This of course is only a problem with * enabled, but when it is not enabled, I can imageine the shortcuts as painful to use in the middle of a word: (typing a'{space}{backspace})

se
  • Guests
  • Last active:
  • Joined: --
I see what you mean...and I have changed my codes. Putting the * got rid of that space back and forth. It's much much more convenient now! Thanks.

se
  • Guests
  • Last active:
  • Joined: --

I see what you mean...and I have changed my codes. Putting the * got rid of that space back and forth. It's much much more convenient now! Thanks.


I thought everything worked out fine...that is, if your accented characters are at the beginning!....the accents won't work in the middle of a word....like if you want to write está...it doesn't work and would instead just be est'a....(i think this being the hotkey was changed from "'a"...) how can you make the hotstrings ignore the previous letters and focus only on the hotkey that will launch it?

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
It is in the hotstring manual page...:
:*?:'a::à

Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

spaz
  • Members
  • 1 posts
  • Last active: Feb 22 2008 08:00 PM
  • Joined: 22 Feb 2008
:*?:a'::á
:*?:e'::é
:*?:i'::í
:*?:o'::ó
:*?:u'::ú
:*?:n'::ñ
I'm using that but there is a problem with it, it will work perfectly on mozilla and some other programs, but when I am on other programs like if I wanted to use á I would have to hold down a then really quickly press '. I fixed it last night while I was messing around with it and it worked fine, but now today when I tried, it didnt work and I cant remember what I did. Does anyone know how you can make it so I dont have to hold a key down and I can just press a then '. If any of you could help me, I appreciate it.