Previous Track (KC_MPRV) does a right-click instead of previous
ndrake opened this issue · 1 comments
ndrake commented
I'm starting to customize my keymap. I've set one of the keys to KC_MPRV
(also tried KC_MEDIA_PREV_TRACK
) but after flashing, when I press the mapped key, it seems to send a right-click instead of "previous track". Next track is working fine.
I'm using the main branch, and have modified the existing Media layer defined in main/keymap.c to look like this:
dd_layer layer1 =
{
.name = "Media",
/* MEDIA
* ,-----------------------------------------------------------------------.
* | Play/Pause | Next song | Mute | LAYER CHANGE |
* |-----------------+-----------------+-----------------+-----------------|
* | next window | Prev window | full screen(f11)| Print Screen |
* |-----------------+-----------------+-----------------+-----------------|
* | Copy | Paste | UP | Enter |
* |-----------------+-----------------+-----------------+-----------------|
* | Previous | Play/Pause | Play/Pause | Next |
* `-----------------------------------------------------------------------'
*/
.key_map = {
{KC_MPLY, KC_MNXT, KC_AUDIO_MUTE, RAISE},
{KC_ALT_TAB, KC_ALT_SHIFT_TAB, KC_F11, KC_PSCR},
{KC_APP_COPY, KC_APP_PASTE, KC_UP, KC_ENTER},
{KC_MPRV, KC_MPLY, KC_MPLY, KC_MNXT}},
.key_map_names = {{"Play", "next", "mute", "layer"}, {"nWind", "PWind", "F11", "PrtSC"}, {"Copy", "Paste", "up", "Enter"}, {"prev", "play", "play", "next"}},
// Knobs - {CW, CCW, Single Press, Long Press, Double press}
.left_encoder_map = {KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, KC_AUDIO_MUTE, KC_MEDIA_NEXT_TRACK},
.right_encoder_map = {KC_APP_CHROME_PTAB, KC_APP_CHROME_NTAB, KC_APP_CHROME_NEW_TAB, KC_APP_CHROME_CLOSE_TAB, KC_APP_CHROME_N_INC_WINDOW},
// APDS9960 - {UP, DOWN, LEFT, RIGHT, NEAR, FAR}
.gesture_map = {KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, KC_AUDIO_MUTE, KC_MEDIA_NEXT_TRACK, KC_MEDIA_NEXT_TRACK},
};
I'm building on an M1 Mac. PR with a fix (it fixes it for me on a Mac) coming shortly.