Index: /trunk/include/VBox/sup.h
===================================================================
--- /trunk/include/VBox/sup.h	(revision 49964)
+++ /trunk/include/VBox/sup.h	(revision 49965)
@@ -1387,5 +1387,5 @@
  * @returns VBox status code.
  */
-SUPR3DECL(int) SUPR3ResumeBuiltinKeyboard(void);
+SUPR3DECL(int) SUPR3ResumeSuspendedKeyboards(void);
 
 /** @} */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp	(revision 49964)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp	(revision 49965)
@@ -1281,6 +1281,6 @@
     IOReturn      rc = kIOReturnError;
 
-    /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */
-    int rc1 = SUPR3ResumeBuiltinKeyboard();
+    /* Try to resume suspended keyboard devices. Abort if failed in order to avoid GUI freezes. */
+    int rc1 = SUPR3ResumeSuspendedKeyboards();
     if (RT_FAILURE(rc1))
         return rc1;
@@ -1308,6 +1308,6 @@
     CFIndex       integerValue;
 
-    /* Try to resume built-in keyboard. Abort if failed in order to avoid GUI freezes. */
-    int rc1 = SUPR3ResumeBuiltinKeyboard();
+    /* Try to resume suspended keyboard devices. Abort if failed in order to avoid GUI freezes. */
+    int rc1 = SUPR3ResumeSuspendedKeyboards();
     if (RT_FAILURE(rc1))
         return rc1;
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrv.c
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 49964)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrv.c	(revision 49965)
@@ -139,5 +139,5 @@
                                                   RTCPUID idCpu, uint8_t idApic, uint64_t iTick);
 static void                 supdrvGipInitCpu(PSUPGLOBALINFOPAGE pGip, PSUPGIPCPU pCpu, uint64_t u64NanoTS);
-static int                  supdrvIOCtl_ResumeBuiltinKbd(void);
+static int                  supdrvIOCtl_ResumeSuspendedKbds(void);
 
 
@@ -1905,10 +1905,10 @@
         }
 
-        case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_RESUME_BUILTIN_KBD):
+        case SUP_CTL_CODE_NO_SIZE(SUP_IOCTL_RESUME_SUSPENDED_KBDS):
         {
             /* validate */
-            REQ_CHECK_SIZES(SUP_IOCTL_RESUME_BUILTIN_KBD);
-
-            pReqHdr->rc = supdrvIOCtl_ResumeBuiltinKbd();
+            REQ_CHECK_SIZES(SUP_IOCTL_RESUME_SUSPENDED_KBDS);
+
+            pReqHdr->rc = supdrvIOCtl_ResumeSuspendedKbds();
             return 0;
         }
@@ -6155,8 +6155,8 @@
  * @returns 0 on Mac OS X platform, VERR_NOT_IMPLEMENTED on the other ones.
  */
-static int supdrvIOCtl_ResumeBuiltinKbd(void)
+static int supdrvIOCtl_ResumeSuspendedKbds(void)
 {
 #if defined(RT_OS_DARWIN)
-    return supdrvDarwinResumeBuiltinKbd();
+    return supdrvDarwinResumeSuspendedKbds();
 #else
     return VERR_NOT_IMPLEMENTED;
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 49964)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h	(revision 49965)
@@ -1438,13 +1438,13 @@
 /** @} */
 
-/** @name SUP_IOCTL_RESUME_BUILTIN_KBD
- * Resume built-in keyboard (make sense on MacBook Air/Pro hosts only).
- *
- * @{
- */
-#define SUP_IOCTL_RESUME_BUILTIN_KBD                    SUP_CTL_CODE_SIZE(35, SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE)
-#define SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE               sizeof(SUPREQHDR)
-#define SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_IN            sizeof(SUPREQHDR)
-#define SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_OUT           sizeof(SUPREQHDR)
+/** @name SUP_IOCTL_RESUME_SUSPENDED_KBDS
+ * Resume suspended keyboard devices if any found in the system.
+ *
+ * @{
+ */
+#define SUP_IOCTL_RESUME_SUSPENDED_KBDS                 SUP_CTL_CODE_SIZE(35, SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE)
+#define SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE            sizeof(SUPREQHDR)
+#define SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_IN         sizeof(SUPREQHDR)
+#define SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_OUT        sizeof(SUPREQHDR)
 /** @} */
 
Index: /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 49964)
+++ /trunk/src/VBox/HostDrivers/Support/SUPDrvInternal.h	(revision 49965)
@@ -750,5 +750,5 @@
 
 #if defined(RT_OS_DARWIN)
-int VBOXCALL    supdrvDarwinResumeBuiltinKbd(void);
+int VBOXCALL    supdrvDarwinResumeSuspendedKbds(void);
 #endif
 
Index: /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 49964)
+++ /trunk/src/VBox/HostDrivers/Support/SUPLib.cpp	(revision 49965)
@@ -2134,5 +2134,5 @@
 
 
-SUPR3DECL(int) SUPR3ResumeBuiltinKeyboard(void)
+SUPR3DECL(int) SUPR3ResumeSuspendedKeyboards(void)
 {
 #ifdef RT_OS_DARWIN
@@ -2143,9 +2143,9 @@
     Req.u32Cookie       = g_u32Cookie;
     Req.u32SessionCookie= g_u32SessionCookie;
-    Req.cbIn            = SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_IN;
-    Req.cbOut           = SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE_OUT;
+    Req.cbIn            = SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_IN;
+    Req.cbOut           = SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE_OUT;
     Req.fFlags          = SUPREQHDR_FLAGS_DEFAULT;
     Req.rc              = VERR_INTERNAL_ERROR;
-    int rc = suplibOsIOCtl(&g_supLibData, SUP_IOCTL_RESUME_BUILTIN_KBD, &Req, SUP_IOCTL_RESUME_BUILTIN_KBD_SIZE);
+    int rc = suplibOsIOCtl(&g_supLibData, SUP_IOCTL_RESUME_SUSPENDED_KBDS, &Req, SUP_IOCTL_RESUME_SUSPENDED_KBDS_SIZE);
     if (RT_SUCCESS(rc))
         rc = Req.rc;
Index: /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp	(revision 49964)
+++ /trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp	(revision 49965)
@@ -68,4 +68,6 @@
 #include <IOKit/IODeviceTreeSupport.h>
 #include <IOKit/usb/IOUSBHIDDriver.h>
+#include <IOKit/bluetooth/IOBluetoothHIDDriver.h>
+#include <IOKit/bluetooth/IOBluetoothHIDDriverTypes.h>
 
 #ifdef VBOX_WITH_HOST_VMX
@@ -1147,10 +1149,34 @@
 #endif /* SUPDRV_WITH_MSR_PROBER */
 
+/**
+ * Resume Bluetooth keyboard.
+ * If there is no Bluetooth keyboard device connected to the system we just ignore this.
+ */
+static void supdrvDarwinResumeBluetoothKbd(void)
+{
+    OSDictionary *pDictionary = IOService::serviceMatching("AppleBluetoothHIDKeyboard");
+    if (pDictionary)
+    {
+        OSIterator     *pIter;
+        IOBluetoothHIDDriver *pDriver;
+
+        pIter = IOService::getMatchingServices(pDictionary);
+        if (pIter)
+        {
+            while ((pDriver = (IOBluetoothHIDDriver *)pIter->getNextObject()))
+                if (pDriver->isKeyboard())
+                    (void)pDriver->hidControl(IOBTHID_CONTROL_EXIT_SUSPEND);
+
+            pIter->release();
+        }
+        pDictionary->release();
+    }
+}
 
 /**
  * Resume built-in keyboard on MacBook Air and Pro hosts.
- * If there is no built-in keyboard device, return success anyway.
- */
-int VBOXCALL    supdrvDarwinResumeBuiltinKbd(void)
+ * If there is no built-in keyboard device attached to the system we just ignore this.
+ */
+static void supdrvDarwinResumeBuiltinKbd(void)
 {
     /*
@@ -1174,8 +1200,17 @@
         pDictionary->release();
     }
+}
+
+
+/**
+ * Resume suspended keyboard devices (if any).
+ */
+int VBOXCALL    supdrvDarwinResumeSuspendedKbds(void)
+{
+    supdrvDarwinResumeBuiltinKbd();
+    supdrvDarwinResumeBluetoothKbd();
 
     return 0;
 }
-
 
 
