New to Telerik UI for BlazorStart a free 30-day trial

Window Keyboard Navigation

Updated on Jul 16, 2026

This article describes how the Window keyboard navigation works and how to customize it. The article extends the general information about keyboard navigation in Telerik UI for Blazor.

The Window's keyboard navigation is active while the component is visible and focused.

Default Keys

The following sections list the default built-in keyboard shortcuts and the actions that they perform when the Window is focused. Also check the Window Keyboard Navigation demo.

Key CombinationDescription
Alt + ArrowDownMinimizes a Window in the default state and restores it if maximized.
Alt + ArrowUpMaximizes a Window in the default state and restores it if minimized.
EscapeCloses the Window.

Using Custom Keys

The Window supports replacing the default built-in keyboard shortcuts or adding new ones that perform the same actions.

To override the built-in Window keyboard shortcuts, you need to create a Dictionary<string, WindowKeyboardCommand?>> that defines:

Set the Dictionary to the Window CustomKeyboardShortcuts parameter.

Setting custom WindowKeyboardCommand keyboard shortcuts

RAZOR
<TelerikWindow CustomKeyboardShortcuts="@WindowCustomShortcuts" />

@code {
    private Dictionary<string, WindowKeyboardCommand?> WindowCustomShortcuts = new()
    {
        { "Escape", WindowKeyboardCommand.Minimize }
    };
}

Keyboard Command

The WindowKeyboardCommand enum represents a user action, for example, Minimize, Close, and others.

You can define multiple keyboard shortcuts that execute the same keyboard command. If a Window keyboard command has no custom key, the component uses the default key. To disable a built-in keyboard command for a specific key, use null.

Example

The following sample shows how to:

  • Disable closing the Window with the Escape key.
  • Minimize, restore, and maximize the Window with a custom key.
<TelerikButton OnClick="@( () => WindowVisible = !WindowVisible )">Toggle Window</TelerikButton>

<TelerikWindow @bind-Visible="@WindowVisible"
               CustomKeyboardShortcuts="@WindowCustomKeyboardShortcuts">
    <WindowActions>
        <WindowAction Name="Minimize" />
        <WindowAction Name="Maximize" />
        <WindowAction Name="Close" />
    </WindowActions>
    <WindowTitle>
        Window Title
    </WindowTitle>
    <WindowContent>
        Window Content
    </WindowContent>
</TelerikWindow>

@code {
    private bool WindowVisible { get; set; }

    private Dictionary<string, WindowKeyboardCommand?> WindowCustomKeyboardShortcuts { get; set; } = new Dictionary<string, WindowKeyboardCommand?>
    {
        { "Escape", null },
        { "m", WindowKeyboardCommand.Minimize },
        { "r", WindowKeyboardCommand.Maximize }
    };
}

See Also