openMSX
|
#include <Keyboard.hh>
Public Types | |
enum class | Matrix { MSX , SVI , CVJOY , SEGA , NUM } |
Public Member Functions | |
Keyboard (MSXMotherBoard &motherBoard, Scheduler &scheduler, CommandController &commandController, EventDistributor &eventDistributor, MSXEventDistributor &msxEventDistributor, StateChangeDistributor &stateChangeDistributor, Matrix matrix, const DeviceConfig &config) | |
Constructs a new Keyboard object. | |
~Keyboard () | |
const MsxChar2Unicode & | getMsxChar2Unicode () const |
std::span< const uint8_t, KeyMatrixPosition::NUM_ROWS > | getKeys () const |
Returns a pointer to the current KeyBoard matrix. | |
void | transferHostKeyMatrix (const Keyboard &source) |
void | setFocus (bool newFocus, EmuTime::param time) |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Static Public Attributes | |
static constexpr int | MAX_KEYSYM = 0x150 |
Definition at line 45 of file Keyboard.hh.
|
strong |
Enumerator | |
---|---|
MSX | |
SVI | |
CVJOY | |
SEGA | |
NUM |
Definition at line 50 of file Keyboard.hh.
openmsx::Keyboard::Keyboard | ( | MSXMotherBoard & | motherBoard, |
Scheduler & | scheduler, | ||
CommandController & | commandController, | ||
EventDistributor & | eventDistributor, | ||
MSXEventDistributor & | msxEventDistributor, | ||
StateChangeDistributor & | stateChangeDistributor, | ||
Matrix | matrix, | ||
const DeviceConfig & | config | ||
) |
Constructs a new Keyboard object.
motherBoard | ref to the motherBoard |
scheduler | ref to the scheduler |
commandController | ref to the command controller |
eventDistributor | ref to the emu event distributor |
msxEventDistributor | ref to the user input event distributor |
stateChangeDistributor | ref to the state change distributor |
matrix | which system's keyboard matrix to use |
config | ref to the device configuration |
Definition at line 689 of file Keyboard.cc.
References ranges::fill(), openmsx::MSXEventDistributor::registerEventListener(), openmsx::MSXMotherBoard::registerKeyboard(), and openmsx::StateChangeDistributor::registerListener().
openmsx::Keyboard::~Keyboard | ( | ) |
Definition at line 739 of file Keyboard.cc.
References openmsx::MSXEventDistributor::unregisterEventListener(), and openmsx::StateChangeDistributor::unregisterListener().
std::span< const uint8_t, KeyMatrixPosition::NUM_ROWS > openmsx::Keyboard::getKeys | ( | ) | const |
Returns a pointer to the current KeyBoard matrix.
Definition at line 813 of file Keyboard.cc.
References openmsx::KeyMatrixPosition::NUM_ROWS, and xrange().
Referenced by openmsx::ImGuiKeyboard::paint(), and openmsx::ColecoJoystickIO::peekIO().
const MsxChar2Unicode & openmsx::Keyboard::getMsxChar2Unicode | ( | ) | const |
Definition at line 748 of file Keyboard.cc.
References openmsx::UnicodeKeymap::getMsxChars().
void openmsx::Keyboard::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 2040 of file Keyboard.cc.
References openmsx::UnicodeKeymap::KeyInfo::CAPS_MASK, openmsx::UnicodeKeymap::KeyInfo::CODE_MASK, and openmsx::UnicodeKeymap::KeyInfo::GRAPH_MASK.
void openmsx::Keyboard::setFocus | ( | bool | newFocus, |
EmuTime::param | time | ||
) |
Definition at line 850 of file Keyboard.cc.
void openmsx::Keyboard::transferHostKeyMatrix | ( | const Keyboard & | source | ) |
Definition at line 828 of file Keyboard.cc.
References openmsx::KeyMatrixPosition::NUM_ROWS, and xrange().
|
staticconstexpr |
Definition at line 49 of file Keyboard.hh.