Represents a keyboard shortcut for editor actions.
More...
#include "donner/editor/TextEditor.h"
Represents a keyboard shortcut for editor actions.
A shortcut consists of up to two keys and optional modifier keys.
◆ Shortcut() [1/2]
Constructs a shortcut with a single key and optional modifiers.
- Parameters
-
| k | Primary key. |
| m | Modifier flags combined using bitwise OR. |
◆ Shortcut() [2/2]
Constructs a shortcut with two keys and optional modifiers.
- Parameters
-
| k1 | Primary key. |
| k2 | Secondary key. |
| m | Modifier flags combined using bitwise OR. |
◆ matches()
| bool donner::editor::Shortcut::matches |
( |
const ImGuiIO & | io, |
|
|
bool | repeat = true ) const |
|
inline |
Checks if this shortcut matches the current input state.
Compares the set keys and modifiers against the keys currently pressed.
- Parameters
-
| io | Reference to ImGuiIO containing the current keyboard state. |
| repeat | Whether a key held past ImGui's key-repeat delay matches again. The editor draws frames only on events, so a single frame can outlast that delay while the key is down. |
- Returns
- true if the shortcut matches, false otherwise.
The documentation for this struct was generated from the following file: