Changeset 79669 in vbox
- Timestamp:
- Jul 10, 2019 10:46:06 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r79654 r79669 325 325 LONG scanCode() const; 326 326 327 void setScanCodePrefix(LONG scanCode);328 LONGscanCodePrefix() const;327 void addScanCodePrefix(LONG scanCode); 328 const QVector<LONG> &scanCodePrefix() const; 329 329 330 330 void setSpaceWidthAfter(int iSpace); … … 378 378 int m_iSpaceWidthAfter; 379 379 LONG m_scanCode; 380 LONGm_scanCodePrefix;380 QVector<LONG> m_scanCodePrefix; 381 381 382 382 /** @name Cutouts are used to create non-rectangle keys polygons. … … 1396 1396 , m_iSpaceWidthAfter(0) 1397 1397 , m_scanCode(0) 1398 , m_scanCodePrefix(0)1399 1398 , m_iCutoutWidth(0) 1400 1399 , m_iCutoutHeight(0) … … 1449 1448 } 1450 1449 1451 void UISoftKeyboardKey:: setScanCodePrefix(LONG scanCodePrefix)1452 { 1453 m_scanCodePrefix =scanCodePrefix;1454 } 1455 1456 LONGUISoftKeyboardKey::scanCodePrefix() const1450 void UISoftKeyboardKey::addScanCodePrefix(LONG scanCodePrefix) 1451 { 1452 m_scanCodePrefix << scanCodePrefix; 1453 } 1454 1455 const QVector<LONG> &UISoftKeyboardKey::scanCodePrefix() const 1457 1456 { 1458 1457 return m_scanCodePrefix; … … 2428 2427 2429 2428 QVector<LONG> sequence; 2430 if ( pKey->scanCodePrefix() != 0)2429 if (!pKey->scanCodePrefix().isEmpty()) 2431 2430 sequence << pKey->scanCodePrefix(); 2432 2431 sequence << (pKey->scanCode() | 0x80); … … 2436 2435 { 2437 2436 UISoftKeyboardKey *pModifier = m_pressedModifiers[i]; 2438 if ( pModifier->scanCodePrefix() != 0)2437 if (!pModifier->scanCodePrefix().isEmpty()) 2439 2438 sequence << pModifier->scanCodePrefix(); 2440 2439 sequence << (pModifier->scanCode() | 0x80); … … 2459 2458 { 2460 2459 UISoftKeyboardKey *pModifier = m_pressedModifiers[i]; 2461 if ( pModifier->scanCodePrefix() != 0)2460 if (!pModifier->scanCodePrefix().isEmpty()) 2462 2461 sequence << pModifier->scanCodePrefix(); 2463 2462 sequence << pModifier->scanCode(); 2464 2463 } 2465 2464 2466 if ( pKey->scanCodePrefix() != 0)2465 if (!pKey->scanCodePrefix().isEmpty()) 2467 2466 sequence << pKey->scanCodePrefix(); 2468 2467 sequence << pKey->scanCode(); … … 2915 2914 { 2916 2915 QString strCode = m_xmlReader.readElementText(); 2917 bool fOk = false; 2918 key.setScanCodePrefix(strCode.toInt(&fOk, 16)); 2916 QStringList strList; 2917 strList << strCode.split('-', QString::SkipEmptyParts); 2918 foreach (const QString &strPrefix, strList) 2919 { 2920 bool fOk = false; 2921 LONG iCode = strPrefix.toInt(&fOk, 16); 2922 if (fOk) 2923 key.addScanCodePrefix(iCode); 2924 } 2919 2925 } 2920 2926 else if (m_xmlReader.name() == "cutout") -
trunk/src/VBox/Frontends/VirtualBox/xml/103_iso.xml
r79667 r79669 82 82 <scancodeprefix>0xe1-0x1d</scancodeprefix> 83 83 <scancode>0x45</scancode> 84 0xe1-0x1d-0x45-0xe1-0x9d-0xc5 84 85 </key> 85 86 </row>
Note:
See TracChangeset
for help on using the changeset viewer.