]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - common/host.c
Add keycode.h and remove usb_keycodes.h.
[max/tmk_keyboard.git] / common / host.c
index fddd5b6627fdad4411982bafbd3f70d6b135d5b1..37f707d0b310a42ec9db70e83ed539c9c60e0729 100644 (file)
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <stdint.h>
 #include <avr/interrupt.h>
-#include "usb_keycodes.h"
+#include "keycode.h"
 #include "host.h"
 #include "util.h"
 #include "debug.h"
@@ -69,6 +69,14 @@ void host_unregister_key(uint8_t key)
     host_send_keyboard_report();
 }
 
+void host_clear_all_keys_but_mods(void)
+{
+    for (int8_t i = 0; i < REPORT_KEYS; i++) {
+        keyboard_report->keys[i] = 0;
+    }
+    host_send_keyboard_report();
+}
+
 /* keyboard report operations */
 void host_add_key(uint8_t key)
 {