Which is better in Hotstring, scancode and direct typing? Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
hancre
Posts: 251
Joined: 02 Jul 2021, 20:51

Which is better in Hotstring, scancode and direct typing?

Post by hancre » 31 Mar 2024, 07:32

I've used these following Hotstring to type non-english(?) alphabet.
It almostly works well. But it doesn't work.
When I type 'e<', it should show é, but it shows 'e' sometimes.
I found scancode available in Hotstring.

Code: Select all

:*:1;::{U+2460} `  ;;;①
Which is better in Hotstring, scancode and direct typing? ( Less Error )

Code: Select all

:c*:a<::á
:c*:a>::à
:c*:a^::â
:c*:a"::ä
:c*:A<::Á
:c*:A>::À
:c*:A^::Â
:c*:A"::Ä

:c*:e<::é
:c*:e>::è
:c*:e^::ê
:c*:e"::ë
:c*:E<::É
:c*:E>::È
:c*:E^::Ê
:c*:E"::Ë

:c*:i<::í
:c*:i>::ì
:c*:i^::î
:c*:i"::ï
:c*:I<::Í
:c*:I>::Ì
:c*:I^::Î
:c*:I"::Ï

:c*:o<::ó
:c*:o>::ò
:c*:o^::ô
:c*:o"::ö
:c*:O<::Ó
:c*:O>::Ò
:c*:O^::Ô
:c*:O"::Ö

:c*:u<::ú
:c*:u>::ù
:c*:u^::û
:c*:u"::ü
:c*:U<::Ú
:c*:U>::Ù
:c*:U^::Û
:c*:U"::Ü

:c*:C<::Ç
:c*:c>::ç
:c*:n^::ñ
:c*:N^::Ñ
:*:!"::¡
:*:?"::¿
Thanks for any help in advance.

User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: Which is better in Hotstring, scancode and direct typing?

Post by mikeyww » 31 Mar 2024, 08:01

Hello,

If it were up to me, I would use the one that works! When I tested your script, it worked.

lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: Which is better in Hotstring, scancode and direct typing?  Topic is solved

Post by lexikos » 31 Mar 2024, 20:17

{U+nnnn}
SendInput() or WM_CHAR is used to send the character and the current Send mode has no effect. Characters sent this way usually do not trigger shortcut keys or hotkeys.
Source: Send - Syntax & Usage | AutoHotkey v2
Characters vs. keys: By default, characters are sent by first translating them to keystrokes. If this translation is not possible (that is, if the current keyboard layout does not contain a key or key combination which produces that character), the character is sent by one of following fallback methods:
  • SendEvent and SendInput use SendInput() with the KEYEVENTF_UNICODE flag.
Source: Send - Syntax & Usage | AutoHotkey v2
:c*:e<::é will attempt to produce é be simulating keystrokes, if possible.

:Tc*:e<::é will send exactly the character code for é, due to the T option. It is essentially equivalent to {U+nnnnn}.

hancre
Posts: 251
Joined: 02 Jul 2021, 20:51

Re: Which is better in Hotstring, scancode and direct typing?

Post by hancre » 31 Mar 2024, 21:32

@lexikos

Thank you for your help. ^^;; I'll add T option to the related Hotstrings.

Post Reply

Return to “Ask for Help (v2)”