xbmc
IKeyboardInputHandler.h
1 /*
2  * Copyright (C) 2017-2018 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 "input/keyboard/KeyboardTypes.h"
12 
13 #include <stdint.h>
14 #include <string>
15 
16 namespace KODI
17 {
18 namespace KEYBOARD
19 {
28 {
29 public:
30  virtual ~IKeyboardInputHandler() = default;
31 
37  virtual std::string ControllerID() const = 0;
38 
46  virtual bool HasKey(const KeyName& key) const = 0;
47 
57  virtual bool OnKeyPress(const KeyName& key, Modifier mod, uint32_t unicode) = 0;
58 
66  virtual void OnKeyRelease(const KeyName& key, Modifier mod, uint32_t unicode) = 0;
67 };
68 } // namespace KEYBOARD
69 } // namespace KODI
virtual bool OnKeyPress(const KeyName &key, Modifier mod, uint32_t unicode)=0
A key has been pressed.
Interface for handling input events for keyboards.
Definition: IKeyboardInputHandler.h:27
virtual std::string ControllerID() const =0
The add-on ID of the keyboard&#39;s controller profile.
virtual bool HasKey(const KeyName &key) const =0
Return true if the input handler accepts the given key.
Controller configuration window.
Definition: AudioDecoder.h:18
virtual void OnKeyRelease(const KeyName &key, Modifier mod, uint32_t unicode)=0
A key has been released.