DEV Community

Jens Genberg
Jens Genberg

Posted on

How to stop relying on the mouse

I have recently been looking into keyboards, mechanical and otherwise, and decided that I will most likely upgrade my old Logitech one that I got with my desktop to a nicer one. This is part of my plan to encourage myself to program more at home (my last step was getting a really comfy chair).

Since I'm going to be getting a "high end" keyboard for the first time, I would like to also use it as much as possible. I would like to stop relying on the mouse for most tasks and learn more about keyboard shortcuts as well as get better at touch typing.

Do you have any tips on how to accelerate this process and possibly make it more fun? I am using Windows 10 and Visual Studio Code as my primary tools at the moment.

Top comments (25)

Collapse
 
maestromac profile image
Mac Siri • Edited

I have a few recommendations.

  • just like what @robertmjohnson said, switching to vim is probably the most optimal choice.
  • Assuming you are using chrome, use Vimium
  • Use Wox to open any application.
  • Utilize Windows 10's virtual desktops; Instead of trying to spam alt-tab to find the right window, you could separate and organize all those windows into two Virtual desktops.
  • Take a peek at all of Windows 10's shortkeys
  • Ask yourself the question of "Can this mouse action on this application be replaced by keyboard shortcuts?", then look into what short-keys the said application provides.
  • Script key-sequence, short-keys, or cursor actions with AutoHotkey. This is pretty easy to use and AutoHotkey provides really good documentation.

With that said, I think there's a diminishing return to trying to familiarize yourself with so many possible keyboard shortcuts. You want to slowly ease into this. Also, try to not have too many apps/tabs opened; the less you have on the screen, the less maneuvering you'll have to do.

Collapse
 
jeansberg profile image
Jens Genberg

Great suggestions! I will have to research all of these. I didn't even know Windows had virtual desktops.

Collapse
 
maestromac profile image
Mac Siri

Godspeed

Collapse
 
denvercoder profile image
Tim Myers

The following is a true story:

"1998, Grunge is all the rage, computers are becoming ubiquitous but still expensive. I have spent my last dime getting a new Pentium machine. My cat chewed through my mouse cable. I couldn't afford to buy a new one so I went without for about 2 weeks. I learned to use the Windows key, (commonly referred to as the 'Four Flag Key'), and I learned to tab my way around websites and word documents. The End"

But seriously, pick a task, give yourself 20 minutes and unplug that mouse! (NOTE: I mean unplug in the existential sense, I realize that most people don't use a wired mouse anymore...EXCEPT FOR => #PCMASTERRACE.

:P

Collapse
 
nikolamalesevic profile image
Nikola Malesevic

A very good point on getting rid of the mouse physically.

Btw, PC Master Race went wireless years ago. #logitech

Collapse
 
denvercoder profile image
Tim Myers

Not really. Most gaming mice are wired. There is an inherent latency involved in wireless. I don’t know many gamers that use a Wireless mouse. Plus, I have played for 27 hours straight before and a wireless mouse might not last that long.

Collapse
 
zolli profile image
Zoltán Borsos

For IntelliJ IDE's install the KeyPromoter X addon. It's really useful.

Collapse
 
robertmjohnson profile image
Robert Johnson • Edited

For getting better at touch typing I can recommend typing.io. It's free to try, the limitation being there are a only a relatively small set of "lessons" begin with. It costs $10 a month to upgrade to being able to upload source code in order to create new lessons.

This cost does feel rather cheeky because it doesn't include any more built-in lessons, so you have to trawl through Github yourself to find some decent files to upload. However I've carried on using it over the past 12 months because all other online typing trainers I've found are focused on typing natural language rather than code, whereas this makes sure you practice those awkward to type yet common characters like parens and braces.

Once you've got better at touch typing you'll start to hate needing to move your hands away from the home row, at which point I recommend you start learning Vim - there's simply no other style of editing that is better at keeping your fingers on those home keys. No need to move over to Vim itself as your editor though, you can download a VSCode plugin for that. There's no need to feel intimidated by Vim though, the Vim learning curve is a myth.

Collapse
 
jeansberg profile image
Jens Genberg

Thank you! I will definitely check out typing.io. And anything that plugs into VSCode is a plus.

Collapse
 
brunoti profile image
Bruno Oliveira

I would suggest to Vim or NeoVim or, at least, its simulators for other editors. Vim is great tool for Mouseless Development and it has a great community of users who loves it and share their configs and plugins. It's cool to do everything in a terminal window. Vim + Tmux is the way for me.

Collapse
 
jeansberg profile image
Jens Genberg

I plan on taking this soon! thoughtbot.com/upcase/onramp-to-vim

Collapse
 
brunoti profile image
Bruno Oliveira

Nice man! Didn't know about that course. Ben Orenstein is a great Vim user.

Collapse
 
medeirosjoaquim profile image
Joaquim Jr.

use the notions of workspaces in your OS I use xmonad as window manager (but gnome would do the trick) . e.g You set a workspace with a shared sceen with browser + vim*. and other workspace with a terminal for commands. With keyboard you quickly switch between then and (for xmonad) I can even switch the workspace layout. Use vim. Vim is great by itself and with a set of plugins its even better. The learning curve is not that high and it sure worth it.

It's almost a year since I did this changes because of a Tendinitis and now I do everything more quickly and my right hand is getting better!

If you are a windows user, consider setting a virtual machine for development!

to learn vim:
just execute vimtutor (comes with vim)
play around with the free version of vim-adventures.com/
(it's good enough to learn, but it's so fun that you will want to
have a license for some months)

also: shortcutfoo.com/app/dojos

Quick start: seriously, just open vim
ESC gets out of any mode to normal mode
i or a (there are other keys) puts you in insert mode,
if you need to select something use visual mode

h(left) j(down) k(up) l (right)

good luck

Collapse
 
abrandao profile image
Anderson Brandão

About Vim. I think it's not so necessary if you're using vscode like me. But, if you want this, use vim plugin to vscode.

Just this, learn about keybinds and fight against the mouse temptation.

Just a complementation: There is a linux interface called i3. It's completely designed to works only with shortcuts. Search about "Manjaro i3" on Google if you apreciated the idea.

Collapse
 
sgharms profile image
Steven G. Harms

I've been largely mouseless for years.

On Linux: xmonad, terminal + tmux + terminal vim, vimium

OS X: same thing minus vimium

I do use the mouse on OS X because OS X is optimized for mouse use. Nevertheless all my dev work is done in terminal in tmix in vim.

Collapse
 
nans profile image
Nans Dumortier

Not a vim user here, but I tried using Vimium and I'm having fun for now. I don't know if I'm ready to switch to vim for code edition, but I guess if I learn a little at a time I'll be able to switch without loosing too much productivity !

Collapse
 
roopunk profile image
Roopam Poddar

Not just vim, you can get really efficient for heavier IDEs like phpstorm also, with a good set of shortcuts.

Collapse
 
jeansberg profile image
Jens Genberg

Yes, I suppose I should look into that for VS Code. Thanks.