- Timestamp:
- Aug 20, 2006, 9:49:41 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/synergy/lib/platform/CPMKeyState.cpp
r2768 r2773 115 115 m_eventTarget(eventTarget), 116 116 m_fakeMsg(fakeMsg), 117 m_lastButton(0),117 m_lastButton(0), 118 118 m_fixTimer(NULL), 119 119 m_lastDown(kKeyNone), … … 122 122 m_originalSavedModifiers(0) 123 123 { 124 LOG((CLOG_DEBUG "CPMKeyState:"));124 LOG((CLOG_DEBUG2 "CPMKeyState:")); 125 125 } 126 126 127 127 CPMKeyState::~CPMKeyState() 128 128 { 129 LOG((CLOG_DEBUG "~CPMKeyState:"));129 LOG((CLOG_DEBUG2 "~CPMKeyState:")); 130 130 disable(); 131 131 } … … 134 134 CPMKeyState::disable() 135 135 { 136 LOG((CLOG_DEBUG "disable:"));136 LOG((CLOG_DEBUG2 "disable:")); 137 137 if (m_fixTimer != NULL) { 138 138 EVENTQUEUE->removeHandler(CEvent::kTimer, m_fixTimer); … … 146 146 CPMKeyState::virtualKeyToButton(ULONG virtualKey) const 147 147 { 148 LOG((CLOG_DEBUG "virtualKeyToButton:"));148 LOG((CLOG_DEBUG2 "virtualKeyToButton:")); 149 149 return m_virtualKeyToButton[virtualKey & 0xffu]; 150 150 } … … 153 153 CPMKeyState::testAutoRepeat(bool press, bool isRepeat, KeyButton button) 154 154 { 155 LOG((CLOG_DEBUG "testAutoRepeat:"));155 LOG((CLOG_DEBUG2 "testAutoRepeat:")); 156 156 if (!isRepeat) 157 157 isRepeat = press && button == m_lastDown && button != kKeyNone; … … 163 163 CPMKeyState::saveModifiers() 164 164 { 165 LOG((CLOG_DEBUG "saveModifiers:"));165 LOG((CLOG_DEBUG2 "saveModifiers:")); 166 166 m_savedModifiers = getActiveModifiers(); 167 167 m_originalSavedModifiers = m_savedModifiers; … … 171 171 CPMKeyState::useSavedModifiers(bool enable) 172 172 { 173 LOG((CLOG_DEBUG "useSavedModifiers:"));173 LOG((CLOG_DEBUG2 "useSavedModifiers:")); 174 174 if (enable != m_useSavedModifiers) { 175 175 m_useSavedModifiers = enable; … … 185 185 CPMKeyState::mapKeyFromEvent(USHORT fsFlags, UCHAR ucRepeat, UCHAR ucScanCode, USHORT usch, USHORT usvk, KeyModifierMask* maskOut) const 186 186 { 187 LOG((CLOG_DEBUG "mapKeyFromEvent:"));187 LOG((CLOG_DEBUG2 "mapKeyFromEvent:")); 188 188 #if 0 /** @todo */ 189 189 static const KeyModifierMask s_controlAlt = KeyModifierControl | KeyModifierAlt; … … 241 241 CPMKeyState::mapKeyToVirtualKey(KeyID key) const 242 242 { 243 LOG((CLOG_DEBUG "mapKeyToVirtualKey:"));243 LOG((CLOG_DEBUG2 "mapKeyToVirtualKey:")); 244 244 if (key == kKeyNone) 245 245 return 0; … … 256 256 SInt32 count, KeyButton button) 257 257 { 258 LOG((CLOG_DEBUG "sendKeyEvent:"));258 LOG((CLOG_DEBUG2 "sendKeyEvent:")); 259 259 if (press || isAutoRepeat) { 260 260 // send key … … 278 278 CPMKeyState::fakeKeyDown(KeyID id, KeyModifierMask mask, KeyButton button) 279 279 { 280 LOG((CLOG_DEBUG "fakeKeyDown: id=%#x mask=%#x button=%#x", id, mask, button));280 LOG((CLOG_DEBUG2 "fakeKeyDown: id=%#x mask=%#x button=%#x", id, mask, button)); 281 281 CKeyState::fakeKeyDown(id, mask, button); 282 282 } … … 285 285 CPMKeyState::fakeKeyRepeat(KeyID id, KeyModifierMask mask, SInt32 count, KeyButton button) 286 286 { 287 LOG((CLOG_DEBUG "fakeKeyRepeat: id=%#x mask=%#x count=%d button=%#x", id, mask, count, button));287 LOG((CLOG_DEBUG2 "fakeKeyRepeat: id=%#x mask=%#x count=%d button=%#x", id, mask, count, button)); 288 288 CKeyState::fakeKeyRepeat(id, mask, count, button); 289 289 } … … 292 292 CPMKeyState::fakeCtrlAltDel() 293 293 { 294 LOG((CLOG_DEBUG "fakeCtrlAltDel:"));294 LOG((CLOG_DEBUG2 "fakeCtrlAltDel:")); 295 295 fakeKeyDown(kKeyDelete, KeyModifierControl | KeyModifierAlt, virtualKeyToButton(VK_DELETE)); 296 296 } … … 299 299 CPMKeyState::pollActiveModifiers() const 300 300 { 301 LOG((CLOG_DEBUG "pollActiveModifiers:"));301 LOG((CLOG_DEBUG2 "pollActiveModifiers:")); 302 302 KeyModifierMask state = 0; 303 303 … … 323 323 CPMKeyState::pollActiveGroup() const 324 324 { 325 LOG((CLOG_DEBUG "pollActiveGroup:"));325 LOG((CLOG_DEBUG2 "pollActiveGroup:")); 326 326 #if 0 327 327 HKL hkl = GetKeyboardLayout(targetThread); … … 343 343 CPMKeyState::pollPressedKeys(KeyButtonSet& pressedKeys) const 344 344 { 345 LOG((CLOG_DEBUG "pollPressedKeys:"));345 LOG((CLOG_DEBUG2 "pollPressedKeys:")); 346 346 BYTE keyState[256]; 347 347 if (WinSetKeyboardStateTable(HWND_DESKTOP, keyState, FALSE)) { … … 454 454 CPMKeyState::getKeyMap(CKeyMap& keyMap) 455 455 { 456 LOG((CLOG_DEBUG "getKeyMap:"));456 LOG((CLOG_DEBUG2 "getKeyMap:")); 457 457 #if 0 458 458 // update keyboard groups … … 828 828 CPMKeyState::fakeKey(const Keystroke& keystroke) 829 829 { 830 LOG((CLOG_DEBUG "fakeKey:"));830 LOG((CLOG_DEBUG2 "fakeKey:")); 831 831 switch (keystroke.m_type) { 832 832 case Keystroke::kButton: { 833 LOG((CLOG_DEBUG 1" %03x (%08llx) %s%s", keystroke.m_data.m_button.m_button, keystroke.m_data.m_button.m_client,833 LOG((CLOG_DEBUG2 " %03x (%08llx) %s%s", keystroke.m_data.m_button.m_button, keystroke.m_data.m_button.m_client, 834 834 keystroke.m_data.m_button.m_press ? "down" : "up", keystroke.m_data.m_button.m_repeat ? " repeate" : "")); 835 835 KeyButton button = keystroke.m_data.m_button.m_button; … … 1008 1008 CPMKeyState::getActiveModifiersRValue() 1009 1009 { 1010 LOG((CLOG_DEBUG "getActiveModifiersRValue:"));1010 LOG((CLOG_DEBUG2 "getActiveModifiersRValue:")); 1011 1011 if (m_useSavedModifiers) { 1012 1012 return m_savedModifiers; … … 1018 1018 CPMKeyState::getKeyID(ULONG virtualKey, KeyButton button, bool numpad, USHORT usChar) 1019 1019 { 1020 LOG((CLOG_DEBUG "getKeyID:"));1020 LOG((CLOG_DEBUG2 "getKeyID:")); 1021 1021 if (virtualKey < sizeof(s_virtualKey) / sizeof(s_virtualKey[0])) { 1022 1022 … … 1085 1085 PBYTE keyState) const 1086 1086 { 1087 LOG((CLOG_DEBUG "getIDForKey:"));1087 LOG((CLOG_DEBUG2 "getIDForKey:")); 1088 1088 #if 0 1089 1089 int n; … … 1139 1139 { 1140 1140 ClientData data; data.u = item.m_client; assert(sizeof(data.u) == sizeof(data)); 1141 LOG((CLOG_DEBUG 1141 LOG((CLOG_DEBUG1 1142 1142 "addKeyEntry: scan=%02x+%02x req=%c%c%c%c%c%c[%c%c%c%c%c%c]{%x} id=%04x(%c) xlatChar=%02x(%c) scan=%02x xlatScan=%02x [%s]%s%s%s%s%s%s", 1143 1143 item.m_button, convertKeyModiferMaskToTCF(item.m_required), … … 1167 1167 )); 1168 1168 if (data.s.scan2 || data.s.xlatScan2) { 1169 LOG((CLOG_DEBUG 1169 LOG((CLOG_DEBUG1 1170 1170 "addKeyEntry: xlatChar2=%02x(%c) scan2=%02x xlatScan2=%02x", 1171 1171 data.s.xlatChar2, data.s.xlatChar2 < 128 && isprint(data.s.xlatChar2) ? data.s.xlatChar2 : '.', … … 1174 1174 1175 1175 if (!keyMap.addKeyEntry(item)) { 1176 LOG((CLOG_DEBUG "!not accepted!"));1176 LOG((CLOG_DEBUG1 "!not accepted!")); 1177 1177 } 1178 1178 if (item.m_group == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.