Remapping SHIFT + SPACE to an underscore (_)
Solution 1
This is possible with AutoHotkey:
Download and install the latest version.
Create a new script called
underscore.ahk
with your favorite text editor.-
Write the following in the file and save it:
+Space::Send _
Double-click the file to run the script.
If you wish, copy the script (or a link to it) in the
Startup
folder.
Pressing Shift + Space now inserts an underscore.
Solution 2
I had been looking for a solution for this for a while, but didn't want to download AutoHotkey. I found that Microsoft publishes a Windows extension for super users called PowerToys that includes a Keyboard Manager that can facilitate the shortcut.
Example setup in Keyboard Manager:
The upside is that this program has some other cool things that you might enjoy, but make sure you take the time to go disable things you don't want.
Related videos on Youtube
kentcdodds
Updated on September 18, 2022Comments
-
kentcdodds almost 2 years
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).
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 + -. -
n611x007 over 11 yearsHere is the key list: autohotkey.com/docs/KeyList.htm it contains
LShift
andRShift
, among other keys. Now press Any key. ;) -
CSharper over 9 yearsI would like
_
to be fired onspace + 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. -
Dennis over 9 years@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.