Index: /trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp	(revision 81217)
@@ -343,7 +343,8 @@
 
 /** UISoftKeyboardKey is a place holder for a keyboard key. Graphical key represantations are drawn according to this class.
-  * The position of a key within the physical layout is read from the layout file. Note that UISoftKeyboardKey does not have
+  * The position of a key within the physical layout is read from the layout file. Note that UISoftKeyboardKey usually does not have
   * caption field(s). Captions are kept by UISoftKeyboardLayout since same keys may (and usually do) have different captions in
-  * different layouts. */
+  * different layouts. So called static captions are exections. They are defined in physical layout files and kept as member of
+  * UISoftKeyboardKey. When a static caption exits captions (if any) from the keyboard layout files are ignored. */
 class UISoftKeyboardKey
 {
@@ -387,4 +388,7 @@
     KeyState state() const;
     void setState(KeyState state);
+
+    void setStaticCaption(const QString &strCaption);
+    const QString &staticCaption() const;
 
     void setParentWidget(UISoftKeyboardWidget* pParent);
@@ -437,4 +441,8 @@
     LONG m_iUsagePage;
     KeyboardRegion m_enmKeyboardRegion;
+    /** This is used for multimedia keys, OS key etc where we want to have a non-modifiable
+      * caption (usually a single char). This caption is defined in the physical layout file
+      * and has precedence over the captions defined in keyboard layout files. */
+    QString m_strStaticCaption;
 };
 
@@ -490,5 +498,4 @@
     QUuid uid() const;
 
-    void drawText(int iKeyPosition, const QRect &keyGeometry, QPainter &painter);
     void drawTextInRect(const UISoftKeyboardKey &key, QPainter &painter);
 
@@ -1554,4 +1561,14 @@
 }
 
+void UISoftKeyboardKey::setStaticCaption(const QString &strCaption)
+{
+    m_strStaticCaption = strCaption;
+}
+
+const QString &UISoftKeyboardKey::staticCaption() const
+{
+    return m_strStaticCaption;
+}
+
 void UISoftKeyboardKey::setParentWidget(UISoftKeyboardWidget* pParent)
 {
@@ -1825,9 +1842,22 @@
      QFont painterFont(painter.font());
 
-     const QString &strBaseCaption = baseCaption(iKeyPosition);
-     const QString &strShiftCaption = shiftCaption(iKeyPosition);
-
-     const QString &strShiftAltGrCaption = shiftAltGrCaption(iKeyPosition);
-     const QString &strAltGrCaption = altGrCaption(iKeyPosition);
+     QString strBaseCaption;
+     QString strShiftCaption;
+     QString strShiftAltGrCaption;
+     QString strAltGrCaption;
+
+     /* Static captions which are define in the physical layout files have precedence over
+        the one define in the keyboard layouts. In effect they stay the same for all the
+        keyboard layouts sharing the same physical layout: */
+
+     if (key.staticCaption().isEmpty())
+     {
+         strBaseCaption = baseCaption(iKeyPosition);
+         strShiftCaption = shiftCaption(iKeyPosition);
+         strShiftAltGrCaption = shiftAltGrCaption(iKeyPosition);
+         strAltGrCaption = altGrCaption(iKeyPosition);
+     }
+     else
+         strBaseCaption = key.staticCaption();
 
      const QString &strTopleftString = !strShiftCaption.isEmpty() ? strShiftCaption : strBaseCaption;
@@ -1895,56 +1925,17 @@
                           keyGeometry.height() - 2 * iMargin);
 
-     painter.drawText(textRect, Qt::AlignLeft | Qt::AlignTop, strTopleftString);
-     painter.drawText(textRect, Qt::AlignLeft | Qt::AlignBottom, strBottomleftString);
-     painter.drawText(textRect, Qt::AlignRight | Qt::AlignTop, strShiftAltGrCaption);
-     painter.drawText(textRect, Qt::AlignRight | Qt::AlignBottom, strAltGrCaption);
-}
-
-void UISoftKeyboardLayout::drawText(int iKeyPosition, const QRect &keyGeometry, QPainter &painter)
-{
-    QFont painterFont(painter.font());
-
-    painterFont.setPixelSize(15);
-    painterFont.setBold(true);
-    painter.setFont(painterFont);
-    QFontMetrics fontMetric = painter.fontMetrics();
-    int iSideMargin = 0.5 * fontMetric.width('X');
-
-    int iX = 0;
-    int iY = fontMetric.height();
-#if 0
-    Q_UNUSED(keyGeometry);
-    painter.drawText(iX + iSideMargin, iY, QString::number(iKeyPosition));
-#else
-    const QString &strBaseCaption = baseCaption(iKeyPosition);
-    const QString &strShiftCaption = shiftCaption(iKeyPosition);
-    const QString &strShiftAltGrCaption = shiftAltGrCaption(iKeyPosition);
-    const QString &strAltGrCaption = altGrCaption(iKeyPosition);
-
-    if (!strShiftCaption.isEmpty())
-    {
-        painter.drawText(iX + iSideMargin, iY, strShiftCaption);
-        painter.drawText(iX + iSideMargin, 2 * iY, strBaseCaption);
-    }
-    else
-    {
-        int iSpaceIndex = strBaseCaption.indexOf(" " );
-        if (iSpaceIndex == -1)
-            painter.drawText(iX + iSideMargin, iY, strBaseCaption);
-        else
-        {
-            painter.drawText(iX + iSideMargin, iY, strBaseCaption.left(iSpaceIndex));
-            painter.drawText(iX + iSideMargin, 2 * iY, strBaseCaption.right(strBaseCaption.length() - iSpaceIndex - 1));
-        }
-    }
-
-    if (!strShiftAltGrCaption.isEmpty())
-    {
-        painter.drawText(keyGeometry.width() - fontMetric.width('X') - iSideMargin, iY, strShiftAltGrCaption);
-        painter.drawText(keyGeometry.width() - fontMetric.width('X') - iSideMargin, 2 * iY, strAltGrCaption);
-    }
-    else
-        painter.drawText(keyGeometry.width() - fontMetric.width('X') - iSideMargin, 2 * iY, strAltGrCaption);
-#endif
+     if (key.keyboardRegion() == KeyboardRegion_MultimediaKeys)
+     {
+         painter.drawText(QRect(0, 0, keyGeometry.width(), keyGeometry.height()),
+                          Qt::AlignHCenter | Qt::AlignVCenter, strTopleftString);
+
+     }
+     else
+     {
+         painter.drawText(textRect, Qt::AlignLeft | Qt::AlignTop, strTopleftString);
+         painter.drawText(textRect, Qt::AlignLeft | Qt::AlignBottom, strBottomleftString);
+         painter.drawText(textRect, Qt::AlignRight | Qt::AlignTop, strShiftAltGrCaption);
+         painter.drawText(textRect, Qt::AlignRight | Qt::AlignBottom, strAltGrCaption);
+     }
 }
 
@@ -3050,4 +3041,6 @@
                 key.setKeyboardRegion(KeyboardRegion_OSMenuKeys);
         }
+        else if (m_xmlReader.name() == "staticcaption")
+            key.setStaticCaption(m_xmlReader.readElementText());
         else
             m_xmlReader.skipCurrentElement();
Index: /trunk/src/VBox/Frontends/VirtualBox/xml/101_ansi.xml
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/xml/101_ansi.xml	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/xml/101_ansi.xml	(revision 81217)
@@ -550,4 +550,5 @@
             <scancode>0x5b</scancode>
             <osmenukey>true</osmenukey>
+            <staticcaption>◆</staticcaption>
         </key>
         <key>
Index: /trunk/src/VBox/Frontends/VirtualBox/xml/102_iso.xml
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/xml/102_iso.xml	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/xml/102_iso.xml	(revision 81217)
@@ -559,4 +559,5 @@
             <scancode>0x5b</scancode>
             <osmenukey>true</osmenukey>
+            <staticcaption>◆</staticcaption>
         </key>
         <key>
Index: /trunk/src/VBox/Frontends/VirtualBox/xml/103_ansi.xml
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/xml/103_ansi.xml	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/xml/103_ansi.xml	(revision 81217)
@@ -546,4 +546,5 @@
             <scancode>0x5b</scancode>
             <osmenukey>true</osmenukey>
+            <staticcaption>◆</staticcaption>
         </key>
         <key>
Index: /trunk/src/VBox/Frontends/VirtualBox/xml/103_iso.xml
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/xml/103_iso.xml	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/xml/103_iso.xml	(revision 81217)
@@ -564,4 +564,5 @@
             <scancode>0x5b</scancode>
             <osmenukey>true</osmenukey>
+            <staticcaption>◆</staticcaption>
         </key>
         <key>
Index: /trunk/src/VBox/Frontends/VirtualBox/xml/106_japanese.xml
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/xml/106_japanese.xml	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/xml/106_japanese.xml	(revision 81217)
@@ -563,4 +563,5 @@
             <scancode>0x5b</scancode>
             <osmenukey>true</osmenukey>
+            <staticcaption>◆</staticcaption>
         </key>
         <key><!-- Alt -->
Index: /trunk/src/VBox/Frontends/VirtualBox/xml/multimedia_keys.xml
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/xml/multimedia_keys.xml	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/xml/multimedia_keys.xml	(revision 81217)
@@ -4,4 +4,8 @@
     <id>80b4c26e-43fc-44f8-b515-351cff9269ce</id>
     <row>
+        <space>
+            <width>50</width>
+        </space>
+
         <key><!-- WWW back -->
             <position>300</position>
@@ -9,4 +13,5 @@
             <usagepage>0x0C</usagepage>
             <scancode>0x20</scancode>
+            <staticcaption>⬅</staticcaption>
         </key>
         <key>
@@ -28,4 +33,19 @@
             <usagepage>0x0C</usagepage>
             <scancode>0x4a</scancode>
+            <staticcaption>🔇</staticcaption>
+        </key>
+        <key><!-- Volume Down -->
+            <position>304</position>
+            <usageid>0xEA</usageid>
+            <usagepage>0x0C</usagepage>
+            <scancode>0x4a</scancode>
+            <staticcaption>🔉</staticcaption>
+        </key>
+        <key><!-- Volume Up -->
+            <position>305</position>
+            <usageid>0xE9</usageid>
+            <usagepage>0x0C</usagepage>
+            <scancode>0x4a</scancode>
+            <staticcaption>🔊</staticcaption>
         </key>
     </row>
Index: /trunk/src/VBox/Frontends/VirtualBox/xml/us_international.xml
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/xml/us_international.xml	(revision 81216)
+++ /trunk/src/VBox/Frontends/VirtualBox/xml/us_international.xml	(revision 81217)
@@ -4,19 +4,4 @@
     <id>3c7b7be7-4d2a-4f65-a21e-208ba2e4ecaf</id>
     <physicallayoutid>{368efa94-3744-48c5-9d5a-59c2f15fe5ec}</physicallayoutid>
-    <!-- multimedia keys -->
-    <key>
-        <position>300</position>
-        <basecaption>⬅</basecaption>
-        <shiftcaption></shiftcaption>
-        <altgrcaption></altgrcaption>
-        <shiftaltgrcaption></shiftaltgrcaption>
-    </key>
-    <key>
-        <position>303</position>
-        <basecaption>🔇</basecaption>
-        <shiftcaption></shiftcaption>
-        <altgrcaption></altgrcaption>
-        <shiftaltgrcaption></shiftaltgrcaption>
-    </key>
     <key>
         <position>110</position>
