[a136] colon hotkey parsing problem

Report problems with documented functionality
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

[a136] colon hotkey parsing problem

Post by swagfag » 30 May 2021, 13:23

Code: Select all

#Requires AutoHotkey v2.0-a136-feda41f4

:::MsgBox 'parses fine'
~:::MsgBox 'doesnt'
; *:::MsgBox 'doesnt'
; ~*:::MsgBox 'doesnt'
; !:::MsgBox 'doesnt'

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

Re: [a136] colon hotkey parsing problem

Post by lexikos » 31 May 2021, 06:15

It's never been specifically supported.

Also, what's this?

Code: Select all

~:::
Spoiler

: is simply too ambiguous. There are various ways to work around it, which are generally easier to interpret (for man and machine alike).

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [a136] colon hotkey parsing problem

Post by swagfag » 31 May 2021, 07:32

its because of

Code: Select all

:::MsgBox 'parses fine'
parsing fine(read: being specifically supported) and the documentation lacking any further info on that topic that i assumed the other ones ought to have been as well
its fine if they arent (going to be), but the docs should at least make a mention of it

of course it can be worked around with Hotkey(), so at the end of the day no biggie either way

im satisfied, u can mark this thread solved or do whatever

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

Re: [a136] colon hotkey parsing problem

Post by lexikos » 31 May 2021, 17:08

Maybe they were intended to be supported, and the comment was just vague. I've been aware of the issue for a long while and frankly never cared. (I'm not sure whether I realized the conflict with remapping before trying to fix it after your report; if I did, I forgot.) It just seemed obvious that hotkeys with ::: were hard to read if not ambiguous, and I wouldn't want to write them even if they were supported.

On a US keyboard, : isn't a key, but is produced by +;, which works just fine as a hotkey. This and the other ways to specify the key (by vk/sc) are probably more convenient than Hotkey(). Hotkey() is probably the only way to create a hotkey for whatever key combination corresponds to ':' for the script's default keyboard layout, but that seems like an unusual need (and a hotstring would be better as it adapts to the active window's keyboard layout).

Post Reply

Return to “Bug Reports”