IKeyState Class Reference

Key state interface. More...

#include <IKeyState.h>

Inherits IInterface.

Inherited by CKeyState, and IPlatformScreen.

Inheritance diagram for IKeyState:

Inheritance graph
[legend]
Collaboration diagram for IKeyState:

Collaboration graph
[legend]
List of all members.

accessors

virtual bool isKeyDown (KeyButton) const =0
 Test if key is pressed.
virtual KeyModifierMask getActiveModifiers () const =0
 Get the active modifiers.
virtual KeyModifierMask pollActiveModifiers () const =0
 Get the active modifiers from OS.
virtual SInt32 pollActiveGroup () const =0
 Get the active keyboard layout from OS.
virtual void pollPressedKeys (KeyButtonSet &pressedKeys) const =0
 Get the keys currently pressed from OS.
static CEvent::Type getKeyDownEvent ()
 Get key down event type. Event data is CKeyInfo*, count == 1.
static CEvent::Type getKeyUpEvent ()
 Get key up event type. Event data is CKeyInfo*, count == 1.
static CEvent::Type getKeyRepeatEvent ()
 Get key repeat event type. Event data is CKeyInfo*.

Public Types

typedef std::set< KeyButton > KeyButtonSet
 kNumButtons = 0x200
enum  { kNumButtons = 0x200 }

Public Member Functions

manipulators
virtual void updateKeyMap ()=0
 Update the keyboard map.
virtual void updateKeyState ()=0
 Update the key state.
virtual void setHalfDuplexMask (KeyModifierMask)=0
 Set half-duplex mask.
virtual void fakeKeyDown (KeyID id, KeyModifierMask mask, KeyButton button)=0
 Fake a key press.
virtual void fakeKeyRepeat (KeyID id, KeyModifierMask mask, SInt32 count, KeyButton button)=0
 Fake a key repeat.
virtual void fakeKeyUp (KeyButton button)=0
 Fake a key release.
virtual void fakeAllKeysUp ()=0
 Fake key releases for all fake pressed keys.
virtual bool fakeCtrlAltDel ()=0
 Fake ctrl+alt+del.

Classes

class  CKeyInfo
 Key event data. More...

Detailed Description

Key state interface.

This interface provides access to set and query the keyboard state and to synthesize key events.

Definition at line 29 of file IKeyState.h.


Member Function Documentation

virtual void IKeyState::fakeAllKeysUp (  )  [pure virtual]

Fake key releases for all fake pressed keys.

Synthesizes a key release event for every key that is synthetically pressed and updates the key state.

Implemented in CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::fakeAllKeysUp().

virtual bool IKeyState::fakeCtrlAltDel (  )  [pure virtual]

Fake ctrl+alt+del.

Synthesize a press of ctrl+alt+del. Return true if processing is complete and false if normal key processing should continue.

Implemented in CMSWindowsKeyState, COSXKeyState, CXWindowsKeyState, CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::fakeCtrlAltDel().

virtual void IKeyState::fakeKeyDown ( KeyID  id,
KeyModifierMask  mask,
KeyButton  button 
) [pure virtual]

Fake a key press.

Synthesizes a key press event and updates the key state.

Implemented in CMSWindowsKeyState, CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::fakeKeyDown().

virtual void IKeyState::fakeKeyRepeat ( KeyID  id,
KeyModifierMask  mask,
SInt32  count,
KeyButton  button 
) [pure virtual]

Fake a key repeat.

Synthesizes a key repeat event and updates the key state.

Implemented in CMSWindowsKeyState, CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::fakeKeyRepeat().

virtual void IKeyState::fakeKeyUp ( KeyButton  button  )  [pure virtual]

Fake a key release.

Synthesizes a key release event and updates the key state.

Implemented in CMSWindowsScreen, CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::fakeKeyUp().

virtual KeyModifierMask IKeyState::getActiveModifiers (  )  const [pure virtual]

Get the active modifiers.

Returns the modifiers that are currently active according to our shadowed state.

Implemented in CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::getActiveModifiers().

virtual bool IKeyState::isKeyDown ( KeyButton   )  const [pure virtual]

Test if key is pressed.

Returns true iff the given key is down. Half-duplex toggles always return false.

Implemented in CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::isKeyDown().

virtual SInt32 IKeyState::pollActiveGroup (  )  const [pure virtual]

Get the active keyboard layout from OS.

Returns the active keyboard layout according to the operating system.

Implemented in CMSWindowsKeyState, COSXKeyState, CXWindowsKeyState, CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::pollActiveGroup().

virtual KeyModifierMask IKeyState::pollActiveModifiers (  )  const [pure virtual]

Get the active modifiers from OS.

Returns the modifiers that are currently active according to the operating system.

Implemented in CMSWindowsKeyState, COSXKeyState, CXWindowsKeyState, CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::pollActiveModifiers().

virtual void IKeyState::pollPressedKeys ( KeyButtonSet pressedKeys  )  const [pure virtual]

Get the keys currently pressed from OS.

Adds any keys that are currently pressed according to the operating system to pressedKeys.

Referenced by CPlatformScreen::pollPressedKeys().

virtual void IKeyState::setHalfDuplexMask ( KeyModifierMask   )  [pure virtual]

Set half-duplex mask.

Sets which modifier toggle keys are half-duplex. A half-duplex toggle key doesn't report a key release when toggled on and doesn't report a key press when toggled off.

Implemented in CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::setHalfDuplexMask().

virtual void IKeyState::updateKeyMap (  )  [pure virtual]

Update the keyboard map.

Causes the key state to get updated to reflect the current keyboard mapping.

Implemented in CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::updateKeyMap().

virtual void IKeyState::updateKeyState (  )  [pure virtual]

Update the key state.

Causes the key state to get updated to reflect the physical keyboard state.

Implemented in CKeyState, CPlatformScreen, and IPlatformScreen.

Referenced by CPlatformScreen::updateKeyState().


The documentation for this class was generated from the following files:
Generated on Fri Nov 6 00:19:21 2009 for synergy-plus by  doxygen 1.4.7