Pixelastic

You can cut our wings but we will always remember what it was like to fly.

Posts tagged with "autohotkey"

Productivity tip #1 : Using global hotkeys

This post will be the first of what I hope will be a long serie of posts. I'll blog about some of the little tricks I've learn in the past years that make me go faster on my daily job.

I'll start with something I can no longer work without : my global hotkeys.

The concept is pretty simple, I've binded some keys combinations to launch specific applications or directories. It might not seem very important, but it does make you gain a tremendous amount of time for those apps you launch pretty often like browser, IDE, or project directory.

I used to work on Windows, and I then used a little script named AutoHotKey to bind my keys. The script even comes packaged with its own language if you ever want to script complicated stuff.

I'm now working under Ubuntu, and the global hotkeys can be defined directly from the System Settings (in 11.10 it's System Settings > Keyboard > Shortcuts > Custom Shortcuts)

Opening apps

I choose a key combination hard enough to type so I won't type it by mistake, but easy enough to remember that I could type it whenever I want.

For example, I binded all the app I use the most to a Ctrl+Win+{Letter} combination. Ctrl+Win+C opens Chromium, Ctrl+Win+F opens Firefox, Ctrl+Win+T opens Trillian, etc.

Opening folders

I used a close combination for opening directories : Ctrl+Win+Alt+{Letter}. Those three keys are side by side on most keyboards so pressing them is easy.

This time I used the letter H for my home folder, D for the Dropbox folder, W for /var/www, etc, etc.

I've tweaked my keyboard in a few other ways, but this will be the subject of another post. Hope this one gave you some ideas.

Opening a new tab using Ctrl+Click on Opera

One thing that bugs me everytime I use Opera are the weird keyboard shortcuts. You open link in a new tab by using the middle mouse button (classic) or Shift+click (less classic, we are accustomed to use the Ctrl+Click, Shift+Click being used to open in a new window).

Today it was bugging me one too many times, so I decided to use the power of AutoHotKey to help fix this.

Here is the little snippet I added to my default AutoHotKey script :

;        Open page in new tab in Opera using Ctrl + Click
#ifWinActive, ahk_class OpWindow
^LButton::Send +{LButton}
#IfWinActive

It basically catch every Shift+Click in Opera and return a Ctrl+Click instead, allowing me to finally open tabs the way I'm used to.