Skip to content

Gtk.CellRendererAccel

class — extends CellRendererText

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

Renders a keyboard accelerator in a cell

GtkCellRendererAccel displays a keyboard accelerator (i.e. a key combination like Control + a). If the cell renderer is editable, the accelerator can be changed by simply typing the new combination.

Constructors

new

@classmethod
def new(cls) -> CellRenderer

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

Creates a new GtkCellRendererAccel.

Properties

accel_key

accel_key: int  # read/write

The keyval of the accelerator.

accel_mode

accel_mode: CellRendererAccelMode | int  # read/write

Determines if the edited accelerators are GTK accelerators. If they are, consumed modifiers are suppressed, only accelerators accepted by GTK are allowed, and the accelerators are rendered in the same way as they are in menus.

accel_mods

accel_mods: Gdk.ModifierType | int  # read/write

The modifier mask of the accelerator.

keycode

keycode: int  # read/write

The hardware keycode of the accelerator. Note that the hardware keycode is only relevant if the key does not have a keyval. Normally, the keyboard configuration should assign keyvals to all keys.

Signals

accel-cleared

def on_accel_cleared(self, path_string: str) -> None: ...

Gets emitted when the user has removed the accelerator.

accel-edited

def on_accel_edited(self, path_string: str, accel_key: int, accel_mods: Gdk.ModifierType, hardware_keycode: int) -> None: ...

Gets emitted when the user has selected a new accelerator.