-
Notifications
You must be signed in to change notification settings - Fork 20
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
base: master
Are you sure you want to change the base?
Conversation
@@ -128,6 +133,25 @@ class SetupActivity : AppCompatActivity(), ScannerView.ResultHandler { | |||
handleScan(rawResult.text) | |||
} | |||
|
|||
override fun dispatchKeyEvent(event: KeyEvent): Boolean { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
839eccc
to
25b5eea
Compare
7c87e6d
to
afce8d5
Compare
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