Blazored / Modal

A powerful and customizable modal implementation for Blazor applications.
https://blazored.github.io/Modal/
MIT License
764 stars 184 forks source link

Keyboard Handling not straight-forward #544

Closed HMyersPharmaLink closed 4 months ago

HMyersPharmaLink commented 6 months ago

Is your feature request related to a problem? Please describe. I have a need to recognize certain keystrokes in a dialog box, such as Enter (YES) , ESC(NO), plus controls numeri "+" and "-"

Describe the solution you'd like I would like to see the ability to filter keyboard input and perhaps define a Yes and no and a string of control characters, then provide an event for access to the control character picked if any. Ignore anything else

Describe alternatives you've considered I have already written this for another vendors software, it is giving me a different problem, essentially, it is hiking up my power consumption and processor %. That soluction seems to not play well in my application. I have keyboard working there, but it doesn't seem to transfer over.

Additional context Add any other context or screenshots about the feature request here.

chrissainty commented 4 months ago

@HMyersPharmaLink I'm trying to understand what you're asking for. Why can't you handle the keystrokes in the component being displayed in the modal? Why does this need to be part of the library?

HMyersPharmaLink commented 4 months ago

We are using scanners to scan Drug Codes (we dispose of old expired, recalled drugs) so we have people scanning drugs QR codes all day. These codes some times have non printable characters, in particular asc(29) which is the group separator character. We replace it with a Pipe | for further processing.

That said, I ended up crafting a JavaScript solution to intercept keyboard input after first attempt using blazor (net) keyboard events was unreliable or unable to detect the keys I needed. JS does it just fine.

Anyway, problem is solved.

I really appreciate you responding very much.

Harvey Myers

From: Chris Sainty @.> Sent: Monday, February 19, 2024 3:55 PM To: Blazored/Modal @.> Cc: Harvey Myers @.>; Mention @.> Subject: Re: [Blazored/Modal] Keyboard Handling not straight-forward (Issue #544)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

@HMyersPharmaLinkhttps://github.com/HMyersPharmaLink I'm trying to understand what you're asking for. Why can't you handle the keystrokes in the component being displayed in the modal? Why does this need to be part of the library?

- Reply to this email directly, view it on GitHubhttps://github.com/Blazored/Modal/issues/544#issuecomment-1953148331, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AX23VN2EUKVPSHS5NC64YD3YUO33ZAVCNFSM6AAAAABBDRGZKGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJTGE2DQMZTGE. You are receiving this because you were mentioned.Message ID: @.**@.>>

chrissainty commented 4 months ago

Thanks for getting back @HMyersPharmaLink. I'll close the issue as you have a solution.