VirtualBox

Changeset 23984 in vbox


Ignore:
Timestamp:
Oct 22, 2009 1:55:41 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53817
Message:

FE/Qt: take keyboard layouts which use shift to cancel CapsLock into account

File:
1 edited

Legend:

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

    r23801 r23984  
    20942094    /* These special keys have to be handled by Windows as well to update the
    20952095     * internal modifier state and to enable/disable the keyboard LED */
    2096     if (vkey == VK_NUMLOCK || vkey == VK_CAPITAL)
     2096    if (vkey == VK_NUMLOCK || vkey == VK_CAPITAL || vkey == VK_SHIFT)
    20972097        return false;
    20982098
     
    25732573        codes[(*count)++] = 0x3a;
    25742574        codes[(*count)++] = 0x3a | 0x80;
     2575        /* Some keyboard layouts require shift to be pressed to break
     2576         * capslock.  For simplicity, only do this if shift is not
     2577         * already held down. */
     2578        if (mCapsLock && !(mPressedKeys [0x2a] & IsKeyPressed))
     2579        {
     2580            codes[(*count)++] = 0x2a;
     2581            codes[(*count)++] = 0x2a | 0x80;
     2582        }
    25752583    }
    25762584
     
    25882596        codes[(*count)++] = 0x3a;
    25892597        codes[(*count)++] = 0x3a | 0x80;
     2598        /* Some keyboard layouts require shift to be pressed to break
     2599         * capslock.  For simplicity, only do this if shift is not
     2600         * already held down. */
     2601        if (mCapsLock && !(mPressedKeys [0x2a] & IsKeyPressed))
     2602        {
     2603            codes[(*count)++] = 0x2a;
     2604            codes[(*count)++] = 0x2a | 0x80;
     2605        }
    25902606    }
    25912607
     
    25982614        codes[(*count)++] = 0x3a;
    25992615        codes[(*count)++] = 0x3a | 0x80;
     2616        /* Some keyboard layouts require shift to be pressed to break
     2617         * capslock.  For simplicity, only do this if shift is not
     2618         * already held down. */
     2619        if (mCapsLock && !(mPressedKeys [0x2a] & IsKeyPressed))
     2620        {
     2621            codes[(*count)++] = 0x2a;
     2622            codes[(*count)++] = 0x2a | 0x80;
     2623        }
    26002624    }
    26012625
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