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 remap the keyboard layout/language switching to Win+Space, I tried it with:

LWin & Space::Send, ^+

But it doesn't seem to work, I would want it to send a Ctrl+Shift sequence so that I can switch between keyboard layouts with Win+Space.

How can I make this work?

share|improve this question

3 Answers 3

Are you sure this is Ctrl+Shift? On my system it is Alt+Shift. anyway, use this command:

LWin & Space::Send, {Alt Down}{Shift}{Alt up}

Replace Alt for Ctrl if your system indeed uses the Ctrl+Shift combination.

share|improve this answer

You can easely (by changing first two lines to:

$~#Space::LangSwitch(1)
$~#Space up::LangSwitch(2)

) modify wOxxOm's Keyboard layout switcher for using Win+Space instead of right control. And it will work no matter which hotkeys are set up for switching layout in Windows (default is Alt+Shift, I'm using Ctrl+Shift).

Because of non-ahk-native switching (script uses WinAPI), whole script is rather bulky, so I didn't paste it inline. In case of autohotkey.com inaccessibility, here it is: http://pastebin.com/ygm3f6sp

(again, all credits go to wOxxOm, source script is there: http://www.autohotkey.com/board/topic/24666-keyboard-layout-switcher/)

P.S. That script is quite old, and has hardcoded byte-offsets, so I'm not sure if it will work with 64-bit Autohotkey.exe or in 64-bit Windows. I only have 32-bit at hand.

share|improve this answer

I tried the answer, but it didn't work for me. Also I tried:

LWin & Space::Send, {Alt Down}{Shift}{Alt up}

LWin & Space::Send, {Alt Down}{Shift}{Alt up}

#space::Send, {lshift dn}{lalt dn}{lalt up}{lshift up}

But neither works. However Left Alt + Left Shift work just fine when I press them, but not if AHK is sending the combination.

On a side note - I have checked 'Show location of pointer when I press CTRL key' (mouse properties -> pointer options), and when I press win+space I see the circles around my mouse pointer.

So I assume it sends CTRLinstead of alt or shift. Any ideas?

PS: On a side note - this works:

!space::send {Shift}

but this does not:

#space::send {lalt dn}{shift}{lalt up}

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.