Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Mar 7 '13 at 22:04

This question came from our site for professional and enthusiast programmers.

    
@Mihai You might want to clarify exactly what you mean by shift to make [ and other... –  user197261 Mar 7 '13 at 15:34
    
@Armin maybe but I think it would be better suited for something like Super User –  Hugo Dozois Mar 7 '13 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 '13 at 15:38

1 Answer 1

up vote 3 down vote accepted

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, .
share|improve this answer
    
Thanks very much Robert Ilbrink, master of AHK! Work great. –  Mihai Mar 7 '13 at 17:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.