class

Egui::HotkeyMap

Inherits Reference < Object

The app-global hotkey → action bindings, owned by the Context (ctx.hotkeys). One hotkey per action and one action per hotkey: rebinding an action moves it (the old hotkey is freed); binding a hotkey that is taken replaces the previous binding.

Instance methods

action_for(hotkey : Hotkey) : HotkeyAction | Nil
Source
bind(hotkey : Hotkey, action : HotkeyAction) : Nil
Source
bind(hotkey : String, action : HotkeyAction) : Nil
Source
bind(hotkey : String, action : String) : Nil
Source
dispatch(input : InputState) : Array(HotkeyAction)

Global dispatch (Context#begin_frame): fire every action whose hotkey was pressed this frame and claim the key so widgets don't also react to it. Modifier-press-only frames never match (the backend emits no key events for bare modifiers).

Source
each
Source
hotkey_for(action : HotkeyAction) : Hotkey | Nil
Source
size
Source
unbind(hotkey : Hotkey) : Nil
Source
unbind_action(action : HotkeyAction) : Nil

Remove whatever hotkey action is bound to (HotkeyEdit's Backspace/Delete "clear" gesture).

Source