Buttons module

The buttons module is responsible for generating events related to key presses. The source of events are changes to GPIO pins.

Module events

Source Module

Input Event

This Module

Output Event

Sink Module

Power manager module

power_down_event

buttons

Source modules for module_state_event

module_state_event

Buttons module

wake_up_event

HID forward module

Motion module

Power manager module

Wheel module

button_event

Function key module

Motion module

Button simulator module

Click detector module

Passkey module

HID state module

module_state_event

Sink modules for module_state_event

wake_up_event

Sink modules for wake_up_event

Note

See the Overview: Firmware architecture for more information about the event-based communication in the nRF Desktop application and about how to read this table.

Implementation details

nRF Desktop uses the buttons module from Common Application Framework (CAF). See the CAF button module page for implementation details.

Key ID

If CONFIG_DESKTOP_FN_KEYS_ENABLE is enabled, the button_event.key_id additionally encodes if a button related to button_event is a function key. See the nRF Desktop function key module page for implementation details.