Skip to content

Keyboard shortcuts for buttons #1291

@jrouquie

Description

@jrouquie

Problem

I'm more productive when I can use keyboard shortcuts.
E.g. press left/right to move to previous / next image. Press space to toggle some viz. Press j/k to move up/down some slider.

Solution

MVP: Provide a way to map 80% of the keys to custom actions. It could be an optional argument to streamlit.button, streamlit.slider (two keys for up/down one step), etc.

Possible additions: Allow to map most keys, inclluding remapping 'c' which currenty clears the streamlit cache.

Additional context

Comes form personal need. Also mentioned here: https://discuss.streamlit.io/t/idea-keyboard-bindings/1976 .


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Views

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:utilitiesRelated to utility commandsarea:widgetsRelated to widget elementstype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions