openMSX
Classes | Public Types | Public Member Functions | List of all members
openmsx::Keyboard Class Referencefinal

#include <Keyboard.hh>

Inheritance diagram for openmsx::Keyboard:
Inheritance graph
[legend]
Collaboration diagram for openmsx::Keyboard:
Collaboration graph
[legend]

Public Types

enum  MatrixType { MATRIX_MSX, MATRIX_SVI, MATRIX_CVJOY }
 

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 bytegetKeys () const
 Returns a pointer to the current KeyBoard matrix. More...
 
void transferHostKeyMatrix (const Keyboard &source)
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Detailed Description

Definition at line 35 of file Keyboard.hh.

Member Enumeration Documentation

◆ MatrixType

Enumerator
MATRIX_MSX 
MATRIX_SVI 
MATRIX_CVJOY 

Definition at line 38 of file Keyboard.hh.

Constructor & Destructor Documentation

◆ Keyboard()

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.

Parameters
motherBoardref to the motherBoard
schedulerref to the scheduler
commandControllerref to the command controller
eventDistributorref to the emu event distributor
msxEventDistributorref to the user input event distributor
stateChangeDistributorref to the state change distributor
matrixwhich system's keyboard matrix to use
configref to the device configuration

Definition at line 100 of file Keyboard.cc.

References ranges::fill(), openmsx::MSXMotherBoard::getReverseManager(), openmsx::MSXEventDistributor::registerEventListener(), openmsx::ReverseManager::registerKeyboard(), and openmsx::StateChangeDistributor::registerListener().

◆ ~Keyboard()

openmsx::Keyboard::~Keyboard ( )

Member Function Documentation

◆ getKeys()

const byte * openmsx::Keyboard::getKeys ( ) const

Returns a pointer to the current KeyBoard matrix.

Definition at line 213 of file Keyboard.cc.

References openmsx::KeyMatrixPosition::NUM_ROWS.

Referenced by openmsx::SVIPPI::writeIO(), and openmsx::MSXPPI::writeIO().

◆ serialize()

template<typename Archive >
void openmsx::Keyboard::serialize ( Archive &  ar,
unsigned  version 
)

◆ transferHostKeyMatrix()

void openmsx::Keyboard::transferHostKeyMatrix ( const Keyboard source)

The documentation for this class was generated from the following files: