diff --git a/server/CXWindowsPrimaryScreen.cpp b/server/CXWindowsPrimaryScreen.cpp index cd8d736a..2f1efaa9 100644 --- a/server/CXWindowsPrimaryScreen.cpp +++ b/server/CXWindowsPrimaryScreen.cpp @@ -5,6 +5,8 @@ #include #include #include +#define XK_MISCELLANY +#include // // CXWindowsPrimaryScreen @@ -54,6 +56,8 @@ void CXWindowsPrimaryScreen::run() const KeyID key = mapKey(&xevent.xkey); if (key != kKeyNone) { m_server->onKeyDown(key, mask); + if (key == XK_Caps_Lock && m_capsLockHalfDuplex) + m_server->onKeyUp(key, mask | KeyModifierCapsLock); } break; } @@ -65,6 +69,8 @@ void CXWindowsPrimaryScreen::run() const KeyModifierMask mask = mapModifier(xevent.xkey.state); const KeyID key = mapKey(&xevent.xkey); if (key != kKeyNone) { + if (key == XK_Caps_Lock && m_capsLockHalfDuplex) + m_server->onKeyDown(key, mask); m_server->onKeyUp(key, mask); } break; @@ -193,6 +199,11 @@ void CXWindowsPrimaryScreen::open(CServer* server) // open the display openDisplay(); + + // check for peculiarities + // FIXME -- may have to get these from some database + m_capsLockHalfDuplex = false; +// m_capsLockHalfDuplex = true; } void CXWindowsPrimaryScreen::close() diff --git a/server/CXWindowsPrimaryScreen.h b/server/CXWindowsPrimaryScreen.h index a0a1b9c8..562f9048 100644 --- a/server/CXWindowsPrimaryScreen.h +++ b/server/CXWindowsPrimaryScreen.h @@ -43,6 +43,8 @@ class CXWindowsPrimaryScreen : public CXWindowsScreen, public IPrimaryScreen { CServer* m_server; bool m_active; Window m_window; + + bool m_capsLockHalfDuplex; }; #endif