kodi
IKeymapHandler.h
1 /*
2  * Copyright (C) 2017-2024 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <set>
12 #include <string>
13 
14 namespace KODI
15 {
16 namespace KEYMAP
17 {
24 {
25 public:
26  virtual ~IKeymapHandler() = default;
27 
35  virtual bool HotkeysPressed(const std::set<std::string>& keyNames) const = 0;
36 
43  virtual std::string GetLastPressed() const = 0;
44 
50  virtual void OnPress(const std::string& keyName) = 0;
51 };
52 } // namespace KEYMAP
53 } // namespace KODI
virtual bool HotkeysPressed(const std::set< std::string > &keyNames) const =0
Get the pressed state of the given keys.
virtual void OnPress(const std::string &keyName)=0
Called when a key has emitted an action after bring pressed.
Definition: AudioDecoder.h:18
Interface for a class working with a keymap.
Definition: IKeymapHandler.h:23
virtual std::string GetLastPressed() const =0
Get the key name of the last button pressed.