Output of square and curly brackets

Discussion, questions and support.
Post Reply
bs1
Posts: 7
Joined: Feb 2nd, ’22, 09:33

Post by bs1 » Feb 2nd, ’22, 14:16

When I try to output the string

Code: Select all

{[}%Cursor%{]}
via short cut, the first character is output incorrectly. If I want to output a { at the beginning instead of the [, it is omitted completely.

In my previous autohokey script I had solved it like this:

Code: Select all

^-::
	SendInput, {[}
	SendInput, {]}	
	SendInput, {Left}
Return
If I put this code (without the trigger) into FastKeys as a command, nothing is output at all. What do I have to do to make the snippet work as well in FastKeys as in a pure autohokey script?
User avatar
Tom
Posts: 796
Joined: Nov 24th, ’15, 23:39

Post by Tom » Feb 2nd, ’22, 21:32

These are special characters in FastKeys. To properly display curly braces you need to put them in braces, like this
{{} and {}}
Alternatively you can use Raw text option.
bs1
Posts: 7
Joined: Feb 2nd, ’22, 09:33

Post by bs1 » Feb 3rd, ’22, 09:41

Tom wrote: Feb 2nd, ’22, 21:32 These are special characters in FastKeys. To properly display curly braces you need to put them in braces, like this
{{} and {}}
I know that I have to use curly brackets to mask special characters, it works in AHK directly so. Only in FastKeys the first bracket is not displayed or displayed incorrectly.
Tom wrote: Feb 2nd, ’22, 21:32Alternatively you can use Raw text option.
How can I set the Raw text option for shortcuts?
User avatar
Tom
Posts: 796
Joined: Nov 24th, ’15, 23:39

Post by Tom » Feb 3rd, ’22, 18:59

It works for me, probably you have changed some default settings. This does not work with the clipboard method (Preferences/Text Expander/Advanced).

When editing the phrase, select "More options" and enable "Send Raw Text".
bs1
Posts: 7
Joined: Feb 2nd, ’22, 09:33

Post by bs1 » Feb 3rd, ’22, 19:17

Sorry, I think we are talking past each other. I want to trigger the action via [CTRL + -] and not via the text expander. In the input dialog for the shortcut there is no "send raw text" option:

https://www.dropbox.com/s/gthgyavvn3ctl ... 4.png?dl=0
User avatar
Tom
Posts: 796
Joined: Nov 24th, ’15, 23:39

Post by Tom » Feb 3rd, ’22, 20:35

Must be the shortcut, I tried Alt+X and it works. Same with the AutoHotkey.
bs1
Posts: 7
Joined: Feb 2nd, ’22, 09:33

Post by bs1 » Feb 3rd, ’22, 20:51

Thanks. I also tested a little bit. With [Win + -] and [Alt + -] it works, only with [CTRL + -] not. With Autohotkey directly it works also with [CTRL + -].
Post Reply