Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HID QR code scanners to the pretixSCAN setup #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robbi5
Copy link
Contributor

@robbi5 robbi5 commented Oct 2, 2024

This allows people with an external usb qr code scanner that simply sends keyboard input to use it for setting up pretixSCAN instead of using the camera to scan it

@@ -128,6 +133,25 @@ class SetupActivity : AppCompatActivity(), ScannerView.ResultHandler {
handleScan(rawResult.text)
}

override fun dispatchKeyEvent(event: KeyEvent): Boolean {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentionally a very different implementation than in MainActivity? Should we settle on one and maybe even move it to libpretixui?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yeah. I've seen the implementation in MainActivity only after this one, so, yep, combining them would be great. Maybe even moving not only the keyboardhandling, but the whole SetupActivity to libpretixui?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, have they any differences currently?

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