Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make an AutoHotkey script for making Ctrl+Space toggle the space bar's function. The default function is space. When Ctrl+Space is pressed, the function changes to em space. Search em space if you don't know it. When Ctrl+Space is pressed anew, it goes back to space. Can anyone help me?

share|improve this question
Have you tried anything ? – Ankit Mishra May 11 '13 at 14:15
I have two scripts right now. One has a code that changes the space bar's function to em space. The other doesn't have that code. – Michael Dy May 11 '13 at 14:23
So, you are having problem with the toggling part ? – Ankit Mishra May 11 '13 at 14:26
Yes............ – Michael Dy May 11 '13 at 14:29
Can you provide the script you are using ? – Ankit Mishra May 11 '13 at 14:34
up vote 0 down vote accepted

Use this script, Ctrl+Space will "Toggle" the space key's Mode.

IsEmSpaceOff := true

IsEmSpaceOff := false
IsEmSpaceOff := true

#if !IsEmSpaceOff
Space::SendInput { }
share|improve this answer
It works, but when I restart my PC, the default is em space. I tried understanding your code, but to no end. How can you make space the default? – Michael Dy May 12 '13 at 3:50
You mean that after restarting the PC and running the script again you get "EM space" as default ? But I'm not having this issue at mine. Is it the case that you want em space to be the 'Default action' of Space Bar ? I can't understand your issue. – Ankit Mishra May 12 '13 at 7:03
After restarting my PC, I get em space by default. I want space to be the default, not em space. – Michael Dy May 12 '13 at 14:53
Are you sure there is no other script interfering ? Because I also tried it and I am not having the same problem. Script has default set to Normal Space, so that should not be a problem. Check for any other auto-running. – Ankit Mishra May 12 '13 at 15:00
I fixed it. There's nothing wrong with your code. Thanks for the code. – Michael Dy May 12 '13 at 15:49

Your Answer


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.