Using Ubuntu Keyboard Shortcuts

Using Ubuntu Keyboard Shortcuts
Page content

Built-in Keystrokes

Desktop keys

  • Alt + F1 – Open the Application menu.
  • Alt + F2 – Open the Run Application dialog box.
  • Ctrl + Alt + Delete – Reboot without saving.
  • Ctrl + Alt + Left/Right/Up/Down – Move view between desktops.
  • Ctrl + Alt + L – Lock screen (requires password to unlock).
  • PrtScr – Screen capture whole screen.
  • Shift + F10 – Open local (right-click) menu.

Window keys

  • Alt + F4 – Close the currently selected window, if there is one.
  • Alt + F5 – Restore the current window to normal size.
  • Alt + F7 – Restore current window and allow it to be moved with the mouse or cursor keys.
  • Alt + F8 – Allow current normal window to be resized with the mouse or cursor keys.
  • Alt + F9 – Minimize current window.
  • Alt + F10 – Maximize current window.
  • Alt + Space – Open current window’s main menu.
  • Alt + PrtScr – Screen capture current window.
  • Alt + Tab – Move between application windows.
  • Shift + Alt + Tab – Move between application windows in reverse.
  • Shift + Alt + Up – Initiate window picker.
  • Shift + Ctrl + Alt + Left/Right/Up/Down – Move current window between desktops.
  • Ctrl + Alt + D – Minimise all windows and focus on desktop.

Some of the commands listed above – plus many others – can be reassigned to other keys, or vice versa, with the System / Preferences / Keyboard Shortcuts menu option.

Xbindkeys

More ambitious users can create their own keystroke macros by installing and using xbindkeys. This is a command-line program which looks up a hidden text file called root/.xbindkeysrc, and assigns the key macros listed in the file to the specified keys. The text file uses a relatively simple syntax, where the Terminal command to assign is listed first in double quotes, and the keystroke to assign it to follows on the next line, e.g.

“gksudo Nautilus”

control+shift + n

Key assignments can be altered or added to with any text editor, but the user will need root user privileges to save the file. Alternatively, modifications can be made via xbindkeys-config, a rough and ready graphic interface for the program. Power users can set up several different text files with different keystroke sets and alternate between them. Xbindkeys also recognises mouse button clicks.

Xbindkeys and xbindkeys-config can be installed in Ubuntu via the Synaptic Package Manager under System / Administration. They will not appear in the menu system and must be run from within a Terminal window. Closing the window will clear any keys assigned by the program.