diff options
author | tmk <nobody@nowhere> | 2010-11-17 16:06:20 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2010-11-17 16:06:20 +0900 |
commit | 02d955e9fecda610e9cb7f5317262b907614bf31 (patch) | |
tree | 01a32f36bb17574f46c0d1848d87b0f750afdedc /key_process.c | |
parent | 8240e606d4571624c7967d6acfa562d70ff3ab97 (diff) |
add audio controls from consumer page(HID)
Diffstat (limited to 'key_process.c')
-rw-r--r-- | key_process.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/key_process.c b/key_process.c index f6e16b8edd..243f4aad8a 100644 --- a/key_process.c +++ b/key_process.c @@ -8,6 +8,7 @@ #include "jump_bootloader.h" #include "usb_keyboard.h" #include "usb_mouse.h" +#include "usb_extra.h" #include "usb_keycodes.h" #include "layer.h" #include "matrix_skel.h" @@ -88,6 +89,18 @@ void proc_matrix(void) { if (code == MS_WH_RIGHT) mouse_hwheel += 1; } else if (IS_FN(code)) { fn_bits |= FN_BIT(code); + } else if (code == KB_MUTE) { + usb_extra_send(AUDIO_MUTE); + usb_extra_send(0); + _delay_ms(500); + } else if (code == KB_VOLU) { + usb_extra_send(AUDIO_VOL_UP); + usb_extra_send(0); + _delay_ms(100); + } else if (code == KB_VOLD) { + usb_extra_send(AUDIO_VOL_DOWN); + usb_extra_send(0); + _delay_ms(100); } else { // normal keys if (key_index < 6) |