Skip to content

Could provide "alt click" functionality #29

Closed
@FoamyGuy

Description

@FoamyGuy

On the PyGamer many (or possibly all) of the buttons are connected to the main chip via some sort of IO Expander device. It seems that only one thing at a time can have this device initialized and be able to check the states of the buttons.

I ran into a situation where I want to be able to take different action when the (B) button is clicked vs. the action taken when the (A) button is clicked. But currently this library only provides the single is_clicked which is mapped to the (A) button only.

Since the library has initialized the IO Expander my user code is unable to initialize it and check the state of the (B) button.

To make it work for my use case I added an is_alt_clicked property to this library that is mapped to the (B) button. This way after initializing cursor control I can do cursor.is_alt_clicked and it will return true if the (B) button is pressed essentially the same way that is_clicked works today for the (A) button.

I will PR my solution for it this week, but wanted to get the issue created to see if anyone else has thoughts or ideas about best way to solve for this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions