| 1 |
/* |
| 2 |
* Copyright (C) 2015-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 |
class CKey; |
| 12 |
|
| 13 |
namespace KODI |
| 14 |
{ |
| 15 |
namespace KEYBOARD |
| 16 |
{ |
| 17 |
/*! |
| 18 |
* \ingroup keyboard |
| 19 |
* |
| 20 |
* \brief Interface for handling keyboard events |
| 21 |
*/ |
| 22 |
class IKeyboardDriverHandler |
| 23 |
{ |
| 24 |
public: |
| 25 |
virtual ~IKeyboardDriverHandler() = default; |
| 26 |
|
| 27 |
/*! |
| 28 |
* \brief A key has been pressed |
| 29 |
* |
| 30 |
* \param key The pressed key |
| 31 |
* |
| 32 |
* \return True if the event was handled, false otherwise |
| 33 |
*/ |
| 34 |
virtual bool OnKeyPress(const CKey& key) = 0; |
| 35 |
|
| 36 |
/*! |
| 37 |
* \brief A key has been released |
| 38 |
* |
| 39 |
* \param key The released key |
| 40 |
*/ |
| 41 |
virtual void OnKeyRelease(const CKey& key) = 0; |
| 42 |
}; |
| 43 |
} // namespace KEYBOARD |
| 44 |
} // namespace KODI |