Skip to content

Gtk.Window

class — extends Widget, Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager

A toplevel window which can contain other widgets.

<picture> <source srcset="window-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkWindow" src="window.png"> </picture>

Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,...).

GtkWindow as GtkBuildable

The GtkWindow implementation of the Buildable interface supports setting a child as the titlebar by specifying “titlebar” as the “type” attribute of a <child> element.

Shortcuts and Gestures

GtkWindow supports the following keyboard shortcuts:

  • <kbd>F10</kbd> activates the menubar, if present.
  • <kbd>Alt</kbd> makes the mnemonics visible while pressed.

The following signals have default keybindings:

Actions

GtkWindow defines a set of built-in actions:

  • default.activate activates the default widget.
  • window.minimize minimizes the window.
  • window.toggle-maximized maximizes or restores the window.
  • window.close closes the window.

CSS nodes

window.background [.csd / .solid-csd / .ssd] [.maximized / .fullscreen / .tiled]
├── <child>
╰── <titlebar child>.titlebar [.default-decoration]

GtkWindow has a main CSS node with name window and style class .background.

Style classes that are typically used with the main CSS node are .csd (when client-side decorations are in use), .solid-csd (for client-side decorations without invisible borders), .ssd (used by mutter when rendering server-side decorations). GtkWindow also represents window states with the following style classes on the main node: .maximized, .fullscreen, .tiled (when supported, also .tiled-top, .tiled-left, .tiled-right, .tiled-bottom).

GtkWindow subclasses often add their own discriminating style classes, such as .dialog, .popup or .tooltip.

Generally, some CSS properties don't make sense on the toplevel window node, such as margins or padding. When client-side decorations without invisible borders are in use (i.e. the .solid-csd style class is added to the main window node), the CSS border of the toplevel window is used for resize drags. In the .csd case, the shadow area outside of the window can be used to resize it.

GtkWindow adds the .titlebar and .default-decoration style classes to the widget that is added as a titlebar child.

Accessibility

GtkWindow uses the AccessibleRole.window role.

From GTK 4.12 to 4.18, it used the AccessibleRole.application role.

Constructors

new

@classmethod
def new(cls) -> Widget

Creates a new GtkWindow.

To get an undecorated window (without window borders), use Window.set_decorated.

All top-level windows created by this function are stored in an internal top-level window list. This list can be obtained from Window.list_toplevels. Due to GTK keeping a reference to the window internally, this function does not return a reference to the caller.

To delete a GtkWindow, call Window.destroy.

Methods

close

def close(self) -> None

Requests that the window is closed.

This is similar to what happens when a window manager close button is clicked.

This function can be used with close buttons in custom titlebars.

destroy

def destroy(self) -> None

Drops the internal reference GTK holds on toplevel windows.

fullscreen

def fullscreen(self) -> None

Asks to place the window in the fullscreen state.

Note that you shouldn’t assume the window is definitely fullscreen afterward, because other entities (e.g. the user or window manager) unfullscreen it again, and not all window managers honor requests to fullscreen windows.

If a window is not explicitly fullscreened or unfullscreened before it is shown, the initial state is at the window managers discretion.

You can track the result of this operation via the Gdk.Toplevel.state property, or by listening to notifications of the Window.fullscreened property.

fullscreen_on_monitor

def fullscreen_on_monitor(self, monitor: Gdk.Monitor) -> None

Asks to place the window in the fullscreen state on the given monitor.

Note that you shouldn't assume the window is definitely fullscreen afterward, or that the windowing system allows fullscreen windows on any given monitor.

You can track the result of this operation via the Gdk.Toplevel.state property, or by listening to notifications of the Window.fullscreened property.

Parameters:

  • monitor — which monitor to go fullscreen on

get_application

def get_application(self) -> Application | None

Gets the application object associated with the window.

get_child

def get_child(self) -> Widget | None

Gets the child widget of the window.

get_decorated

def get_decorated(self) -> bool

Returns whether the window has been set to have decorations.

get_default_size

def get_default_size(self) -> tuple[int, int]

Gets the default size of the window.

A value of 0 for the width or height indicates that a default size has not been explicitly set for that dimension, so the “natural” size of the window will be used.

This function is the recommended way for saving window state across restarts of applications.

get_default_widget

def get_default_widget(self) -> Widget | None

Returns the default widget for window.

get_deletable

def get_deletable(self) -> bool

Returns whether the window has been set to have a close button.

get_destroy_with_parent

def get_destroy_with_parent(self) -> bool

Returns whether the window will be destroyed with its transient parent.

get_focus

def get_focus(self) -> Widget | None

Retrieves the current focused widget within the window.

Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then gtk_widget_has_focus (widget) will not be false for the widget.

get_focus_visible

def get_focus_visible(self) -> bool

Gets whether “focus rectangles” are supposed to be visible.

get_gravity

def get_gravity(self) -> WindowGravity

Returns the gravity that is used when changing the window size programmatically.

get_group

def get_group(self) -> WindowGroup

Returns the group for the window.

If the window has no group, then the default group is returned.

get_handle_menubar_accel

def get_handle_menubar_accel(self) -> bool

Returns whether this window reacts to <kbd>F10</kbd> presses by activating a menubar it contains.

get_hide_on_close

def get_hide_on_close(self) -> bool

Returns whether the window will be hidden instead of destroyed when the close button is clicked.

get_icon_name

def get_icon_name(self) -> str | None

Returns the name of the themed icon for the window.

get_mnemonics_visible

def get_mnemonics_visible(self) -> bool

Gets whether mnemonics are supposed to be visible.

get_modal

def get_modal(self) -> bool

Returns whether the window is modal.

get_resizable

def get_resizable(self) -> bool

Gets whether the user can resize the window.

get_title

def get_title(self) -> str | None

Retrieves the title of the window.

get_titlebar

def get_titlebar(self) -> Widget | None

Returns the titlebar that has been set with Window.set_titlebar.

get_transient_for

def get_transient_for(self) -> Window | None

Fetches the transient parent for this window.

has_group

def has_group(self) -> bool

Returns whether the window has an explicit window group.

is_active

def is_active(self) -> bool

Returns whether the window is part of the current active toplevel.

The active toplevel is the window receiving keystrokes.

The return value is True if the window is active toplevel itself. You might use this function if you wanted to draw a widget differently in an active window from a widget in an inactive window.

is_fullscreen

def is_fullscreen(self) -> bool

Retrieves the current fullscreen state of the window.

Note that since fullscreening is ultimately handled by the window manager and happens asynchronously to an application request, you shouldn’t assume the return value of this function changing immediately (or at all), as an effect of calling Window.fullscreen or Window.unfullscreen.

If the window isn't yet mapped, the value returned will whether the initial requested state is fullscreen.

is_maximized

def is_maximized(self) -> bool

Retrieves the current maximized state of the window.

Note that since maximization is ultimately handled by the window manager and happens asynchronously to an application request, you shouldn’t assume the return value of this function changing immediately (or at all), as an effect of calling Window.maximize or Window.unmaximize.

If the window isn't yet mapped, the value returned will whether the initial requested state is maximized.

is_suspended

def is_suspended(self) -> bool

Retrieves the current suspended state of the window.

A window being suspended means it's currently not visible to the user, for example by being on a inactive workspace, minimized, obstructed.

maximize

def maximize(self) -> None

Asks to maximize the window, so that it fills the screen.

Note that you shouldn’t assume the window is definitely maximized afterward, because other entities (e.g. the user or window manager) could unmaximize it again, and not all window managers support maximization.

It’s permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.

If a window is not explicitly maximized or unmaximized before it is shown, the initial state is at the window managers discretion. For example, it might decide to maximize a window that almost fills the screen.

You can track the result of this operation via the Gdk.Toplevel.state property, or by listening to notifications on the Window.maximized property.

minimize

def minimize(self) -> None

Asks to minimize the window.

Note that you shouldn’t assume the window is definitely minimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could unminimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.

It’s permitted to call this function before showing a window, in which case the window will be minimized before it ever appears onscreen.

You can track result of this operation via the Gdk.Toplevel.state property.

present

def present(self) -> None

Presents a window to the user.

This may mean raising the window in the stacking order, unminimizing it, moving it to the current desktop and/or giving it the keyboard focus (possibly dependent on the user’s platform, window manager and preferences).

If window is hidden, this function also makes it visible.

present_with_time

def present_with_time(self, timestamp: int) -> None

:::warning Deprecated since 4.14 This API is deprecated. :::

Presents a window to the user in response to an user interaction.

See Window.present for more details.

The timestamp should be gathered when the window was requested to be shown (when clicking a link for example), rather than once the window is ready to be shown.

Parameters:

  • timestamp — the timestamp of the user interaction (typically a button or key press event) which triggered this call

set_application

def set_application(self, application: Application | None = ...) -> None

Sets or unsets the application object associated with the window.

The application will be kept alive for at least as long as it has any windows associated with it (see Gio.Application.hold for a way to keep it alive without windows).

Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the application to None.

This is equivalent to calling Application.remove_window and/or Application.add_window on the old/new applications as relevant.

Parameters:

  • application — a GtkApplication

set_child

def set_child(self, child: Widget | None = ...) -> None

Sets the child widget of the window.

Parameters:

  • child — the child widget

set_decorated

def set_decorated(self, setting: bool) -> None

Sets whether the window should be decorated.

By default, windows are decorated with a title bar, resize controls, etc. Some window managers allow GTK to disable these decorations, creating a borderless window. If you set the decorated property to false using this function, GTK will do its best to convince the window manager not to decorate the window. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling Widget.show.

On Windows, this function always works, since there’s no window manager policy involved.

Parameters:

  • setting — true to decorate the window

set_default_size

def set_default_size(self, width: int, height: int) -> None

Sets the default size of a window.

The default size of a window is the size that will be used if no other constraints apply.

The default size will be updated whenever the window is resized to reflect the new size, unless the window is forced to a size, like when it is maximized or fullscreened.

If the window’s minimum size request is larger than the default, the default will be ignored.

Setting the default size to a value <= 0 will cause it to be ignored and the natural size request will be used instead. It is possible to do this while the window is showing to "reset" it to its initial size.

Unlike Widget.set_size_request, which sets a size request for a widget and thus would keep users from shrinking the window, this function only sets the initial size, just as if the user had resized the window themselves. Users can still shrink the window again as they normally would. Setting a default size of -1 means to use the “natural” default size (the size request of the window).

If you use this function to reestablish a previously saved window size, note that the appropriate size to save is the one returned by Window.get_default_size. Using the window allocation directly will not work in all circumstances and can lead to growing or shrinking windows.

Parameters:

  • width — width in pixels, or -1 to unset the default width
  • height — height in pixels, or -1 to unset the default height

set_default_widget

def set_default_widget(self, default_widget: Widget | None = ...) -> None

Sets the default widget.

The default widget is the widget that is activated when the user presses <kbd>Enter</kbd> in a dialog (for example).

Parameters:

  • default_widget — widget to be the default

set_deletable

def set_deletable(self, setting: bool) -> None

Sets whether the window should be deletable.

By default, windows have a close button in the window frame. Some window managers allow GTK to disable this button. If you set the deletable property to false using this function, GTK will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling Widget.show.

On Windows, this function always works, since there’s no window manager policy involved.

Parameters:

  • setting — true to decorate the window as deletable

set_destroy_with_parent

def set_destroy_with_parent(self, setting: bool) -> None

Sets whether to destroy the window when the transient parent is destroyed.

This is useful for dialogs that shouldn’t persist beyond the lifetime of the main window they are associated with, for example.

Parameters:

  • setting — whether to destroy the window with its transient parent

set_display

def set_display(self, display: Gdk.Display) -> None

Sets the display where the window is displayed.

If the window is already mapped, it will be unmapped, and then remapped on the new display.

Parameters:

  • display — a display

set_focus

def set_focus(self, focus: Widget | None = ...) -> None

Sets the focus widget.

If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window. If focus is None, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use Widget.grab_focus instead of this function.

Parameters:

  • focus — the new focus widget

set_focus_visible

def set_focus_visible(self, setting: bool) -> None

Sets whether “focus rectangles” are supposed to be visible.

This property is maintained by GTK based on user input, and should not be set by applications.

Parameters:

  • setting — the new value

set_gravity

def set_gravity(self, gravity: WindowGravity | int) -> None

Sets the gravity that is used when changing the window size programmatically.

Parameters:

  • gravity — the new gravity

set_handle_menubar_accel

def set_handle_menubar_accel(self, handle_menubar_accel: bool) -> None

Sets whether this window should react to <kbd>F10</kbd> presses by activating a menubar it contains.

Parameters:

  • handle_menubar_accel — true to make window handle <kbd>F10</kbd>

set_hide_on_close

def set_hide_on_close(self, setting: bool) -> None

Sets whether clicking the close button will hide the window instead of destroying it.

Parameters:

  • setting — whether to hide the window when it is closed

set_icon_name

def set_icon_name(self, name: str | None = ...) -> None

Sets the icon for the window from a named themed icon.

See the docs for IconTheme for more details. On some platforms, the window icon is not used at all.

Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.

Parameters:

  • name — the name of the themed icon

set_mnemonics_visible

def set_mnemonics_visible(self, setting: bool) -> None

Sets whether mnemonics are supposed to be visible.

This property is maintained by GTK based on user input, and should not be set by applications.

Parameters:

  • setting — the new value

set_modal

def set_modal(self, modal: bool) -> None

Sets a window modal or non-modal.

Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use Window.set_transient_for to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.

Parameters:

  • modal — whether the window is modal

set_resizable

def set_resizable(self, resizable: bool) -> None

Sets whether the user can resize a window.

Windows are user resizable by default.

Parameters:

  • resizable — true if the user can resize this window

set_startup_id

def set_startup_id(self, startup_id: str) -> None

Sets the startup notification ID.

Startup notification identifiers are used by desktop environment to track application startup, to provide user feedback and other features. This function changes the corresponding property on the underlying GdkSurface.

Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling Window.present or any equivalent function generating a window map event.

This function is only useful on Wayland or X11, not with other GDK backends.

Parameters:

  • startup_id — a string with startup-notification identifier

set_title

def set_title(self, title: str | None = ...) -> None

Sets the title of the window.

The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the window manager so exactly how the title appears to users may vary according to a user’s exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.

Passing NULL does the same as setting the title to an empty string.

Parameters:

  • title — title of the window

set_titlebar

def set_titlebar(self, titlebar: Widget | None = ...) -> None

Sets a custom titlebar for the window.

A typical widget used here is HeaderBar, as it provides various features expected of a titlebar while allowing the addition of child widgets to it.

If you set a custom titlebar, GTK will do its best to convince the window manager not to put its own titlebar on the window. Depending on the system, this function may not work for a window that is already visible, so you set the titlebar before calling Widget.show.

Parameters:

  • titlebar — the widget to use as titlebar

set_transient_for

def set_transient_for(self, parent: Window | None = ...) -> None

Sets a transient parent for the window.

Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window. Dialog.new_with_buttons and other convenience functions in GTK will sometimes call this function on your behalf.

Passing NULL for parent unsets the current transient window.

On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.

Parameters:

  • parent — parent window

unfullscreen

def unfullscreen(self) -> None

Asks to remove the fullscreen state for the window, and return to its previous state.

Note that you shouldn’t assume the window is definitely not fullscreen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows; normally the window will end up restored to its normal state. Just don’t write code that crashes if not.

If a window is not explicitly fullscreened or unfullscreened before it is shown, the initial state is at the window managers discretion.

You can track the result of this operation via the Gdk.Toplevel.state property, or by listening to notifications of the Window.fullscreened property.

unmaximize

def unmaximize(self) -> None

Asks to unmaximize the window.

Note that you shouldn’t assume the window is definitely unmaximized afterward, because other entities (e.g. the user or window manager) maximize it again, and not all window managers honor requests to unmaximize.

If a window is not explicitly maximized or unmaximized before it is shown, the initial state is at the window managers discretion. For example, it might decide to maximize a window that almost fills the screen.

You can track the result of this operation via the Gdk.Toplevel.state property, or by listening to notifications on the Window.maximized property.

unminimize

def unminimize(self) -> None

Asks to unminimize the window.

Note that you shouldn’t assume the window is definitely unminimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could minimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.

You can track result of this operation via the Gdk.Toplevel.state property.

Static functions

get_default_icon_name

@staticmethod
def get_default_icon_name() -> str | None

Returns the fallback icon name for windows.

The returned string is owned by GTK and should not be modified. It is only valid until the next call to Window.set_default_icon_name.

get_toplevels

@staticmethod
def get_toplevels() -> Gio.ListModel

Returns the list of all existing toplevel windows.

If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets or add new ones, be aware that the list of toplevels will change and emit the "items-changed" signal.

list_toplevels

@staticmethod
def list_toplevels() -> list[Widget]

Returns the list of all existing toplevel windows.

The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call g_list_foreach (result, (GFunc)g_object_ref, NULL) first, and then unref all the widgets afterwards.

set_auto_startup_notification

@staticmethod
def set_auto_startup_notification(setting: bool) -> None

Sets whether the window should request startup notification.

By default, after showing the first window, GTK calls Gdk.Toplevel.set_startup_id. Call this function to disable the automatic startup notification. You might do this if your first window is a splash screen, and you want to delay notification until after your real main window has been shown, for example.

In that example, you would disable startup notification temporarily, show your splash screen, then re-enable it so that showing the main window would automatically result in notification.

Parameters:

  • setting — true to automatically do startup notification

set_default_icon_name

@staticmethod
def set_default_icon_name(name: str) -> None

Sets an icon to be used as fallback.

The fallback icon is used for windows that haven't had Window.set_icon_name called on them.

Parameters:

  • name — the name of the themed icon

set_interactive_debugging

@staticmethod
def set_interactive_debugging(enable: bool) -> None

Opens or closes the interactive debugger.

The debugger offers access to the widget hierarchy of the application and to useful debugging tools.

This function allows applications that already use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> (or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>) for their own key shortcuts to add a different shortcut to open the Inspector.

If you are not overriding the default key shortcuts for the Inspector, you should not use this function.

Parameters:

  • enable — true to enable interactive debugging

Virtual methods

do_activate_default

def do_activate_default(self) -> None

Activates the default widget for the window.

do_activate_focus

def do_activate_focus(self) -> None

Activates the current focused widget within the window.

do_close_request

def do_close_request(self) -> bool

Class handler for the Window.close-request signal.

do_enable_debugging

def do_enable_debugging(self, toggle: bool) -> bool

Class handler for the GtkWindow::enable-debugging keybinding signal.

do_keys_changed

def do_keys_changed(self) -> None

Signal gets emitted when the set of accelerators or mnemonics that are associated with window changes.

Properties

application

application: Application  # read/write

The GtkApplication associated with the window.

The application will be kept alive for at least as long as it has any windows associated with it (see Gio.Application.hold for a way to keep it alive without windows).

Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the this property to NULL.

child

child: Widget  # read/write

The child widget.

decorated

decorated: bool  # read/write

Whether the window should have a frame (also known as decorations).

default_height

default_height: int  # read/write

The default height of the window.

default_widget

default_widget: Widget  # read/write

The default widget.

default_width

default_width: int  # read/write

The default width of the window.

deletable

deletable: bool  # read/write

Whether the window frame should have a close button.

destroy_with_parent

destroy_with_parent: bool  # read/write

If this window should be destroyed when the parent is destroyed.

display

display: Gdk.Display  # read/write

The display that will display this window.

focus_visible

focus_visible: bool  # read/write

Whether 'focus rectangles' are currently visible in this window.

This property is maintained by GTK based on user input and should not be set by applications.

focus_widget

focus_widget: Widget  # read/write

The focus widget.

fullscreened

fullscreened: bool  # read/write

Whether the window is fullscreen.

Setting this property is the equivalent of calling Window.fullscreen or Window.unfullscreen; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.

gravity

gravity: WindowGravity | int  # read/write

The gravity to use when resizing the window programmatically.

Gravity describes which point of the window we want to keep fixed (meaning that the window will grow in the opposite direction). For example, a gravity of GTK_WINDOW_GRAVITY_TOP_RIGHT means that we want the to fix top right corner of the window.

handle_menubar_accel

handle_menubar_accel: bool  # read/write

Whether the window frame should handle <kbd>F10</kbd> for activating menubars.

hide_on_close

hide_on_close: bool  # read/write

If this window should be hidden instead of destroyed when the user clicks the close button.

icon_name

icon_name: str  # read/write

Specifies the name of the themed icon to use as the window icon.

See IconTheme for more details.

is_active

is_active: bool  # read-only

Whether the toplevel is the currently active window.

maximized

maximized: bool  # read/write

Whether the window is maximized.

Setting this property is the equivalent of calling Window.maximize or Window.unmaximize; either operation is asynchronous, which means you will need to connect to the ::notify signal in order to know whether the operation was successful.

mnemonics_visible

mnemonics_visible: bool  # read/write

Whether mnemonics are currently visible in this window.

This property is maintained by GTK based on user input, and should not be set by applications.

modal

modal: bool  # read/write

If true, the window is modal.

resizable

resizable: bool  # read/write

If true, users can resize the window.

startup_id

startup_id: str  # read/write

A write-only property for setting window's startup notification identifier.

suspended

suspended: bool  # read-only

Whether the window is suspended.

See Window.is_suspended for details about what suspended means.

title

title: str  # read/write

The title of the window.

titlebar

titlebar: Widget  # read/write

The titlebar widget.

transient_for

transient_for: Window  # read/write

The transient parent of the window.

Signals

activate-default

def on_activate_default(self) -> None: ...

Emitted when the user activates the default widget.

This is a keybinding signal.

The keybindings for this signal are all forms of the <kbd>Enter</kbd> key.

activate-focus

def on_activate_focus(self) -> None: ...

Emitted when the user activates the currently focused widget of window.

This is a keybinding signal.

The default binding for this signal is <kbd>␣</kbd>.

close-request

def on_close_request(self) -> bool: ...

Emitted when the user clicks on the close button of the window.

enable-debugging

def on_enable_debugging(self, toggle: bool) -> bool: ...

Emitted when the user enables or disables interactive debugging.

When toggle is true, interactive debugging is toggled on or off, when it is false, the debugger will be pointed at the widget under the pointer.

This is a keybinding signal.

The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>.

keys-changed

def on_keys_changed(self) -> None: ...

:::warning Deprecated since 4.10 This API is deprecated. :::

Emitted when the set of accelerators or mnemonics that are associated with the window changes.