Unicode characters/keys as hotkey?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Unlatch7458
Posts: 1
Joined: 09 Feb 2023, 03:17

Unicode characters/keys as hotkey?

Post by Unlatch7458 » 09 Feb 2023, 05:04

Is this possible? For example I have character "𐂁" with corresponds with unicode code 0x00010081.

Something like this:
10081::
; commands to be executed

I'm using external numpad with Rasberry Pico to translate keys to other keys or combinations and it allows me to send these characters. For example: Numpad / -> 0x00010081
I could just use some key combos instead but using single keys would make thing much easier.

Any ideas?

gregster
Posts: 9111
Joined: 30 Sep 2013, 06:48

Re: Unicode characters/keys as hotkey?

Post by gregster » 09 Feb 2023, 07:33

No way to test, but you could try a hotstring like

Code: Select all

:X*?:𐂁::msgbox
Make sure to save your script in UTF-8 with BOM encoding.


At least, when generated by an AHK script, such Unicode characters can trigger hotstrings (by adjusting the #InputLevel). This works:

Code: Select all

#Inputlevel 1
q::Send 𐂁
#Inputlevel 0
:X*?:𐂁::msgbox 
But I doubt that 𐂁 could be a hotkey, because it is not considered as part of the used keyboard layout.

gmoises
Posts: 75
Joined: 18 Nov 2017, 16:43

Re: Unicode characters/keys as hotkey?

Post by gmoises » 09 Feb 2023, 10:08

First get the UNICODE character in your Clipboard

Code: Select all

Clipboard := Chr(10081)
Then you can paste it into your code

Code: Select all

❡::whatever

Post Reply

Return to “Ask for Help (v1)”