Skip to content

Media Keys / Consumer Controls

rumcake can be configured to send HID reports that consist of variants in the USB consumer usage page. This includes media controls, application launchers, application controls, etc.

Setup

Required Cargo features

You must enable the following rumcake features:

  • media-keycodes

Required code

After enabling the media-keycodes feature, you can start using the Keycode::Media variants in your KeyboardLayout implementation: The Keycode::Media variant must contain a usbd_human_interface_device::page::Consumer variant, which is re-exported as rumcake::keyboard::Consumer.

Example of usage:

...
use keyberon::action::Action::*;
use rumcake::keyboard::{build_layout, Consumer::*, Keycode::Media};
build_layout! {
{
[ Escape {Custom(Media(VolumeIncrement))} A B C]
}
}