.NET MAUI › Desktop - WinUI & Mac Catalyst

How do you handle keyboard shortcuts and pointer interactions on desktop?

Intermediate

Answer

Add KeyboardAccelerators to menu items or use platform key handling, and use PointerGestureRecognizer for hover/enter/exit/pointer-moved events to build hover states and tooltips. These enrich desktop UX where a mouse and physical keyboard are present.
<Button Text="Save">
    <Button.GestureRecognizers>
        <PointerGestureRecognizer PointerEntered="OnHover" />
    </Button.GestureRecognizers>
</Button>
Real-world example Toolbar buttons show hover highlights and Ctrl+S triggers save on desktop via accelerators and pointer gestures.

Common follow-ups: What is PointerGestureRecognizer? | How do you bind Ctrl+S?