Skip to content

Override dispatchKeyEvent in MainActivity #100

@xperroni

Description

@xperroni

What is the problem or limitation you are having?

Currently there is no way to intercept events from hardware buttons in the device itself or peripherals (e.g. bluetooth headset).

Describe the solution you'd like

Implementing an override of dispatchKeyEvent in the MainActivity class to call a Python handler through userCode() if it exists.

Describe alternatives you've considered

I looked into ways to point to a custom MainActivity or set key handlers at runtime, but neither option seems to exist.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions