VirtualBox

Changeset 49304 in vbox for trunk


Ignore:
Timestamp:
Oct 28, 2013 9:42:53 AM (11 years ago)
Author:
vboxsync
Message:

OS X host: LEDs sync: ignore CAPS LOCK timeout in Carbon event for now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp

    r49302 r49304  
    316316} VBoxKbdState_t;
    317317
     318/* A struct that used to pass input event info from IOKit callback to a Carbon one */
     319typedef struct VBoxKbdEvent_t {
     320    VBoxKbdState_t *pKbd;
     321    uint32_t        iKeyCode;
     322    uint64_t        tsKeyDown;
     323    uint64_t        tsKeyUp;
     324} VBoxKbdEvent_t;
     325
    318326/* HID LEDs synchronization data: IOKit specific data. */
    319327typedef struct VBoxHidsState_t {
     
    14621470}
    14631471
    1464 typedef struct VBoxKbdEvent_t {
    1465     VBoxKbdState_t *pKbd;
    1466     uint32_t        iKeyCode;
    1467     uint64_t        tsKeyDown;
    1468     uint64_t        tsKeyUp;
    1469 } VBoxKbdEvent_t;
    1470 
    14711472/** IOKit key press callback. Triggered before Carbon callback. We remember which keyboard produced a keypress here. */
    14721473static void darwinHidInputCallback(void *pData, IOReturn unused, void *unused1, IOHIDValueRef pValueRef)
     
    15991600
    16001601            if (pEvent->iKeyCode == kHIDUsage_KeypadNumLock
    1601              || (pEvent->iKeyCode == kHIDUsage_KeyboardCapsLock &&
    1602                  (RTTimeSystemMilliTS() - pEvent->tsKeyDown) > pEvent->pKbd->cCapsLockTimeout))
     1602             || pEvent->iKeyCode == kHIDUsage_KeyboardCapsLock)
    16031603            {
    16041604                /* Found one. Keep its index in queue in order to remove it later. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette