From 02d955e9fecda610e9cb7f5317262b907614bf31 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 17 Nov 2010 16:06:20 +0900 Subject: add audio controls from consumer page(HID) --- key_process.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'key_process.c') 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) -- cgit v1.2.1