Gtk.ShortcutsWindow¶
Example¶
- Subclasses:
None
Methods¶
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|||
r/w |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the user uses a keybinding to close the window. |
|
Emitted when the user uses a keybinding to start a search. |
Fields¶
- Inherited:
Class Details¶
- class Gtk.ShortcutsWindow(*args, **kwargs)¶
- Bases:
- Abstract:
No
A
GtkShortcutsWindow
shows information about the keyboard shortcuts and gestures of an application.The shortcuts can be grouped, and you can have multiple sections in this window, corresponding to the major modes of your application.
Additionally, the shortcuts can be filtered by the current view, to avoid showing information that is not relevant in the current application context.
The recommended way to construct a
GtkShortcutsWindow
is with [class`Gtk`.Builder], by populating aGtkShortcutsWindow
with one or moreGtkShortcutsSection
objects, which containGtkShortcutsGroups
that in turn contain objects of classGtkShortcutsShortcut
.- A simple example:
This example has as single section. As you can see, the shortcut groups are arranged in columns, and spread across several pages if there are too many to find on a single page.
The .ui file for this example can be found here.
- An example with multiple views:
This example shows a
GtkShortcutsWindow
that has been configured to show only the shortcuts relevant to the “stopwatch” view.The .ui file for this example can be found here.
- An example with multiple sections:
This example shows a
GtkShortcutsWindow
with two sections, “Editor Shortcuts” and “Terminal Shortcuts”.The .ui file for this example can be found here.
- CSS nodes
GtkShortcutsWindow
has a single CSS node with the namewindow
and style class.shortcuts
.
Signal Details¶
- Gtk.ShortcutsWindow.signals.close(shortcuts_window)¶
- Signal Name:
close
- Flags:
- Parameters:
shortcuts_window (
Gtk.ShortcutsWindow
) – The object which received the signal
Emitted when the user uses a keybinding to close the window.
This is a keybinding signal.
The default binding for this signal is the Escape key.
- Gtk.ShortcutsWindow.signals.search(shortcuts_window)¶
- Signal Name:
search
- Flags:
- Parameters:
shortcuts_window (
Gtk.ShortcutsWindow
) – The object which received the signal
Emitted when the user uses a keybinding to start a search.
This is a keybinding signal.
The default binding for this signal is Control-F.
Property Details¶
- Gtk.ShortcutsWindow.props.section_name¶
-
The name of the section to show.
This should be the section-name of one of the
GtkShortcutsSection
objects that are in this shortcuts window.