How to select < symbol

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dejvid
Posts: 2
Joined: 16 Jan 2022, 16:00

How to select < symbol

Post by dejvid » 16 Jan 2022, 16:03

Hi all,

according to documentations "<" symbol is used for:
< Use the left key of the pair. e.g. <!a is the same as !a except that only the left Alt will trigger it.

I have dedicated key on keyboard which has </> keypress.
Is there any was to remap those keys since <::Send [X] does not work. It still presses < instead of X. I have tried with $< and doesn't work either.

Thanks for help.

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

Re: How to select < symbol

Post by gregster » 16 Jan 2022, 16:13

< is only used as a modifier, if there is something to modify.
In case of <::, there is nothing to modify, and it should work just like other keys.

Code: Select all

<::Send X
works well here - without braces around the X.

Btw, Send X will send shift and x. For just sending x, use Send x.

PS:

Code: Select all

<::Send [X]		; <
+<::Send [Y]	; >       shifted <     - alternatively: >::send [Y]
works as well, literally sending [X] or [Y], if that's intended.

You could still try scan codes. See KeyHistory or Special Keys to determine them.

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

Re: How to select < symbol

Post by gregster » 16 Jan 2022, 16:18

gregster wrote:
16 Jan 2022, 16:13
You could still try scan codes. See KeyHistory or Special Keys to determine them.
This works on a german layout (with a </> key, next to the left Shift key). On yours, the code might be different.

Code: Select all

SC056::Send [X]				; < key
+SC056::Send [Y]			; shifted < key: >
(In case your target program runs with elevated rights, your script needs to do this as well: Right-click script file and choose: Run as admin, or similar)

dejvid
Posts: 2
Joined: 16 Jan 2022, 16:00

Re: How to select < symbol

Post by dejvid » 16 Jan 2022, 20:09

gregster wrote:
16 Jan 2022, 16:18

Code: Select all

SC056::Send [X]				; < key
+SC056::Send [Y]			; shifted < key: >
(In case your target program runs with elevated rights, your script needs to do this as well: Right-click script file and choose: Run as admin, or similar)
Thank you very much!
This one worked perfectly:
SC056::Send [X]

Post Reply

Return to “Ask for Help (v1)”