class Sp_Keyboard: public Sp_Control, public Stk_PassiveSender

a class to read information about the keyboard

Inheritance:


Public Methods

[more] Sp_Keyboard(Stk_Looper *)
constructor
[more]virtual ~Sp_Keyboard()
destructor
[more]int IsPresent() const
Is XQueryKeymap present on this sytem ?
[more]void ReadState()
Read the state of keyboard
[more]int Loop()
loop: functions wich generates events
[more]void Print() const
Print information about keyboard
[more]float getPositionAxeX() const
Get the position af axe X
[more]float getPositionAxeY() const
Get the position of axe Y
[more]float getButton1() const
Get State of button 1
[more]float getButton2() const
Get State of button 2
[more]float getButton3() const
Get State of button 3
[more]float getButton4() const
Get State of button 4


Inherited from Sp_Control:

Public Methods

ofloat getPositionAxeZ() const


Inherited from Stk_PassiveSender:

Public Methods

ovoid PostMessage(Stk_Message *)


Documentation

a class to read information about the keyboard. It uses XQueryKeymap to read state of keyboard. So a X11 window must be opened before to use it. This class allows keyboard to send Messages too. A message has two fields:
- keys: number of keys
- pressed: 0 eq no pressed 1 eq pressed
Let explain the protocol:
Key UP 100
Key DOWN 101
Key RIGHT 102
Key LEFT 103
Key ENTER 105
o Sp_Keyboard(Stk_Looper *)
constructor

ovirtual ~Sp_Keyboard()
destructor

oint IsPresent() const
Is XQueryKeymap present on this sytem ?

ovoid ReadState()
Read the state of keyboard

oint Loop()
loop: functions wich generates events

ovoid Print() const
Print information about keyboard

ofloat getPositionAxeX() const
Get the position af axe X

ofloat getPositionAxeY() const
Get the position of axe Y

ofloat getButton1() const
Get State of button 1

ofloat getButton2() const
Get State of button 2

ofloat getButton3() const
Get State of button 3

ofloat getButton4() const
Get State of button 4


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.