GTK Open Save File Dialog Keyboard Shortcuts

GTK Open Save File Dialog Keyboard Shortcuts (Hotkeys)

If you are a Linux user, you probably have some desktop environment installed along with various apps. Many popular apps in Linux are built using the GTK graphical toolkit. It implements controls and various dialogs. In this article, I would like to talk about the GTK open/save file dialog hotkeys.

GTK, formerly known as the GIMP Toolkit, is a multi-platform toolkit for creating graphical user interfaces. It comes with various widgets that allow you to create applications of any complexity, from simple single-window applications to large app suites.

GTK has bindings to many programming languages, including C++ and Python. Popular desktop environments like Gnome, Xfce, Cinnamon, and many other Linux projects use GTK to render the user interface.

GTK provides the following file dialog to open and save files:

GTK Open File Dialog

I heavily use the keyboard, so hotkeys play an important role in my daily tasks. Unfortunately, the file dialog hotkeys are not documented well, so it is hard to find the available keyboard shortcuts, especially for navigation. I would like to share the key sequences I use in this open/save dialog. Maybe they will save your time, too.

GTK Open Save File Dialog Keyboard Shortcuts (Hotkeys)

  • Left arrow - move the focus rectangle to the left area, to "places".
  • Right arrow - move the focus rectangle to the file listing on the right.
  • Up arrow - go up through the file list, then activate the breadcrumbs above the file listing.
  • Down arrow - activate the file listing/switch between "places".
  • Enter or Space - activate a "place"/bookmark/location on the left, or select a file on the right and close the dialog.
  • Ctrl + L  - In GTK 2 dialogs, it moves the focus to the location text box. In GTK 3 dialogs, it makes the location text box visible instead of the breadcrumbs bar.
  • Escape - close the dialog.
  • Alt + Home - jump to your user profile folder (which is your $HOME folder).
  • Ctrl + F - show or hide the search bar. You can also start typing in the file list to open it.

Speaking of the last hotkey, Ctrl + F, I would like to mention its insane behavior. When you accidentally open the search box by typing in the file list, you only want to close it and intuitively hit the Escape key. Sometimes it closes the whole dialog instead of the search box! This is very annoying. So I learned to always use the same Ctrl + F shortcut to leave search mode too.

When supported by your GTK theme, the dialog has keyboard accelerators, e.g. Alt +  some letter. They vary for different languages. Here are accelerators for English.

GTK Open Save File Dialog Keyboard Accelerators

  • Alt + O - open
  • Alt + C - cancel
  • Alt + S - save
  • Alt + V - view (where available)
  • Alt + R - rename (where available)
  • Alt + M - more options (where available)
  • Alt + H - enable More options > Show hidden files

That's all the hotkeys I know. If you know more or have a reliable keyboard shortcut source for GTK dialogs, do not hesitate to mention them in the comments below. Thanks in advance.

1 thought on “GTK Open Save File Dialog Keyboard Shortcuts

  1. Jason

    This site is called winaero.com, as in Windows. None of this Linux bullshit that only 1% of desktop/laptop users would be interested in. Fucking pathetic desktop operating system.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *