I am working on a .Net Core 6 / Maui app for a Zebra Scan-gun.
Many of our on-screen buttons can also be triggered by P1, P2, F1 to F12.
The TextChanged even is not fired when a P1, P2, F1 etc key is pressed.
Maui does not have a KeyUp or KeyDown event.
How do I determine when a P1 or F1 key is pressed?
The TextChanged event is not fired when a P1, P2, F1 etc key is pressed because Maui does not have a KeyUp or KeyDown event. However, you can use the KeyPress event to determine when a P1 or F1 key is pressed.
Thanks for your reply.
The intellisense does not show a KeyPress event for Entry control.
The only related events I've found are PropertyChanged, PropertyChanging, and TextChanged. But none of them fire upon P1, P2, F1-F12.
I'm using VS2022 v17.4.0 Preview 1.0.
Is there a DataWedge interaction that would work?
I guess I'll post on Stack Overflow
ok... Here's what I've been tinkering with.
Zebra has a StageNow app that runs on the scan gun.
I installed StageNow admin on my PC and (attempted to) configure the KeyMappingMgr to remap the P1 key to send an intent on key down but I really have no idea what I'm doing in the StageNow app.
I attempted to publish the profile and run my app but my listening to actions did not trigger. I'm sure I didn't configure it correctly. I assume this will work if configured. I don't know what to put for Action, Category, Package, etc on the KeyMappingMgr screen.
If this is a feasible solution could someone please walk me through how to set this up correctly? I made 8 key mappings: (P1, P2, F1 to F6) -- But just getting one working would be a step in the right direction.
I think you're on the right track here - your solution should work when configured correctly.
You'll need to configure StageNow with these (or similar) values:
You'll need to swap "com.app.name" & "com.app.name.activityname" with your package name & the name of the activity which will receive the intent.
Then, in your application, you'll need to register a broadcast receiver with the exact same value as entered in the Action box on the StageNow profile (E.g. com.app.name.ON_KEY_DOWN_P1)
Thanks for your reply. I'm starting work on this today.
Once I've made those changes to StageNow how do I deploy it to the device?
Easiest way is to generate a staging barcode from StageNow and then scan it from the StageNow app on a device