robtillaart:
Another nice way is to have a gaming keyboard e.g. - http://www.logitech.com/en-us/keyboards/keyboards/gaming-keyboard-g510 -
and program the "game" buttons for code snippets.
(rather expensive but
I use some of the otherwise unused buttons (just pause and scroll lock now) to do random things --- pause used to change my desktop background, now it sleeps my computer; scroll lock inverts colors). On a normal desktop keyboard there's more (like the three buttons just right of the space bar). You could also remap some of the F_ keys.