Open maxkatz6 opened 2 years ago
I agree with most of the points, though the input manager is kinda useful in a couple of niche situations:
InputManager
handler to print to console was very useful to determine that yes, actually events are being received at a low levelFor the first 2 points we could add additional higher-level APIs to handle these situations, but I think we should keep an API for handling raw events if only for debugging. I'd be fine with changing the API if there are problems with the current one.
Not a breaking change anymore, as IPointerDevice/IInputDevice was made internal.
How could I use a barcode scanner? I used the InputManager to hook the keyboard before Avalonia 11, but the API is now internal.
I tried using InputElement.KeyDownEvent, but received 'Avalonia.Input.Key.ImeProcessed' instead of 'Avalonia.Input.Key.D2' as I expected. Additionally, this approach does not provide a Timestamp, so I had to add a Stopwatch to measure the timing. (Since barcode scanner input is very fast, I use the key interval to distinguish between scanner input and human input.)
Is your feature request related to a problem? Please describe.
After working with "IPointerDevice" related API I found number of problems:
Describe the solution you'd like