Avalonia
Avalonia copied to clipboard
feat(LibInputBackend): Intercept Keyboard events
What does the pull request do?
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
- [ ] Added unit tests (if possible)?
- [ ] Added XML documentation to any related classes?
- [ ] Consider submitting a PR to https://github.com/AvaloniaUI/Documentation with user documentation
Breaking changes
Obsoletions / Deprecations
Fixed issues
You can test this PR using the following package version. 0.10.999-cibuild0022203-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]
Note that for correct key handling and keystroke conversions you'll need to use libxkbcommon.
You can test this PR using the following package version. 0.10.999-cibuild0022216-beta
. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]
@kekekeks while working in this PR, I found a problem. Avalonia Key enum has not keys from F25 to F35. How How can I map them??
We can add F25-F35 if needed. I'm not sure if there are keyboards with such keys though.
@kekekeks Can you suggest a Linux dist where I can test Framebuffer in Hyper-V? I try with ubuntu but i have some problems.
I was only testing with bare-metal (various Intel and ARM devices) and with qemu.
According to this Phoronix article the proper support for DRM/KMS in Hyper-V should be available starting with Linux 5.14.
Also, try running kmscube, if it runs the problem might be an Avalonia bug.
If you have problems with pointer input, make sure that Hyper-V provides an absolute pointing device (tablet/touchscreen) and that said device is properly recognized by libinput list-devices
and produces absolute positioned events for libinput debug-events
hi kekekeks, thanks for the tips, i found the solution using vfb.
I have design doubts that I would like to discuss. the features I would like to implement:
- Select Keybord Layout
- Allow Custom Keybord Layout
- Management of multiple keyboards, mouses and touch screens
- Inject a custom handler for libinput events
- Support to Seat
The questions are:
- for configuration:
- [ ] Add parameter to StartLinux*
- [ ] Extend AppBuilder
- for management of multiple keyboards, mouses and touch screens. Avalonia currently creates a MouseDevice and Touch Device instance for all connected devices. https://github.com/AvaloniaUI/Avalonia/blob/e57e0b76fceb118ed15260844b4eae025662f6a6/src/Linux/Avalonia.LinuxFramebuffer/Input/LibInput/LibInputBackend.cs#L15-L16 is it better to add a Source property or create an instance for each device? Adding the source property could lead to consistency issues, creating multiple instances could be a waste of memory.
@kekekeks
What is the correlation between RawKeyEventArgs and EventArgs RawTextInputEventArgs?
You can test this PR using the following package version. 11.0.999-cibuild0029320-beta
. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-all/nuget/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0037518-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0039353-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.0.999-cibuild0039814-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
What's the status here @workgroupengineering @maxkatz6 ?
missing review
You can test this PR using the following package version. 11.1.999-cibuild0043135-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.1.999-cibuild0044713-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.1.999-cibuild0045487-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
You can test this PR using the following package version. 11.1.999-cibuild0045790-beta
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]