openMSX
|
#include <Keyboard.hh>
Public Types | |
enum | MatrixType { MATRIX_MSX , MATRIX_SVI , MATRIX_CVJOY , MATRIX_SEGA } |
Public Member Functions | |
Keyboard (MSXMotherBoard &motherBoard, Scheduler &scheduler, CommandController &commandController, EventDistributor &eventDistributor, MSXEventDistributor &msxEventDistributor, StateChangeDistributor &stateChangeDistributor, MatrixType matrix, const DeviceConfig &config) | |
Constructs a new Keyboard object. More... | |
~Keyboard () | |
const MsxChar2Unicode & | getMsxChar2Unicode () const |
std::span< const uint8_t, KeyMatrixPosition::NUM_ROWS > | getKeys () const |
Returns a pointer to the current KeyBoard matrix. More... | |
void | transferHostKeyMatrix (const Keyboard &source) |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Static Public Attributes | |
static constexpr int | MAX_KEYSYM = 0x150 |
Definition at line 35 of file Keyboard.hh.
Enumerator | |
---|---|
MATRIX_MSX | |
MATRIX_SVI | |
MATRIX_CVJOY | |
MATRIX_SEGA |
Definition at line 40 of file Keyboard.hh.
openmsx::Keyboard::Keyboard | ( | MSXMotherBoard & | motherBoard, |
Scheduler & | scheduler, | ||
CommandController & | commandController, | ||
EventDistributor & | eventDistributor, | ||
MSXEventDistributor & | msxEventDistributor, | ||
StateChangeDistributor & | stateChangeDistributor, | ||
MatrixType | 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 299 of file Keyboard.cc.
References ranges::fill(), openmsx::MSXMotherBoard::getReverseManager(), openmsx::MSXEventDistributor::registerEventListener(), openmsx::ReverseManager::registerKeyboard(), and openmsx::StateChangeDistributor::registerListener().
openmsx::Keyboard::~Keyboard | ( | ) |
Definition at line 349 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 420 of file Keyboard.cc.
References openmsx::KeyMatrixPosition::NUM_ROWS, and xrange().
const MsxChar2Unicode & openmsx::Keyboard::getMsxChar2Unicode | ( | ) | const |
Definition at line 355 of file Keyboard.cc.
References openmsx::UnicodeKeymap::getMsxChars().
void openmsx::Keyboard::serialize | ( | Archive & | ar, |
unsigned | version | ||
) |
Definition at line 1614 of file Keyboard.cc.
References openmsx::UnicodeKeymap::KeyInfo::CAPS_MASK, openmsx::UnicodeKeymap::KeyInfo::CODE_MASK, and openmsx::UnicodeKeymap::KeyInfo::GRAPH_MASK.
void openmsx::Keyboard::transferHostKeyMatrix | ( | const Keyboard & | source | ) |
Definition at line 435 of file Keyboard.cc.
References openmsx::KeyMatrixPosition::NUM_ROWS, and xrange().
|
staticconstexpr |
Definition at line 39 of file Keyboard.hh.