USB HID Controls
- Turn the encoder increases or decreases volume.
- Single click to play/pause media.
- Double click to skip to next track.
- Triple click to envoke the mission control keyboard shortcut for MacOS.
- Long press to mute your speaker volume.
Customize USB HID Keycodes
You can update these keycodes if you want the media dial to do different things.
A list of keycodes and consumer controls are listed in the documentation linked below. Function keys and modifiers can be used to create custom keyboard shortcuts. Just change the keycodes in the variables located in the top of the code.
enc_inc = ConsumerControlCode.VOLUME_INCREMENT enc_dec = ConsumerControlCode.VOLUME_DECREMENT one_press = ConsumerControlCode.PLAY_PAUSE two_press = ConsumerControlCode.SCAN_NEXT_TRACK three_press = [Keycode.LEFT_CONTROL, Keycode.UP_ARROW] long_press = ConsumerControlCode.MUTE
Page last edited May 21, 2024
Text editor powered by tinymce.