fix media keys
parent
c2b44c7222
commit
e20ccf838d
|
@ -353,6 +353,10 @@ static const uint16_t PROGMEM _media_code_lookup_table[] = {
|
||||||
AC_BOOKMARKS, // MEDIAKEY_BROWSER_BOOKMARKS
|
AC_BOOKMARKS, // MEDIAKEY_BROWSER_BOOKMARKS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
uint16_t _media_code_lookup(uint8_t key) {
|
||||||
|
return (uint16_t) pgm_read_word(&_media_code_lookup_table[key]);
|
||||||
|
}
|
||||||
|
|
||||||
// modifiers
|
// modifiers
|
||||||
|
|
||||||
#define MOD_KEY_LeftControl 0
|
#define MOD_KEY_LeftControl 0
|
||||||
|
|
|
@ -271,7 +271,7 @@ void _kbfun_normal_press_release(bool press, keycode key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _kbfun_mediakey_press_release(bool press, keycode key) {
|
void _kbfun_mediakey_press_release(bool press, keycode key) {
|
||||||
media_keycode media_key = _media_code_lookup_table[key];
|
media_keycode media_key = _media_code_lookup(key);
|
||||||
if (press) {
|
if (press) {
|
||||||
consumer_key = media_key;
|
consumer_key = media_key;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue