Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 found this question and was so excited when I found out I could remap my whole keyboard with a really simple Microsoft product called Keyboard Layout Creator.

My problem: Keyboard Layout Creator doesn't allow me to modify the space bar with any "shift state" keys (e. g., Ctrl, Ctrl + Alt, and Shift).

Characters assigned to the SPACE KEY in any shift state must be spacing characters

I want to remap Shift + Space to an underscore (_).

This would be really helpful for me, because my database names are all formatted with underscore separators (e. g., this_is_a_database_name), and I think it'd be faster with this key combination than Shift + -.

share|improve this question
up vote 7 down vote accepted

This is possible with AutoHotkey:

  1. Download and install the latest version.

  2. Create a new script called underscore.ahk with your favorite text editor.

  3. Write the following in the file and save it:

    +Space::Send _
  4. Double-click the file to run the script.

  5. If you wish, copy the script (or a link to it) in the Startup folder.

Pressing Shift + Space now inserts an underscore.

share|improve this answer
Thanks! Do you think you could help me with this similar question? – kentcdodds May 3 '12 at 14:38
Here is the key list: it contains LShift and RShift, among other keys. Now press Any key. ;) – n611x007 Mar 21 '13 at 8:02
I would like _ to be fired on space + shift instead of OP's request. With this solution "I_get sentences that look this, see what I_mean?" but in order to handle that, I think I will need to modify spacebar's key to fire on key up instead of the default key down. – C Sharper Jan 15 '15 at 20:47
@CSharper: The space bar is not a modifier key, so while what you're going for should be possible, it won't be a one-liner. I don't have Windows anymore, so I won't be able to help. Sorry. – Dennis Jan 15 '15 at 20:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .