VirtualBox

Changeset 34568 in vbox


Ignore:
Timestamp:
Dec 1, 2010 1:26:11 PM (14 years ago)
Author:
vboxsync
Message:

GUI/Win: Fix for special and peculiar keys on Korean keyboards (#5359).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r34523 r34568  
    310310            int vkey = pMsg->wParam;
    311311
     312            int flags = 0;
     313            if (pMsg->lParam & 0x1000000)
     314                flags |= KeyExtended;
     315            if (!(pMsg->lParam & 0x80000000))
     316                flags |= KeyPressed;
     317
     318            /* Check for special Korean keys. Based on the keyboard layout selected
     319             * on the host, the scancode in lParam might be 0x71/0x72 or 0xF1/0xF2.
     320             * In either case, we must deliver 0xF1/0xF2 scancode to the guest when
     321             * the key is pressed and nothing when it's released.
     322             */
     323            if (scan == 0x71 || scan == 0x72)
     324            {
     325                scan |= 0x80;
     326                flags = KeyPressed;     /* Because a release would be ignored. */
     327                vkey  = VK_PROCESSKEY;  /* In case it was 0xFF */
     328            }
     329
    312330            /* When one of the SHIFT keys is held and one of the cursor movement
    313331             * keys is pressed, Windows duplicates SHIFT press/release messages,
     
    319337                break;
    320338            }
    321 
    322             int flags = 0;
    323             if (pMsg->lParam & 0x1000000)
    324                 flags |= KeyExtended;
    325             if (!(pMsg->lParam & 0x80000000))
    326                 flags |= KeyPressed;
    327339
    328340            switch (vkey)
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