VirtualBox

Changeset 49386 in vbox


Ignore:
Timestamp:
Nov 4, 2013 4:39:46 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90431
Message:

Main: Added a releaseKeys method to IKeyboard.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r49356 r49386  
    1473014730    </method>
    1473114731
     14732    <method name="releaseKeys">
     14733      <desc>Causes the virtual keyboard to release any keys which are
     14734      currently pressed. Useful when host and guest keyboard may be out
     14735      of sync.
     14736
     14737        <result name="VBOX_E_IPRT_ERROR">
     14738          Could not release some or all keys.
     14739        </result>
     14740
     14741      </desc>
     14742    </method>
     14743
    1473214744    <attribute name="eventSource" type="IEventSource" readonly="yes">
    1473314745      <desc>
  • trunk/src/VBox/Main/include/KeyboardImpl.h

    r45029 r49386  
    7474                            ULONG *codesStored);
    7575    STDMETHOD(PutCAD)();
     76    STDMETHOD(ReleaseKeys)();
    7677
    7778    STDMETHOD(COMGETTER(EventSource))(IEventSource ** aEventSource);
  • trunk/src/VBox/Main/src-client/KeyboardImpl.cpp

    r45030 r49386  
    253253
    254254    return PutScancodes(ComSafeArrayAsInParam(cadSequence), NULL);
     255}
     256
     257/**
     258 * Releases all currently held keys in the virtual keyboard.
     259 *
     260 * @returns COM status code
     261 *
     262 */
     263STDMETHODIMP Keyboard::ReleaseKeys()
     264{
     265    com::SafeArray<LONG> scancodes(1);
     266    scancodes[0] = 0xFC;    /* Magic scancode, see PS/2 and USB keyboard devices. */
     267    return PutScancodes(ComSafeArrayAsInParam(scancodes), NULL);
    255268}
    256269
Note: See TracChangeset for help on using the changeset viewer.

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