Changeset 48647 in vbox
- Timestamp:
- Sep 24, 2013 8:30:29 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 89245
- Location:
- trunk/src/VBox
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
r48599 r48647 44 44 #endif 45 45 #include <IOKit/hid/IOHIDLib.h> 46 #include <IOKit/hidsystem/IOHIDLib.h> 46 47 #include <ApplicationServices/ApplicationServices.h> 47 48 #include <Carbon/Carbon.h> … … 1455 1456 } 1456 1457 1458 /** Call VBoxKeyboardService to sync keyboard controls and LEDs. */ 1459 static void darwinVBoxKeyboardSync(void) 1460 { 1461 CFDictionaryRef matchingDictionaryRef = IOServiceMatching("org_virtualbox_VBoxKeyboard"); 1462 if (matchingDictionaryRef) 1463 { 1464 io_service_t service; 1465 service = IOServiceGetMatchingService(kIOMasterPortDefault, matchingDictionaryRef); 1466 if (service) 1467 { 1468 kern_return_t rc; 1469 io_connect_t connection; 1470 rc = IOServiceOpen(service, mach_task_self(), 0, &connection); 1471 if (rc == 0) 1472 { 1473 Log2(("VBoxKeyboard IOService opened!\n")); 1474 1475 rc = IOConnectCallScalarMethod(connection, 0, NULL, 0, NULL, 0); 1476 Log2(("VBoxKeyboard IOService IOCTL: 0x%X!\n", rc)); 1477 1478 rc = IOServiceClose(connection); 1479 if (rc == 0) 1480 { 1481 Log2(("VBoxKeyboard IOService closed!\n")); 1482 } 1483 else 1484 { 1485 Log2(("Unable to close VBoxKeyboard IOService: 0x%X\n", rc)); 1486 } 1487 } 1488 else 1489 { 1490 Log2(("Unable to open VBoxKeyboard IOService: 0x%X\n", rc)); 1491 } 1492 1493 IOObjectRelease(service); 1494 } 1495 else 1496 { 1497 Log2(("Unable to find VBoxKeyboard IOService\n")); 1498 } 1499 1500 } 1501 else 1502 { 1503 Log2(("Unable to construct VBoxKeyboard IOService matching dictionary\n")); 1504 } 1505 } 1506 1457 1507 /** 1458 1508 * Apply LEDs state stored in *pState and release resources aquired by *pState. … … 1488 1538 rc2 = kIOReturnError; 1489 1539 } 1540 1490 1541 } 1542 1543 darwinVBoxKeyboardSync(); 1491 1544 } 1492 1545 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r48534 r48647 1017 1017 ::CGSetLocalEventsSuppressionInterval(0.0); 1018 1018 ::darwinSetMouseCoalescingEnabled(false); 1019 1020 /* Bring the caps lock state up to date, otherwise e.g. a later Shift 1021 * key press will accidentally inject a CapsLock key press and release, 1022 * see UIKeyboardHandler::darwinKeyboardEvent for the code handling 1023 * modifier key state changes */ 1024 m_darwinKeyModifiers ^= (m_darwinKeyModifiers ^ ::GetCurrentEventKeyModifiers()) & alphaLock; 1019 1025 1020 1026 /* Register the event callback/hook and grab the keyboard. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r48577 r48647 1034 1034 * set current lock states to guest values we have, 1035 1035 * As we have no ipc between threads of different VMs 1036 * we are using 100ms timer as lazy sync timout: */1037 QTimer::singleShot( 100, this, SLOT(sltSwitchKeyboardLedsToGuestLeds()));1036 * we are using 300ms timer as lazy sync timout: */ 1037 QTimer::singleShot(300, this, SLOT(sltSwitchKeyboardLedsToGuestLeds())); 1038 1038 break; 1039 1039 } -
trunk/src/VBox/HostDrivers/Support/Makefile.kmk
r48282 r48647 304 304 305 305 VBoxDrv_SOURCES.darwin = \ 306 darwin/SUPDrv-darwin.cpp 306 darwin/SUPDrv-darwin.cpp \ 307 darwin/SUPKeyboardService-darwin.cpp 307 308 VBoxDrv_SOURCES.linux = \ 308 309 linux/SUPDrv-linux.c -
trunk/src/VBox/HostDrivers/Support/darwin/Info.plist
r45365 r48647 25 25 <key>IOUserClientClass</key> <string>org_virtualbox_SupDrvClient</string> 26 26 </dict> 27 <key>VBoxDrvKeyboard</key> 28 <dict> 29 <key>CFBundleIdentifier</key> <string>org.virtualbox.kext.VBoxDrv</string> 30 <key>IOClass</key> <string>org_virtualbox_VBoxKeyboard</string> 31 <key>IOMatchCategory</key> <string>org_virtualbox_VBoxKeyboard</string> 32 <key>IOProviderClass</key> <string>IOResources</string> 33 <key>IOResourceMatch</key> <string>IOKit</string> 34 <key>IOUserClientClass</key> <string>org_virtualbox_VBoxKeyboardClient</string> 35 </dict> 27 36 </dict> 28 37 <key>OSBundleLibraries</key>
Note:
See TracChangeset
for help on using the changeset viewer.