To wakeup from sleep mode of PC you must use LShift+RShift+PrintScreen command at this time.
This is not behavior of keyboard most of users expected. Wakeup with any key will be more natural way.
This is suggest from yeeeargh@deskthority. Thanks.
--- common/keyboard.c 2012-11-24 21:35:47.121551900 +0900
+++ /home/noname/Downloads/keyboard.c 2012-11-24 21:39:41.294945900 +0900
@@ -45,7 +45,8 @@
MOD_DOWN, MOD_UP,
} keykind_t;
-typedef enum { IDLE, DELAYING, WAITING, PRESSING } kbdstate_t;
+/* added STANDBY for waking up */
+typedef enum { IDLE, DELAYING, WAITING, PRESSING, STANDBY } kbdstate_t;
#ifdef KEYMAP_DEFAULT_LAYER
@@ -69,6 +70,7 @@
if (state == DELAYING) return PSTR("DELAYING");
if (state == WAITING) return PSTR("WAITING");
if (state == PRESSING) return PSTR("PRESSING");
+ if (state == STANDBY) return PSTR("STANDBY");
return PSTR("UNKNOWN");
}
@@ -353,6 +355,13 @@
Kdebug(" code: "); Kdebug_hex(code);
if (event.pressed) { Kdebug("d"); } else { Kdebug("u"); }
Kdebug("\n");
+
+ /* check if keyboard is in standby. Set the state accordingly */
+#ifdef HOST_PJRC
+ if (suspend && remote_wakeup) {
+ NEXT(STANDBY);
+ }
+#endif
switch (kbdstate) {
case IDLE:
@@ -539,6 +548,10 @@
break;
}
break;
+ case STANDBY:
+ usb_remote_wakeup();
+ NEXT(IDLE);
+ break;
}
}