VirtualBox

Changeset 89935 in vbox for trunk/include


Ignore:
Timestamp:
Jun 29, 2021 6:38:48 AM (4 years ago)
Author:
vboxsync
Message:

Keyboard: Reworked the release-all-keys mechanism, made sure it's used before switching active keyboard, avoided potential mix-ups when tracking depressed keys (see bugref:10045).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmifs.h

    r87904 r89935  
    399399
    400400
     401/** Flags for PDMIKEYBOARDPORT::pfnPutEventHid.
     402 * @{ */
     403#define PDMIKBDPORT_KEY_UP          RT_BIT(31)  /** Key release event if set. */
     404#define PDMIKBDPORT_RELEASE_KEYS    RT_BIT(30)  /** Force all keys to be released. */
     405/** @} */
     406
     407/** USB HID usage pages understood by PDMIKEYBOARDPORT::pfnPutEventHid.
     408 * @{ */
     409#define USB_HID_DC_PAGE             1       /** USB HID Generic Desktop Control Usage Page. */
     410#define USB_HID_KB_PAGE             7       /** USB HID Keyboard Usage Page. */
     411#define USB_HID_CC_PAGE             12      /** USB HID Consumer Control Usage Page. */
     412/** @} */
     413
     414
    401415/** Pointer to a keyboard port interface. */
    402416typedef struct PDMIKEYBOARDPORT *PPDMIKEYBOARDPORT;
     
    434448     */
    435449    DECLR3CALLBACKMEMBER(int, pfnPutEventHid,(PPDMIKEYBOARDPORT pInterface, uint32_t idUsage));
     450
     451    /**
     452     * Forcibly releases any pressed keys.
     453     *
     454     * This is called by the source of keyboard events in situations when a full
     455     * release of all currently pressed keys must be forced, e.g. when activating
     456     * a different keyboard, or when key-up events may have been lost.
     457     *
     458     * @returns VBox status code.
     459     *
     460     * @param   pInterface          Pointer to this interface structure.
     461     */
     462    DECLR3CALLBACKMEMBER(int, pfnReleaseKeys,(PPDMIKEYBOARDPORT pInterface));
    436463} PDMIKEYBOARDPORT;
    437464/** PDMIKEYBOARDPORT interface ID. */
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