VirtualBox

Ignore:
Timestamp:
Nov 11, 2010 4:31:11 PM (14 years ago)
Author:
vboxsync
Message:

UsbKbd: Proper fix for funny Korean keys.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/UsbKbd.cpp

    r34000 r34001  
    376376    0x00, 0x00, 0x00, 0x00, 0x68, 0x69, 0x6a, 0x6b, /* 60-67 */
    377377    0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x00, /* 68-6F */
    378     0x88, 0x90, 0x91, 0x87, 0x00, 0x00, 0x00, 0x00, /* 70-77 */
     378    0x88, 0x91, 0x90, 0x87, 0x00, 0x00, 0x00, 0x00, /* 70-77 */
    379379    0x00, 0x8a, 0x00, 0x8b, 0x00, 0x89, 0x85, 0x00  /* 78-7F */
    380380};
     
    702702                            uint8_t *pabDepressedKeys)
    703703{
     704    int rc = false;
    704705    unsigned iBuf = 0;
    705706    RT_ZERO(*pReport);
     
    725726                pReport->aKeys[iBuf] = iKey;
    726727                ++iBuf;
     728                /* More Korean keyboard hackery: Give the caller a hint that
     729                 * a key release event needs reporting.
     730                 */
     731                if (iKey == 0x90 || iKey == 0x91)
     732                    rc = true;
    727733            }
    728734            pabUnreportedKeys[iKey] = 0;
    729735        }
    730736    }
    731     return VINF_SUCCESS;
     737    return rc;
    732738}
    733739
     
    843849        PUSBHIDK_REPORT pReport = (PUSBHIDK_REPORT)&pUrb->abData[0];
    844850
    845         int rc = usbHidFillReport(pReport, pThis->abUnreportedKeys,
    846                                   pThis->abDepressedKeys);
    847         pThis->fHasPendingChanges = false;
    848         AssertRCReturn(rc, rc);
     851        int again = usbHidFillReport(pReport, pThis->abUnreportedKeys,
     852                                      pThis->abDepressedKeys);
     853        if (again)
     854            pThis->fHasPendingChanges = true;
     855        else
     856            pThis->fHasPendingChanges = false;
    849857        return usbHidCompleteOk(pThis, pUrb, sizeof(*pReport));
    850858    }
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