9

I'm using gtk, and all the function names have many underscores. It gets annoying to type things like set_from_file and on_button_clicked, etc. Do you have any tips on how to type these more effectively?

8
  • 7
    For the fastest underscore possible, you could swap the space bar and the underscore keys.
    – Nosredna
    Aug 6, 2009 at 20:32
  • 6
    Or remap shift+space to _ ?
    – sep332
    Aug 6, 2009 at 20:34
  • 1
    This is a legitimate question people. I know vote to close is exciting but try to calm those itchy fingers. :P If this gets closed I'll vote to reopen. Aug 6, 2009 at 20:41
  • 3
    If only so much attention were spent on my more legit questions about GTK.
    – Claudiu
    Aug 6, 2009 at 20:46
  • 1
    well it caused me to get an account here, anyway.
    – Claudiu
    Aug 6, 2009 at 21:08

13 Answers 13

14

Use an editor with auto-complete functionality?

6
  • 1
    I agree. A decent editor will auto-complete for you.
    – Brian Neal
    Aug 6, 2009 at 20:43
  • most sane, probably. i'd first have to find a good one for python (IDLE works, but it is shoddy, and it only works if you run your code in it), and then get used to it. but could be worth it!
    – Claudiu
    Aug 6, 2009 at 20:45
  • Hmm, I think swapping the underscore and spacebar keys is more efficient. :) Aug 6, 2009 at 20:49
  • probs best answer, still have to find a good one for python though
    – Claudiu
    Aug 9, 2010 at 20:22
  • Komodo edit 7 is pretty good with python!
    – Claudiu
    Sep 10, 2012 at 3:38
12

Using a programmable foot pedal could help you out a bit.

3
  • 2
    You combine the chance to become a professional gtk programmer with the chance to become a death metal drummer. Aug 6, 2009 at 22:46
  • haha. that'd be awesome.
    – Claudiu
    Aug 6, 2009 at 23:28
  • Not a proper answer, but it sure made me laugh :] There was a 'computer stupidity' rinkworks.com/stupid/cs_mice.shtml about mouse/foot pedal (beware, very addictive website). Aug 13, 2009 at 6:30
4

What's wrong with holding shift with your left hand and using your pinky from your right hand? That's what I do -- it's probably the fastest once you get used to touch typing it.

2
  • hmmmm... i'm using my ring finger to hit it, atm. i'll try adjusting to using a pinky and - starting now - I'll see - just = how_ ti_ goes_. i might like this.
    – Claudiu
    Aug 6, 2009 at 23:30
  • 1
    You do have to pivot the hand a bit but you can pivot it right back __ _ __ __ __ weeeeee Aug 7, 2009 at 0:28
3

remap - key to _ so you don't have to relearn key location but can save time not hitting shift.

3

Use MSKLC .. I'd remap ' (dagger) to _ and _ to '.

3

Remap a useless key to _. The most useless keys on the keyboard are insert and caps lock. They are close to the useful keyfield, so you might actually gain speed once you've learned the position of your new _ key.

Backstory: I realized that I never used insert or caps lock. But every so often I would hit one by accident. These keys are toggles, which affect every subsequent keystroke. Whenever I realized that I hit insert, I had to turn it off and then recover the text that I overtyped. Whenever I realized that I hit caps lock, I had to turn it off and then retype the text that I entered in "oppositecase". I found this so unacceptably frustrating (unfuriating) that I pried insert and caps lock off every keyboard that I use. It's much better that way. (I can toggle either one, when rarely needed, by reaching into the hole with the back of a pen.) (If you remap one of these keys, you can remap some other combination to replace it, or use "Onscreen keyboard".)

2

Try using Autohotkey

Include a configuration like:

a::_

in this case, when you type "a", it will put a "_"

4
  • I'd give the example using another key...
    – samuelcarrijo
    Aug 6, 2009 at 20:37
  • 19
    Of course, it's your choice wh_t you want to repl_ce
    – mkato
    Aug 6, 2009 at 20:38
  • The ` is a good choice. I never use that thing. And it's pretty easy to hit. Makes your left pinky super-strong.
    – Nosredna
    Aug 6, 2009 at 21:17
  • @samuelcarrijo, e::_
    – Grant
    Aug 6, 2009 at 21:26
2
  1. Turn on capslock.
  2. Place something heavy on the shift key.
  3. Everything you type will be in lowercase, but if you type a - it will be a _

Alternate Method:

Use an autohotkey script

#IfWinActive ahk_class gtk ; or whatever the title for the window is

;Choose one of the below
-::Send _        ; replace -'s with _'s
+space::Send _   ; replace shift+space with _'s
f3::Send _       ; replace F3 with _'s. You get the idea
1
  • 3
    +0.4 for creativity. Unfortunately we round down. Aug 6, 2009 at 21:38
1

Hitting the underscore key isn't much harder than hitting any upper case letter, since it's just a key combined with Shift.

You can always copy it to the clipboard and type Control-V if your fingers have a problem hitting the numeric row consistently.

2
  • 2
    i actually often CTRL+C annoying letters when i have to type them a lot in a particular section of code
    – Claudiu
    Aug 6, 2009 at 20:44
  • Except that it's keyboard position puts it out of reach of all but those with abnormally long and dextrous pinkies, which means your fingers have to leave the home keys. That significantly reduces typing speed. It makes a difference in any application of real size.
    – Russell Steen
    Aug 6, 2009 at 20:44
1

Practice, practice, practice...

The kids (and I) like this Typing Instructor

-JFV

3
  • i can already type at like 140wpm; i don't know if that typing instructor is for me
    – Claudiu
    Aug 6, 2009 at 23:29
  • 2
    The best typing tutor is The Typing of The Dead Aug 7, 2009 at 1:32
  • I learned from Mario Teaches Typing. If you got a good typing streak going, Mario blew though goombas like a samurai.
    – Grant
    Aug 7, 2009 at 12:26
1

Add a second keyboard. (You can have up to [at least 14] USB keyboards.) You could use the second keyboard directly -- but it merely types the same characters. You could tape down Shift on the second keyboard -- but you still have to find its -/_ key every time; no time saved. With more work, you can remap keys on the extra keyboard. For example: place the second keyboard above the first one and make its spacebar type _, hitting the other spacebar might actually be faster than typing Shift+-/_. (And you have ~94 more keys that you can relabel for other added functions.) Recoding the second keyboard has been done using LuaMacros: https://www.diyphotography.net/create-entire-new-keyboard-shortcodes-hack/

0

Copy and paste a bunch of times.

0

Change to hungarian keyboard layout. It will be easier to write underscore as the dash will be next to the shift key.

2
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    May 6, 2022 at 21:36
  • It seems easier to press two keys with one finger of the left and one finger of the right hand instead of two fingers of the left hand.
    – Juergen
    Mar 7 at 12:16

You must log in to answer this question.

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