kodi
xbmc
input
keyboard
interfaces
IKeyboardInputHandler.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 "input/keyboard/KeyboardTypes.h"
12
13
#include <stdint.h>
14
#include <string>
15
16
namespace
KODI
17
{
18
namespace
KEYBOARD
19
{
28
class
IKeyboardInputHandler
29
{
30
public
:
31
virtual
~
IKeyboardInputHandler
() =
default
;
32
38
virtual
std::string
ControllerID
()
const
= 0;
39
47
virtual
bool
HasKey
(
const
KeyName
& key)
const
= 0;
48
58
virtual
bool
OnKeyPress
(
const
KeyName
& key, Modifier mod, uint32_t unicode) = 0;
59
67
virtual
void
OnKeyRelease
(
const
KeyName
& key, Modifier mod, uint32_t unicode) = 0;
68
};
69
}
// namespace KEYBOARD
70
}
// namespace KODI
KODI::KEYBOARD::IKeyboardInputHandler::OnKeyPress
virtual bool OnKeyPress(const KeyName &key, Modifier mod, uint32_t unicode)=0
A key has been pressed.
KODI::KEYBOARD::KeyName
std::string KeyName
Name of a hardware-indendent symbol representing a key.
Definition:
KeyboardTypes.h:33
KODI::KEYBOARD::IKeyboardInputHandler
Interface for handling input events for keyboards.
Definition:
IKeyboardInputHandler.h:28
KODI::KEYBOARD::IKeyboardInputHandler::ControllerID
virtual std::string ControllerID() const =0
The add-on ID of the keyboard's controller profile.
KODI::KEYBOARD::IKeyboardInputHandler::HasKey
virtual bool HasKey(const KeyName &key) const =0
Return true if the input handler accepts the given key.
KODI
Definition:
AudioDecoder.h:18
KODI::KEYBOARD::IKeyboardInputHandler::OnKeyRelease
virtual void OnKeyRelease(const KeyName &key, Modifier mod, uint32_t unicode)=0
A key has been released.
Generated by
1.8.13