2

I want to switch the { key with [, so I don't have to use the Shift anymore to make { and I do have to use Shift key to make [...

same question for switching , to < and vice versa.

I know only how to make the first part work:

[::{

However, switching { with [ doesn't work when I try the following:

{::[

How do I insert the Shift key?

3
  • @Mihai You might want to clarify exactly what you mean by shift to make [ and other...
    – user197261
    Mar 7, 2013 at 15:34
  • @Armin maybe but I think it would be better suited for something like Super User Mar 7, 2013 at 15:36
  • @HugoDozois Well, stackoverflow has a decent autohotkey base (at least one question per day), and this is a code problem. [::{ ahk code example
    – user197261
    Mar 7, 2013 at 15:38

1 Answer 1

3

Let me know if this is what you want?
[ -> { and { -> ]

#SingleInstance Force
#installKeybdHook
#Persistent

; Prefix the hotkeys with $ to prevent one hotkey from launching the other hotkey in a loop!

; + is the shift key, so +[ is {

;==== Switch [ AND { ====
$[::Send, {{}
$+[::Send, {[}

;====Switch ] AND } ====
$]::Send, {}}
$+]::Send, {]}

;====Switch , AND < ====
$,::Send, <
$+,::Send, {,}

;====Switch . AND > ====
$.::Send, >
$+.::Send, .
1
  • Thanks very much Robert Ilbrink, master of AHK! Work great.
    – Mihai
    Mar 7, 2013 at 17:16

You must log in to answer this question.