The only key events in WinUI are KeyDown and KeyUp (both are defined on the UIElement class). Tab keys are not consumed for both KeyDown and KeyUp (i.e. a parent element receives the events with regular KeyDown/Up handlers), while action keys are always consumed.
On Mon, May 22, 2023 at 10:05 PM John Hendrikx <john.hendr...@gmail.com> wrote: > > You mean KEY_TYPED or KEY_PRESSED ? In my experience, it consumes only > the PRESSED events while TYPED and RELEASED are left alone. > > On 22/05/2023 20:37, Michael Strauß wrote: > > Just to add a data point: > > I've tried to recreate this scenario in a WinUI 3 application. A > > single button, and nowhere to shift focus. > > While the button does consume action keys (space and enter), it does > > not consume the tab key. > > Interestingly, it also doesn't consume the tab key when the focus > > _can_ be moved to a different control.