VirtualBox

Changeset 81254 in vbox


Ignore:
Timestamp:
Oct 14, 2019 11:48:51 AM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6143. Fixing scan codes and adding some multimedia keys.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited

Legend:

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

    r81217 r81254  
    327327    int spaceHeightAfter() const;
    328328
     329    int leftMargin() const;
     330    void setLeftMargin(int iMargin);
     331
    329332private:
    330333
     
    336339    QVector<UISoftKeyboardKey> m_keys;
    337340    int m_iSpaceHeightAfter;
     341    /* The width of the empty space before the 1st key. */
     342    int m_iLeftMargin;
    338343};
    339344
     
    13751380    , m_iDefaultHeight(0)
    13761381    , m_iSpaceHeightAfter(0)
     1382    , m_iLeftMargin(0)
    13771383{
    13781384}
     
    14161422{
    14171423    return m_iSpaceHeightAfter;
     1424}
     1425
     1426int UISoftKeyboardRow::leftMargin() const
     1427{
     1428    return m_iLeftMargin;
     1429}
     1430
     1431void UISoftKeyboardRow::setLeftMargin(int iMargin)
     1432{
     1433    m_iLeftMargin = iMargin;
    14181434}
    14191435
     
    14941510}
    14951511
     1512int UISoftKeyboardKey::spaceWidthAfter() const
     1513{
     1514    return m_iSpaceWidthAfter;
     1515}
     1516
    14961517void UISoftKeyboardKey::setUsageId(LONG usageId)
    14971518{
     
    15071528{
    15081529    return QPair<LONG, LONG>(m_iUsageId, m_iUsagePage);
    1509 }
    1510 
    1511 int UISoftKeyboardKey::spaceWidthAfter() const
    1512 {
    1513     return m_iSpaceWidthAfter;
    15141530}
    15151531
     
    26492665        }
    26502666
    2651         int iX = m_iLeftMargin;
     2667        int iX = m_iLeftMargin + row.leftMargin();
    26522668        int iXNoNumPad = m_iLeftMargin;
    26532669        int iRowHeight = row.defaultHeight();
     
    30583074            m_xmlReader.skipCurrentElement();
    30593075    }
    3060     if (row.keys().size() <= 0)
    3061         return;
    3062     row.keys().back().setSpaceWidthAfter(iWidth);
     3076    /* If we have keys add the parsed space to the last key as the 'space after': */
     3077    if (!row.keys().empty())
     3078        row.keys().back().setSpaceWidthAfter(iWidth);
     3079    /* If we have no keys than this is the initial space left to first key: */
     3080    else
     3081        row.setLeftMargin(iWidth);
    30633082}
    30643083
  • trunk/src/VBox/Frontends/VirtualBox/xml/multimedia_keys.xml

    r81244 r81254  
    44    <id>80b4c26e-43fc-44f8-b515-351cff9269ce</id>
    55    <row>
    6         <space>
    7             <width>50</width>
    8         </space>
    9 
    106        <key><!-- WWW back -->
    117            <position>300</position>
    128            <usageid>0x0224</usageid>
    139            <usagepage>0x0C</usagepage>
    14             <scancode>0x20</scancode>
     10            <scancodeprefix>0xE0</scancodeprefix>
     11            <scancode>0x6A</scancode>
    1512            <staticcaption>🡄</staticcaption>
    1613        </key>
     
    1916            <usageid>0x0223</usageid>
    2017            <usagepage>0x0C</usagepage>
    21             <scancode>0x20</scancode>
     18            <scancodeprefix>0xE0</scancodeprefix>
     19            <scancode>0x32</scancode>
    2220            <staticcaption></staticcaption>
    2321        </key>
    24 
    2522        <key><!-- WWW forward -->
    2623            <position>302</position>
    2724            <usageid>0x0225</usageid>
    2825            <usagepage>0x0C</usagepage>
    29             <scancodeprefix>0xe0</scancodeprefix>
    30             <scancode>0x35</scancode>
     26            <scancodeprefix>0xE0</scancodeprefix>
     27            <scancode>0x69</scancode>
    3128            <staticcaption>🡆</staticcaption>
     29        </key>
     30        <key><!-- Bookmarks -->
     31            <position>313</position>
     32            <usageid>0x022A</usageid>
     33            <usagepage>0x0C</usagepage>
     34            <scancodeprefix>0xE0</scancodeprefix>
     35            <scancode>0x66</scancode>
     36            <staticcaption>🔖</staticcaption>
    3237        </key>
    3338        <key><!-- Mail -->
     
    3540            <usageid>0x018A</usageid>
    3641            <usagepage>0x0C</usagepage>
    37             <scancodeprefix>0xe0</scancodeprefix>
    38             <scancode>0x35</scancode>
     42            <scancodeprefix>0xE0</scancodeprefix>
     43            <scancode>0x6C</scancode>
    3944            <staticcaption>✉</staticcaption>
    4045        </key>
     46        <space>
     47            <width>25</width>
     48        </space>
    4149        <key><!-- Mute -->
    4250            <position>304</position>
    4351            <usageid>0xE2</usageid>
    4452            <usagepage>0x0C</usagepage>
    45             <scancode>0x4a</scancode>
     53            <scancodeprefix>0xE0</scancodeprefix>
     54            <scancode>0x20</scancode>
    4655            <staticcaption>🔇</staticcaption>
    4756        </key>
     
    5059            <usageid>0xEA</usageid>
    5160            <usagepage>0x0C</usagepage>
    52             <scancode>0x4a</scancode>
     61            <scancodeprefix>0xE0</scancodeprefix>
     62            <scancode>0x2E</scancode>
    5363            <staticcaption>🔉</staticcaption>
    5464        </key>
     
    5767            <usageid>0xE9</usageid>
    5868            <usagepage>0x0C</usagepage>
    59             <scancode>0x4a</scancode>
     69            <scancodeprefix>0xE0</scancodeprefix>
     70            <scancode>0x30</scancode>
    6071            <staticcaption>🔊</staticcaption>
    6172        </key>
     73
     74        <space>
     75            <width>25</width>
     76        </space>
     77        <key><!-- Previous -->
     78            <position>307</position>
     79            <usageid>0xB6</usageid>
     80            <usagepage>0x0C</usagepage>
     81            <scancodeprefix>0xE0</scancodeprefix>
     82            <scancode>0x10</scancode>
     83            <staticcaption>âŽī¸</staticcaption>
     84        </key>
     85        <key><!-- Next -->
     86            <position>308</position>
     87            <usageid>0xB5</usageid>
     88            <usagepage>0x0C</usagepage>
     89            <scancode>0x19</scancode>
     90            <scancodeprefix>0xE0</scancodeprefix>
     91            <staticcaption>â­ī¸</staticcaption>
     92        </key>
     93
     94        <key><!-- Stop -->
     95            <position>309</position>
     96            <usageid>0xB7</usageid>
     97            <usagepage>0x0C</usagepage>
     98            <scancode>0x24</scancode>
     99            <scancodeprefix>0xE0</scancodeprefix>
     100            <staticcaption>âšī¸</staticcaption>
     101        </key>
     102        <key><!-- Play/Pause -->
     103            <position>310</position>
     104            <usageid>0xCD</usageid>
     105            <usagepage>0x0C</usagepage>
     106            <scancode>0x22</scancode>
     107            <scancodeprefix>0xE0</scancodeprefix>
     108            <staticcaption>â¯ī¸</staticcaption>
     109        </key>
     110        <space>
     111            <width>25</width>
     112        </space>
     113        <key><!-- Calculator -->
     114            <position>311</position>
     115            <usageid>0x192</usageid>
     116            <usagepage>0x0C</usagepage>
     117            <scancodeprefix>0xE0</scancodeprefix>
     118            <scancode>0x21</scancode>
     119            <staticcaption>đŸ–Šī¸</staticcaption>
     120        </key>
     121        <key><!-- My Computer -->
     122            <position>312</position>
     123            <usageid>0x194</usageid>
     124            <usagepage>0x0C</usagepage>
     125            <scancodeprefix>0xE0</scancodeprefix>
     126            <scancode>0x6B</scancode>
     127            <staticcaption>đŸ’ģī¸ī¸</staticcaption>
     128        </key>
     129        <key><!-- Media -->
     130            <position>312</position>
     131            <usageid>0x183</usageid>
     132            <usagepage>0x0C</usagepage>
     133            <scancodeprefix>0xE0</scancodeprefix>
     134            <scancode>0x6D</scancode>
     135            <staticcaption>â™Ŧ</staticcaption>
     136        </key>
     137
    62138    </row>
    63139</physicallayout>
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