keymapper icon indicating copy to clipboard operation
keymapper copied to clipboard

Support additional AVCRP media keys on Linux

Open ristomatti opened this issue 3 months ago • 0 comments

This adds support to following keys on Linux:

  • MediaRewind (0x00A8) [KEY_REWIND]
  • MediaPlay (0x00C8) [KEY_PLAYCD]
  • MediaPause (0x00C9) [KEY_PAUSECD]
  • MediaFastForward (0x00D0) [KEY_FASTFORWARD]

It should be noted that I can't get these events to show up on the JavaScript Key Code Event Tool at all. I tried to align the naming with the existing ones (e.g. already existing alias MediaStop shows up as KEY_STOPCD when using evtest).

Background: I've got BT headphones and a BT A2DP receiver that send KEY_PLAYCD and/or KEY_PAUSECD events when tapped. On Android these work like play/pause. Both input devices use similar names (Ugreen-70304E (AVRCP), Ugreen-70304E (AVRCP)).

KEY_REWIND and KEY_FASTFORWARD on the other hand can be mapped in QMK.

More info:

  • https://github.com/torvalds/linux/blob/8cb4a9a82b21623dbb4b3051dd30d98356cf95bc/include/uapi/linux/input-event-codes.h
  • https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles#Audio/Video_Remote_Control_Profile_(AVRCP)

ristomatti avatar Apr 05 '24 02:04 ristomatti