openMSX
Public Member Functions | Static Public Attributes | Friends | List of all members
openmsx::Keyboard Class Reference

#include <Keyboard.hh>

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

Public Member Functions

 Keyboard (MSXMotherBoard &motherBoard, Scheduler &scheduler, CommandController &commandController, EventDistributor &eventDistributor, MSXEventDistributor &msxEventDistributor, StateChangeDistributor &stateChangeDistributor, string_ref keyboardType, bool hasKeypad, bool hasYesNoKeys, bool keyGhosting, bool keyGhostingSGCprotected, bool codeKanaLocks, bool graphLocks)
 Constructs a new Keyboard object.
virtual ~Keyboard ()
const bytegetKeys ()
 Returns a pointer to the current KeyBoard matrix.
void transferHostKeyMatrix (const Keyboard &source)
template<typename Archive >
void serialize (Archive &ar, unsigned version)

Static Public Attributes

static const unsigned NR_KEYROWS = 16

Friends

class KeyMatrixUpCmd
class KeyMatrixDownCmd
class KeyInserter
class CapsLockAligner
class MsxKeyEventQueue

Additional Inherited Members

- Private Member Functions inherited from openmsx::MSXEventListener
virtual ~MSXEventListener ()
virtual void signalEvent (const std::shared_ptr< const Event > &event, EmuTime::param time)=0
 This method gets called when an event you are subscribed to occurs.
 MSXEventListener ()
- Private Member Functions inherited from openmsx::StateChangeListener
virtual void signalStateChange (const std::shared_ptr< StateChange > &event)=0
 This method gets called when a StateChange event occurs.
virtual void stopReplay (EmuTime::param time)=0
 This method gets called when we switch from replayed events to live events.
 StateChangeListener ()
virtual ~StateChangeListener ()
- Private Member Functions inherited from openmsx::Schedulable
virtual void executeUntil (EmuTime::param time, int userData)=0
 When the previously registered syncPoint is reached, this method gets called.
virtual void schedulerDeleted ()
 Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still registered.
SchedulergetScheduler () const
EmuTime::param getCurrentTime () const
 Convenience method: This is the same as getScheduler().getCurrentTime().
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 Schedulable (Scheduler &scheduler)
virtual ~Schedulable ()
void setSyncPoint (EmuTime::param timestamp, int userData=0)
bool removeSyncPoint (int userData=0)
void removeSyncPoints ()
bool pendingSyncPoint (int userData=0) const

Detailed Description

Definition at line 32 of file Keyboard.hh.

Constructor & Destructor Documentation

openmsx::Keyboard::Keyboard ( MSXMotherBoard motherBoard,
Scheduler scheduler,
CommandController commandController,
EventDistributor eventDistributor,
MSXEventDistributor msxEventDistributor,
StateChangeDistributor stateChangeDistributor,
string_ref  keyboardType,
bool  hasKeypad,
bool  hasYesNoKeys,
bool  keyGhosting,
bool  keyGhostingSGCprotected,
bool  codeKanaLocks,
bool  graphLocks 
)

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
keyboardTypecontains filename extension of unicode keymap file
hasKeypadturn MSX keypad on/off
hasYesNoKeysthis keyboard has (Japanese) Yes/No keys
keyGhostingturn keyGhosting on/off
keyGhostingSGCprotectedShift, Graph and Code are keyGhosting protected
codeKanaLocksCodeKana key behave as a lock key on this machine
graphLocksGraph key behave as a lock key on this machine

Definition at line 205 of file Keyboard.cc.

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

openmsx::Keyboard::~Keyboard ( )
virtual

Member Function Documentation

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

Returns a pointer to the current KeyBoard matrix.

Definition at line 268 of file Keyboard.cc.

References NR_KEYROWS.

Referenced by openmsx::KeybDebuggable::read().

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

Definition at line 1384 of file Keyboard.cc.

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

Definition at line 282 of file Keyboard.cc.

References NR_KEYROWS.

Friends And Related Function Documentation

friend class CapsLockAligner
friend

Definition at line 113 of file Keyboard.hh.

friend class KeyInserter
friend

Definition at line 112 of file Keyboard.hh.

friend class KeyMatrixDownCmd
friend

Definition at line 111 of file Keyboard.hh.

friend class KeyMatrixUpCmd
friend

Definition at line 110 of file Keyboard.hh.

friend class MsxKeyEventQueue
friend

Definition at line 114 of file Keyboard.hh.

Member Data Documentation

const unsigned openmsx::Keyboard::NR_KEYROWS = 16
static

Definition at line 36 of file Keyboard.hh.

Referenced by getKeys(), and transferHostKeyMatrix().


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