YCLIMP
Yandex Command Line Interface Music Player
Loading...
Searching...
No Matches
HotKeyComponent Class Reference

The HotKeyComponent class - class to handle pre defined bindings. More...

#include <HotKeyComponent.hpp>

Public Member Functions

 HotKeyComponent (const std::string &ownerName)
 HotKeyComponent::HotKeyComponent.
void InsertBindingAction (const std::pair< std::string, std::function< void()> > &bindingAction)
void HandleUserEvent (Event event, bool ownerIsActive)
 Process global bindings. If ownerIsActive is true process local bindings as well.

Detailed Description

The HotKeyComponent class - class to handle pre defined bindings.

  • Class that suppose to have predefined bindings should have member variable with this class
  • Class that has predefined bindings should be mentioned in specific file inside projects with action and key pairs
  • Most, but not all the input is coming from predefined bindings, rawinput is also a thing
  • Has global and local bindings, Global always works; Local works only if owner selected/active somehow
  • Bindings member variables are tables with key=real keyboard key id and value = action name
  • BindingActions is a member variable that connect action name with functions that represent real actions

Constructor & Destructor Documentation

◆ HotKeyComponent()

HotKeyComponent::HotKeyComponent ( const std::string & ownerName)

HotKeyComponent::HotKeyComponent.

Parameters
ownerName- should match bindings file(for now it's KeyBindings.xml but could be changed)

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