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.

Did you find this post useful? Show some love!
DISCUSSION (25)

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.

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

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

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

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

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.

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.

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

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

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.

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

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

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.

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

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

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.

Browsing the web is the only hard thing to do without a mouse. Some websites provide accessibility. You can like/unlike a post on facebook with l key, allows jk bindings to scroll to next/prev post. Twitter have similar features.

Yes

  • do NOT switch to VIM, switch to a more powerful IDE based on your needs
  • when you are doing something with your mouse, stop it, look up for a way to do that action with the keyboard, and if is faster then learn it for future use
  • print some cheat sheets around you

IDE's has also functions to generate code like templates, live templates and to to help you like multi cursors, quick view/edit of the function.

After all my gaming years I got really fast with the mouse, haha, so this never really worked out for me :D

But I read a tiling window manager could be of great help.

Pick one application a week and prepare yourself to lose a little productivity to learn the keys. Once you've gained that productivity back, choose another. Sounds silly but that worked for me.

You could get a keyboard with programmable keys and record some macros

I've decided on the Razer Ornata Chroma. :)

Classic DEV Post from Mar 12

How do you handle days where you just aren't motivated?

Some days just aren't your day

READ POST
Follow @ben to see more of their posts in your feed.
Jens Genberg
Software engineer with a passion for game development.
Trending on dev.to
8 things I hate in recruitment letters [add yours, it's kind of research]
#discuss #career #job #productivity
Set up My Computer with Me!
#beginners #devtips #setup
How to split a new feature into independent (release ready) parts before coding it
#webdev #tips #productivity #beginners
Developer burnout is real
#productivity #beginners #mindset #career
5 helpful features in Chrome's DevTools
#devtips #webdev #javascript #productivity
Don't code your microservice like a monolith, keep it maintainable not over-engineered
#tips #webdev #devops #productivity
Find someone to mentor
#productivity #career #devto
Why you should use SQL CTEs
#databases #beginners #sql #devtips