HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
hi::v1::keyboard_bindings Class Reference

Public Member Functions

void add_system_binding (keyboard_key key, gui_event_type command) noexcept
 
void add_ignored_binding (keyboard_key key, gui_event_type command) noexcept
 
void add_user_binding (keyboard_key key, gui_event_type command) noexcept
 
generator< gui_eventtranslate (gui_event event) const noexcept
 translate a key press in the empty-context to a command.
 
void clear () noexcept
 Clear all bindings.
 
void load_bindings (std::filesystem::path const &path, bool system_binding=false)
 Load bindings from a JSON file.
 

Static Public Member Functions

static keyboard_bindingsglobal () noexcept
 

Member Function Documentation

◆ clear()

void hi::v1::keyboard_bindings::clear ( )
inlinenoexcept

Clear all bindings.

When loading a new user-binding file, one should do a clear() followed by loading the system bindings, followed by the user bindings.

◆ load_bindings()

void hi::v1::keyboard_bindings::load_bindings ( std::filesystem::path const & path,
bool system_binding = false )
inline

Load bindings from a JSON file.

◆ translate()

generator< gui_event > hi::v1::keyboard_bindings::translate ( gui_event event) const
inlinenoexcept

translate a key press in the empty-context to a command.

Parameters
eventThe event to look up in the bindings.
Returns
The event list translated from the keyboard event.

The documentation for this class was generated from the following file: