2
votes

My goal is to remap ; (semicolon) to Control + k. However that doesn't work since ; starts a comment instead of being recognized as a key.

This is my code:

^k::;

I do have a workaround that kind of works but it is causing a mess with the curly braces:

{ ;Semicolon
    ^k::
    send, {; down}
    send, {; up}
    return  
}

The curly braces after "down" and after "up" are not recognized as brackets but as part of the comment.

2
The } after the down and up are recognized. From the help doc, "the semicolon must have at least one space or tab to its left." Also, this works for me, ^k::Send , {;}.EJE
The following works too, but again it's creating a mess with folding the code: ``` ^k:: sendevent, {`;} return ``` All of the brackets are recognized but not entirely because the folding doesn't work...gignu

2 Answers

5
votes

I've found the answer myself!

^k::
Send, {Text};
return 

Everything that comes after {Text} will be interpreted as text only!

1
votes

try using

`;::?

(? being used as wildcard)

did a quick google search and found this: https://autohotkey.com/board/topic/33122-how-to-remap-semicolon-key/ Not sure if this is what you are looking for though.