Implementação de Eventos de Teclado Nativos no .NET MAUI #1947
Closed
mateusfrancino
started this conversation in
New Feature Discussions
Replies: 2 comments 1 reply
-
@mateusfrancino we ask that posts are written in English as that covers what the majority of the team knows. I have used Google translate to translate your post into English. Please take a look and let me know if it covers it properly |
Beta Was this translation helpful? Give feedback.
1 reply
-
Closed as per the Community Stand-up discussion here: https://youtu.be/N9wMcBP4jtg?t=2889 where it was agreed that New Features need to get above 7 upvotes within 6 months to progress to being reviewed by the maintainers. If you feel this is being closed in error please let us know and we can re-open. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, .NET MAUI does not natively support keyboard events such as KeyDown and KeyUp, which were widely used in Windows Forms. This limitation significantly impacts the development of applications that rely on keyboard-based interactions, such as point-of-sale (POS) systems, where keyboard shortcuts are essential for operational efficiency.
Proposed solution:
I propose implementing native support for keyboard events in .NET MAUI, similar to what existed in Windows Forms. This would include events like KeyDown, KeyUp, KeyPress, and support for key combinations. The implementation must be comprehensive and flexible, allowing developers to easily define and manipulate keyboard shortcuts anywhere in the application, not just within specific menus or layouts.
Benefits of the Solution:
Increased Productivity: Keyboard shortcuts are crucial for applications that require speed and efficiency, such as POS systems. Native implementation of these events would significantly improve usability and productivity for end users.
Ease of Development: Developers migrating from Windows Forms to .NET MAUI would find a smoother transition, reducing the need for external libraries and simplifying code.
Consistency and Maintainability: Native solutions are generally more stable and easier to maintain. Eliminating reliance on third-party libraries like SharpHook would reduce complexity and potentially bugs.
Example of use:
private void OnKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.F1) { // Aciona a função de ajuda } else if (e.Key == Key.C && e.Modifiers == KeyModifiers.Control) { // Ctrl+C para copiar } }
Queremos apenas o básico, para que se possa dizer que podemos criar um app Maui utilizavél para desktop.
Beta Was this translation helpful? Give feedback.
All reactions