Live data from Hacker News

Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

news.ycombinator.com

81–90 of 160 posts

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#82
post #79

To me, most shortcuts gain nothing by being on mouse rather than the keyboard (which, of course, has much more room). However, when a shortcut modifies a mouse action or otherwise comes into scope while mousing—that is when you get useful leverage. Here are the best uses I've put extra mouse buttons to: 1. Double-click. Great for selecting word-at-a-time and really relieves the RSI. If you double-click the double-cli…

When I was using Ubuntu I could drag a window from anywhere by holding Alt and clicking anywhere on the window. I had to use this frequently because due to resolution switching bugs I’d end up with windows where the window controls were entirely off screen.

I believe there is a Windows tool that implements Alt drag as well. On OS X I remember seeing some work in progress attempt but not sure it was ever fully polished.

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#83
I'm not japanese (but I've got japanese family members) but I do use japanese keyboard since years and years and years.

I use it as a qwerty keyboard but... I use the extra functions keys as "super" and "hyper" in addition to ctrl/shift/alt. I love japanese keyboards because the space bar is tiny so the modifiers left and right of the space bar are easy to reach.

The "super" modifier is only for shortcuts related to my window manager (switching virtual desktops / arranging windows / launching programs etc.).

The "hyper" modifier is for my custom macros/functions (which I call from Emacs).

It's nice because these additional modifiers never clash with any other shortcuts.

And as I type this I see in this thread I'm not the only one using a japanese keyboard this way.

Now... In this day and age I probably should get a custom keyboard or make my own keyboard but... Years and years ago it wasn't that easy to make your own keyboard so back then it made sense to go for the laziest thing that would provide me with more modifiers and with "easy to reach with the thumbs" modifiers (thanks to the small spacebar). And the lazy thing to do was simply to use a japanese keyboard.

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#84

Buy a Japanese keyboard and you have thumb toggles on you laptop/desktop amoung many other keys.

Do you have any suggestions for JIS layout (or even thumb-shift) keyboards easily purchasable internationally (Canada specifically)? I’ve always wanted one, but it seems extremely difficult to get one here (at least without resorting to pre-owned keyboards from eBay).

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#85
post #79

To me, most shortcuts gain nothing by being on mouse rather than the keyboard (which, of course, has much more room). However, when a shortcut modifies a mouse action or otherwise comes into scope while mousing—that is when you get useful leverage. Here are the best uses I've put extra mouse buttons to: 1. Double-click. Great for selecting word-at-a-time and really relieves the RSI. If you double-click the double-cli…

Re: Drag window: One of the only things I miss about the Sun Solaris workstation I used back in my embedded days was the "Front" key. Hover the mouse over a window, hit "Front", and that window would be moved to the top of the window stack, unless it was already on top in which case it would be moved to the back. It was extremely useful both for raising a window when you could only see a little corner, and for cycling through all the windows at a particular point on the screen. You also didn't have to make it so clicks would raise a window, and then you could have a terminal in front of a browser window and you could click around in the browser without losing the terminal.

There are many things I do not miss about my SparcStation. Like, opening a web page with too many GIFs in Firefox, which would lock up the window manager, and I'd have to use a colleague's machine to telnet to my machine so I could `pkill -9 x11`.

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#86

I have a Dygma Raise which is a ~60% keyboard and uses layers. My layer 2 is full of useful macros. I need macros even for the keyboard arrows because my Keyboard doesn't have arrows (arrows are layer2+hjkl or layer2+esdf). I also make heavy use of custom mappings in Vim and Bash aliases. I have a macro for ctrl+shift+v on my Keyboard since it's the Evolution (Linux mail app) shortcut for moving emails. I also have m…

How about other QMK users share their mappings in this thread? Here's mine[0]

I've been on a minimally mapped POK3R (60%) for years (pretty much CL=l2mod, l2mod+hjkl=arrows). It's been OK but still can't touch-type properly and even after years as daily driver still prefer low-profile laptop style keys.

Just switched this week to a self-built Lily58proc Choc[1] for better ergonomics and forcing myself to touch-type. My layout is still a work in progress, I still type very slowly, and would love to see other coders' mappings for inspiration :)

[0] https://gist.github.com/3nprob/41bfaca6dd712de673a140b2b3be3...

[1] https://github.com/kata0510/Lily58

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#87
post #42

Along the same lines: 1. How often do people use 'home' and 'end' keys ? I don't, but I know quite a lot who swear by them. Do they actually increase productivity ? 2. Should caps lock be removed as a large button in the most valuable real-estate-area on the keyboard ? I literally never use it. Even when typing long ALL-CAPS sequences. I just use 'shift' instead. 3. Do you use space bars with both hands ? I only use…

> 1. How often do people use 'home' and 'end' keys ? I don't I'd say, what are you coding where you don't benefit from home and end? I use both a lot while coding, usually in conjunction with ctrl+left or ctrl+right for quickly positioning the cursor where I want it, or ctrl+home or ctrl+end to quickly go to the top or bottom respectively. > 3. Do you use space bars with both hands ? Yes, not often while programming,…

> what are you coding where you don't benefit from home and end?

The kind where my typing speed does not affect my output. Also, the type who doesn't use command line text editors.

I work in ML and mostly use python. Very rarely do I need to be efficient in how I navigate my documents/code, because it is rarely the bottle neck.

Lastly, all my laptops have both end/home positioned awkwardly, so I never found it quite ergonomic enough for my purposes.

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#88
My mouse (Logitech G604) has six side buttons, three extra top bottoms, and has the following programmed on it:

- copy

- paste

- enter

- forward

- back

- Zoom mic toggle[0]

- OSX screen left/right (activated by pushing the mouse wheel left or right).

- Volume up/down (on top of the mouse)

Screen left/right is the most important things I do with the mouse aside from the normal pointing and clicking. For the side buttons, copy, paste, and enter are the overwhelming winners. These alone probably reduce the back and forth between keyboard and mouse by half. I regularly forget that the other three are there.

In retrospect, the correct answer is to select whatever key combinations you end up alternating back and forth between your keyboard and mouse to enter and program it into your mouse. This will reduce switching, which is faster and reduces strain.

My keyboard (Ergodox EZ) has a “hyper” button on it, which is the combination of every modifier key on my keyboard. This lets me program shortcuts like ctrl+alt+shift+command+o, which is pretty easy to reach and guaranteed to have no collisions. I currently only use this for o (optimize imports) and i (indent document) in IntelliJ. It’s a neat trick, but the mouse stuff above has so far been more important to me.

Then again I’m also a manager now, so take that last bit with a grain of salt. I might do more keyboard wizardry if I was a full time engineer still.

0 - This was really useful right up until I built a custom zoom control box with toggle switches (with covers!) for my lights, camera, and mic. Now it’s unused, but I haven’t found anything I do commonly enough to justify putting in this spot. I need to make a post showing this off one of these days.

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#89
post #42

Along the same lines: 1. How often do people use 'home' and 'end' keys ? I don't, but I know quite a lot who swear by them. Do they actually increase productivity ? 2. Should caps lock be removed as a large button in the most valuable real-estate-area on the keyboard ? I literally never use it. Even when typing long ALL-CAPS sequences. I just use 'shift' instead. 3. Do you use space bars with both hands ? I only use…

Maybe you would also be interested in remapping a bit.

1. Almost never. ^$ and Ctrl+ae fill 90% of use-cases. My Home/End and PageUp/PageDown are on a secondary layer.

2. The button itself is useful, the CL function is useless. I remapped mine to be a layer modifier (e.g. hjkl become arrow keys, and the above)

3. Training myself off it atm. I have a split keyboard where left thumb is Space, right thumb is Enter.

Layout and keyboard in my other reply [0]

[0] https://news.ycombinator.com/item?id=27961382

Re: Ask HN: Does anyone use keyboard/mouse extra buttons for coding?

#90
post #63

The main reason people don't do this is that your fingers are on the keyboard most of the time, and there are already plenty of buttons if you learn how to hit Ctrl or Alt smoothly (e.g. remap Caps Lock to Ctrl) and how to create new shortcuts.

Yes. When you type 8 characters per second, it makes no sense to have to unglue your hands from the home row. On the other hand I find that raw typing speed has barely anything to do with development speed.

> On the other hand I find that raw typing speed has barely anything to do with development speed.

I agree it's all about the thinking. However moving my hand off the keyboard slows down my thinking: I might have to move my eyes to find the mouse and then re-orient my hand on the keyboard, all of which is a small cognitive distraction. I tried the Mac trackpad and while it's quite responsive, it's still moving off the keyboard.

That's what makes Emacs so powerful: the primary cursor movement is search and the next is structured movement, not character based. All the semantic movements (jump to definition and the like) are tiny keyboard commands. I don't use the arrow keys except in other apps.

Post reply on HN