Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 52923)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 52924)
@@ -14923,7 +14923,20 @@
   -->
 
+  <enum
+    name="KeyboardLED"
+    uuid="ef29ea38-409b-49c7-a817-c858d426dfba"
+    >
+    <desc>
+      Keyboard LED indicators.
+    </desc>
+
+    <const name="NumLock" value="0x01"/>
+    <const name="CapsLock" value="0x02"/>
+    <const name="ScrollLock" value="0x04"/>
+  </enum>
+
   <interface
     name="IKeyboard" extends="$unknown"
-    uuid="71aa2898-28bd-43fe-8c98-e53321451db7"
+    uuid="585cc5e8-349c-41c6-899d-d9a38e3f4126"
     wsmap="managed"
     >
@@ -14935,4 +14948,10 @@
       to the virtual machine.
     </desc>
+
+    <attribute name="keyboardLEDs" type="KeyboardLED" safearray="yes" readonly="yes">
+      <desc>
+        Current status of the guest keyboard LEDs.
+      </desc>
+    </attribute>
 
     <method name="putScancode">
Index: /trunk/src/VBox/Main/include/KeyboardImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/KeyboardImpl.h	(revision 52923)
+++ /trunk/src/VBox/Main/include/KeyboardImpl.h	(revision 52924)
@@ -66,9 +66,10 @@
     // Wrapped Keyboard properties
     HRESULT getEventSource(ComPtr<IEventSource> &aEventSource);
+    HRESULT getKeyboardLEDs(std::vector<KeyboardLED_T> &aKeyboardLEDs);
+
+    // Wrapped Keyboard members
     HRESULT putScancode(LONG aScancode);
     HRESULT putScancodes(const std::vector<LONG> &aScancodes,
                          ULONG *aCodesStored);
-
-    // Wrapped Keyboard members
     HRESULT putCAD();
     HRESULT releaseKeys();
@@ -80,4 +81,6 @@
     static DECLCALLBACK(void)   i_drvDestruct(PPDMDRVINS pDrvIns);
 
+    void onKeyboardLedsChange(PDMKEYBLEDS enmLeds);
+
     Console * const         mParent;
     /** Pointer to the associated keyboard driver(s). */
@@ -88,4 +91,7 @@
     bool                    mfVMMDevInited;
 
+    /* The current guest keyboard LED status. */
+    PDMKEYBLEDS menmLeds;
+
     const ComObjPtr<EventSource> mEventSource;
 };
Index: /trunk/src/VBox/Main/src-client/KeyboardImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/KeyboardImpl.cpp	(revision 52923)
+++ /trunk/src/VBox/Main/src-client/KeyboardImpl.cpp	(revision 52924)
@@ -79,4 +79,5 @@
     mpVMMDev = NULL;
     mfVMMDevInited = false;
+    menmLeds = PDMKEYBLEDS_NONE;
     return BaseFinalConstruct();
 }
@@ -141,4 +142,6 @@
     mpVMMDev = NULL;
     mfVMMDevInited = true;
+
+    menmLeds = PDMKEYBLEDS_NONE;
 
     unconst(mParent) = NULL;
@@ -261,4 +264,16 @@
 }
 
+HRESULT Keyboard::getKeyboardLEDs(std::vector<KeyboardLED_T> &aKeyboardLEDs)
+{
+    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    aKeyboardLEDs.resize(0);
+
+    if (menmLeds & PDMKEYBLEDS_NUMLOCK)    aKeyboardLEDs.push_back(KeyboardLED_NumLock);
+    if (menmLeds & PDMKEYBLEDS_CAPSLOCK)   aKeyboardLEDs.push_back(KeyboardLED_CapsLock);
+    if (menmLeds & PDMKEYBLEDS_SCROLLLOCK) aKeyboardLEDs.push_back(KeyboardLED_ScrollLock);
+
+    return S_OK;
+}
 
 HRESULT Keyboard::getEventSource(ComPtr<IEventSource> &aEventSource)
@@ -273,10 +288,22 @@
 // private methods
 //
+void Keyboard::onKeyboardLedsChange(PDMKEYBLEDS enmLeds)
+{
+    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+
+    /* Save the current status. */
+    menmLeds = enmLeds;
+
+    alock.release();
+
+    i_getParent()->i_onKeyboardLedsChange(RT_BOOL(enmLeds & PDMKEYBLEDS_NUMLOCK),
+                                          RT_BOOL(enmLeds & PDMKEYBLEDS_CAPSLOCK),
+                                          RT_BOOL(enmLeds & PDMKEYBLEDS_SCROLLLOCK));
+}
+
 DECLCALLBACK(void) Keyboard::i_keyboardLedStatusChange(PPDMIKEYBOARDCONNECTOR pInterface, PDMKEYBLEDS enmLeds)
 {
     PDRVMAINKEYBOARD pDrv = RT_FROM_MEMBER(pInterface, DRVMAINKEYBOARD, IConnector);
-    pDrv->pKeyboard->i_getParent()->i_onKeyboardLedsChange(RT_BOOL(enmLeds & PDMKEYBLEDS_NUMLOCK),
-                                                           RT_BOOL(enmLeds & PDMKEYBLEDS_CAPSLOCK),
-                                                           RT_BOOL(enmLeds & PDMKEYBLEDS_SCROLLLOCK));
+    pDrv->pKeyboard->onKeyboardLedsChange(enmLeds);
 }
 
