Hacker News new | comments | show | ask | jobs | submit login

I've been thinking about trying to find a reasonable way to map the underscore to shift+space, but I'm not sure if that would somehow break some application that expects otherwise. It also seems to be quite difficult to achieve on Windows without registry hacks (I presume it would be easier on Linux, but haven't tried it yet).



It's very easy on Windows with the strange and wonderful AutoHotkey [1]. I recommend the more advanced AutoHotkey_L fork [2], but this script should work in either version.

Install AutoHotkey and then create a file called Underspace.ahk with this content:

    ; Underspace for AutoHotkey
    ; Converts Shift+Spacebar to underscore

    #SingleInstance force

    +Space:: Send _
Now launch that file.

Try Shift+Space and it should type an underscore for you.

If you want to stop the script later, find a green "H" in your system tray and right-click it.

After you try it, I'll be curious how it works out for you. Myself, after trying it for just a minute or two, I'm not so sure if I like it. I'm finding a lot of spurious underscores before capitalized words, or after a word like "I" that ends with a capital letter. That's because I've been sloppy about the timing of when I press the Shift key before or after a space.

So I won't be using this script myself (not that I need it - I don't like to code using names_with_underscores) but maybe others will find it useful.

[1] AutoHotkey home page: http://www.autohotkey.com/

[2] AutoHotkey_L: http://l.autohotkey.net/

(minor edit for clarity)


This tool looks really cool. I see what you mean about the spurious underscores... think I'll try it out for a day and see whether or not I can live with it. Thanks!




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: