Skip to content

improve the button api #108

Open
Open
@ensonic

Description

@ensonic

I am missing two feature from the button api.

  1. if I want to check if a key is pressed, where key is a variable I have to do:
getattr(ev3dev.buttons, key).pressed

This is not very discoverable.

2.) how would I check for any key pressed?
If there would be an enum of available keys, I could check if any of them are pressed. We could also just have some convenience api for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions