summaryrefslogtreecommitdiff
path: root/common/action.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-07-23 07:45:25 +0900
committertmk <nobody@nowhere>2013-07-23 07:53:18 +0900
commit6aaa6e0ef9aa1e464b67723fd4cdd0d63b2c861d (patch)
tree25c8f53490930e4e70638211cec159f86e4018d5 /common/action.c
parent25aec56c082936a463d609357a04332c97c9940b (diff)
Add support for macro media/system keys
Diffstat (limited to 'common/action.c')
-rw-r--r--common/action.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/action.c b/common/action.c
index a42a7a4aee..c22f681fba 100644
--- a/common/action.c
+++ b/common/action.c
@@ -373,6 +373,12 @@ void register_code(uint8_t code)
host_add_mods(MOD_BIT(code));
host_send_keyboard_report();
}
+ else if IS_SYSTEM(code) {
+ host_system_send(KEYCODE2SYSTEM(code));
+ }
+ else if IS_CONSUMER(code) {
+ host_consumer_send(KEYCODE2CONSUMER(code));
+ }
}
void unregister_code(uint8_t code)
@@ -400,6 +406,12 @@ void unregister_code(uint8_t code)
host_del_mods(MOD_BIT(code));
host_send_keyboard_report();
}
+ else if IS_SYSTEM(code) {
+ host_system_send(0);
+ }
+ else if IS_CONSUMER(code) {
+ host_consumer_send(0);
+ }
}
void add_mods(uint8_t mods)