Keyboard shortcuts


January 6, 2023

Why keyboard shortcuts?

Why keyboard shortcuts? Why so many keyboard short cuts? Trying to avoid the mouse or the mouse-pad seems like a eccentric thing reserved for computer hackers. Terminals were a thing of the past during the mac and windows domination of the personal computer in the first two decades of the 20th Century. But in recent years the terminal is coming back stronger and support for keyboard shortcuts remains strong, also with greater care for accessibility in general. Using shortcuts instead of the mouse has high impact in our work.

Learning shortcut keys is a long term effort. The tendency to use back the mouse is very big. The more we learn short cut keys the smoother our work becomes, our wrists remain in a single position and we can switch window, application much easily. The benefit in my view comes from the brain-machine connection and not from speed. In other terms it comes from keeping the mind free to think on the content, just like knowing your chords and scales by heart allows you to convey your ideas in an improvisation without being over concerned with the notes and finger positions.

I know that there are people out there that know dozens if not hundreds, in my case I seem to know around 60 by heart on the different applications. My shortlists below helps me adding one by one as it grows. Bonus: most short cuts work across applications including web browser, text editors and more.

OS shortcuts

Short cuts to handle session windows and other, in general common in windows and linux and many applications.

shortcut action
alt+d address bar (browser)
alt+f file menu
ctrl+o file open
ctrl+s file save
win+e launch explorer
ctrl+alt+del session dialog box
win+l session lock
ctrl+w tab close
ctrl+tab tab switch
ctrl+tab+shift tab switch back
win+arrow window move
win+shift+arrow window move screen
win+tab window navigate
alt+tab window switch
win+° window switch (within application)

Text shortcuts

Shortcuts common in many text editors.

shortcut action
del character / selection delete
home line go to begining
end line go to end
ctrl+shift+z redo
ctrl+home text go to begining
ctrl+end text go to end
ctrl+z undo
ctrl+backspace word delete backward
ctrl+del word delete forward
ctrl+f word find (in document)
ctrl+shift+f word find (in files)
ctrl+arrow word move
ctrl+a word select all

RStudio shortcuts

Shortcuts here are in principle specific to RStudio.

shortcut action
ctrl+alt+i chunk insert
ctrl+alt+r chunk run all
ctrl+shift+enter chunk run current
ctrl+alt+n chunk run next
ctrl+shift+p command palette
ctrl+up console history
ctrl+2 focus console
ctrl+3 focus help
ctrl+1 focus source
alt+shift+m focus terminal
alt+shift+k help keyboard shortcuts
ctrl+enter line run
shift+arrow line select
ctrl+shift+m pipe insert
ctrl+shift+F10 session restart
ctrl+shift+up window zoom in
ctrl+shift+down window zoom out

Terminal shortcuts

Here additionaly some key commands are listed too.

shortcut action
tab autocompletion
tab 2x autocompletion possibilities
ctrl+c break command
up history
!! history repeat last
!88 history run line 88
ctrl+r history search
ctrl+k kill (cut) until line end
ctrl+a line begin
ctrl+e line end
ctrl+l terminal clear
ctrl+d terminal close
ctrl+alt+t terminal launch
ctrl+y yank (paste)


Ubuntu shell keyboard shortcuts

Setting launch explorer in Ubuntu:

The official RStudio keyword short list can be accessed with alt+shift+k from inside RStudio.