CXWindowsKeyState Class Reference

X Windows key state. More...

#include <CXWindowsKeyState.h>

Inherits CKeyState.

Inheritance diagram for CXWindowsKeyState:

Inheritance graph
[legend]
Collaboration diagram for CXWindowsKeyState:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< int > CKeycodeList
 kGroupPoll = -1
 kGroupPollAndSet = -2
enum  { kGroupPoll = -1, kGroupPollAndSet = -2 }

Public Member Functions

 CXWindowsKeyState (Display *, bool useXKB)
 ~CXWindowsKeyState ()
virtual bool fakeCtrlAltDel ()
 Fake ctrl+alt+del.
virtual KeyModifierMask pollActiveModifiers () const
 Get the active modifiers from OS.
virtual SInt32 pollActiveGroup () const
 Get the active keyboard layout from OS.
virtual void pollPressedKeys (KeyButtonSet &pressedKeys) const
modifiers
void setActiveGroup (SInt32 group)
 Set active group.
void setAutoRepeat (const XKeyboardState &)
 Set the auto-repeat state.
accessors
KeyModifierMask mapModifiersFromX (unsigned int state) const
 Convert X modifier mask to synergy mask.
bool mapModifiersToX (KeyModifierMask, unsigned int &) const
 Convert synergy modifier mask to X mask.
void mapKeyToKeycodes (KeyID key, CKeycodeList &keycodes) const
 Convert synergy key to all corresponding X keycodes.

Protected Member Functions

virtual void getKeyMap (CKeyMap &keyMap)
 Get the keyboard map.
virtual void fakeKey (const Keystroke &keystroke)

Classes

struct  XKBModifierInfo

Detailed Description

X Windows key state.

A key state for X Windows.

Definition at line 39 of file CXWindowsKeyState.h.


Member Function Documentation

bool CXWindowsKeyState::fakeCtrlAltDel (  )  [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.

Implements CKeyState.

Definition at line 129 of file CXWindowsKeyState.cpp.

void CXWindowsKeyState::getKeyMap ( CKeyMap keyMap  )  [protected, virtual]

Get the keyboard map.

Fills keyMap with the current keyboard map.

Implements CKeyState.

Definition at line 182 of file CXWindowsKeyState.cpp.

void CXWindowsKeyState::mapKeyToKeycodes ( KeyID  key,
CKeycodeList keycodes 
) const

Convert synergy key to all corresponding X keycodes.

Converts the synergy key key to all of the keycodes that map to that key.

Definition at line 116 of file CXWindowsKeyState.cpp.

Referenced by CXWindowsScreen::registerHotKey().

KeyModifierMask CXWindowsKeyState::mapModifiersFromX ( unsigned int  state  )  const

Convert X modifier mask to synergy mask.

Returns the synergy modifier mask corresponding to the X modifier mask in state.

Definition at line 81 of file CXWindowsKeyState.cpp.

Referenced by CXWindowsScreen::handleSystemEvent(), and pollActiveModifiers().

bool CXWindowsKeyState::mapModifiersToX ( KeyModifierMask  ,
unsigned int &   
) const

Convert synergy modifier mask to X mask.

Converts the synergy modifier mask to the corresponding X modifier mask. Returns true if successful and false if any modifier could not be converted.

Definition at line 94 of file CXWindowsKeyState.cpp.

Referenced by CXWindowsScreen::registerHotKey().

SInt32 CXWindowsKeyState::pollActiveGroup (  )  const [virtual]

Get the active keyboard layout from OS.

Returns the active keyboard layout according to the operating system.

Implements CKeyState.

Definition at line 149 of file CXWindowsKeyState.cpp.

Referenced by fakeKey(), and setActiveGroup().

KeyModifierMask CXWindowsKeyState::pollActiveModifiers (  )  const [virtual]

Get the active modifiers from OS.

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

Implements CKeyState.

Definition at line 136 of file CXWindowsKeyState.cpp.

References mapModifiersFromX().

void CXWindowsKeyState::setActiveGroup ( SInt32  group  ) 

Set active group.

Sets the active group to group. This is the group returned by pollActiveGroup(). If group is kGroupPoll then pollActiveGroup() will really poll, but that's a slow operation on X11. If group is kGroupPollAndSet then this will poll the active group now and use it for future calls to pollActiveGroup().

Definition at line 59 of file CXWindowsKeyState.cpp.

References pollActiveGroup().

Referenced by CXWindowsKeyState(), and CXWindowsScreen::handleSystemEvent().

void CXWindowsKeyState::setAutoRepeat ( const XKeyboardState &   ) 

Set the auto-repeat state.

Sets the auto-repeat state.

Definition at line 75 of file CXWindowsKeyState.cpp.

Referenced by CXWindowsScreen::enable(), and CXWindowsScreen::enter().


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