Skip to content

Add physical key binding - #32

Open
nejento wants to merge 2 commits into
Staacks:mainfrom
nejento:main
Open

Add physical key binding#32
nejento wants to merge 2 commits into
Staacks:mainfrom
nejento:main

Conversation

@nejento

@nejento nejento commented Sep 1, 2026

Copy link
Copy Markdown

Physical Key Binding

To allow users to map physical hardware keys (like Bluetooth remotes or volume buttons) to specific camera actions, I added functionality of recording the key and binding the action to actions.

Summary:

  • Global Foreground Interception: The app intercepts hardware key presses globally when it is in the foreground, ensuring actions trigger instantly regardless of which UI element has focus.
  • Binding UI: Added "Bind key" and "Clear" buttons. Tapping "Bind" opens a simple "Press any key" capture dialog.
  • Conflict Checks: The system automatically ignores OS keys (like Back or Home). It also prevents you from binding the same key to multiple actions simultaneously.
  • Execution: Mapped button presses are "consumed" by the app (preventing default OS behaviors like volume changes) and are configured to ignore long-press repeats so the camera action only fires once per click.

The commits also contain package updates so if that needs to be kept in previous version, it is possible to just remove those files. It was tested before package updates.

This was updated to my liking and my idea of how it should work, of course feel free to ignore, deny or do your preferred changes to the code, it's open to it. I'm greatful that this application actually exist in the first place :D

@Staacks

Staacks commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Thanks. Looks interesting and usefull. Unfortunately, it will be a while before find the time to review >1000 lines of code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants