You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really need the KeyPress event for Keyboard shortcuts. .NET MAUI has no keyboard events.
This function has been discussing for ever and ever, but still has nothing here.
Desktop platforms: Mouse and Keyboard classes or DependencyServices · Issue #3739
You can detection with Sharphook. But this library has only Global Hooks.
No matter what if the program is background or not, the keyboard event will be fired.
Would be a replacement, I decided to use KeyboardAccelerators from .NET 8 .
It makes keyboard shortcut with simple coding like this below.
<ContentPage.MenuBarItems>
<MenuBarItem>
<MenuFlyoutItem Clicked="MenuFlyoutItem_Clicked" Text="">
<MenuFlyoutItem.KeyboardAccelerators>
<KeyboardAccelerator Key="Enter" Modifiers="Ctrl" />
</MenuFlyoutItem.KeyboardAccelerators>
</MenuFlyoutItem>
</MenuBarItem>
</ContentPage.MenuBarItems>
...
private void MenuFlyoutItem_Clicked(object sender, EventArgs e)
{
// You can do something...
}
But it has a weak point. It occupied a space even if Text is empty.
You'll see a blank space, you can click this and showing unnecessary menu.
So I want IsVisible option for ToolbarItem class.
Public API Changes
Add IsVisible option to MenuBarItem, this effects top level menu.
If you want to each sub menu, add IsVisible option to lIMenuFlyoutItem interface,
Description
I really need the KeyPress event for Keyboard shortcuts. .NET MAUI has no keyboard events.
This function has been discussing for ever and ever, but still has nothing here.
You can detection with Sharphook. But this library has only Global Hooks.
No matter what if the program is background or not, the keyboard event will be fired.
Would be a replacement, I decided to use KeyboardAccelerators from .NET 8 .
It makes keyboard shortcut with simple coding like this below.
But it has a weak point. It occupied a space even if Text is empty.
You'll see a blank space, you can click this and showing unnecessary menu.
So I want IsVisible option for ToolbarItem class.
Public API Changes
Add IsVisible option to MenuBarItem, this effects top level menu.
If you want to each sub menu, add IsVisible option to lIMenuFlyoutItem interface,
Intended Use-Case
This changes will make accessable to simply operation from Keyboard without unnecessary menu displaying.
The text was updated successfully, but these errors were encountered: