Skip to content

Make enter/key presses "click" BasicListItems

Claudio Cambra requested to merge enter_basiclistitem into master

Currently, list items can be selected with the keyboard using the spacebar. This, howver, diverges from the norm of pressing Enter/Return to select an interactive element. QWidget apps use Enter/Return to select list items, and some Kirigami apps and components (like the system settings' sidebar list items) add custom key handling to make basic list item components react to enter key presses.

This MR adds this Enter/Return key handling directly to the BasicListItem component, saving us from having to reimplement it in each application.

Edited by Claudio Cambra

Merge request reports