Last Updated: 02 Sep 2021 05:40 by ADMIN
Created on: 25 Jan 2021 09:24
Category: Window
Type: Feature Request
Ability to customize and disable the keyboard shortcuts of TelerikWindow

I am running into an issue with what I believe is the default behaviour of the TelerikWindow, namely capturing @onkeydown - events and closing the window when the user presses escape.

Is there any way to disable this default behaviour of the dialog / overwrite its onkeydown event handler?


Include the ability to :

  • Disable keyboard shortcuts altogether
  • Use custom keyboard shortcuts
  • Use a combination of several keys (e.g. Shift + ESC)
  • Define several keyboard shortcuts at the same time for the same action

If you have any preferences how to expose this functionality please leave a comment. Any feedback on how to handle this on a Mac for the Ctrl and CMD keys is welcome (e.g. should the shortcut for the Ctrl key handle the CMD key for the Mac automatically).

In the meantime you could use the following snippet as a workaround to disable the Esc key:


<TelerikButton OnClick="@ToggleWindow">Toggle the Window</TelerikButton>

<TelerikWindow Visible="@isVisible" VisibleChanged="@VisibleChangedHandler">
        <strong>The Title</strong>
        This is my window <strong>popup</strong> content.
        <WindowAction Name="MyCustomClose" Icon="@IconName.Close" OnClick="@MyCustomCloseHandler" />

@code {
    bool isVisible { get; set; }
    string result { get; set; }

    void VisibleChangedHandler(bool currVisible)
        // if you don't do this, the window won't close because of the user action
        // so if you don't update the view-model here, the window will not close when Esc is pressed

        //isVisible = currVisible;

        result = $"the window is now visible: {isVisible}";

        Console.WriteLine($"Closing because of Esc key");

    void MyCustomCloseHandler()
        //will fire on click only
        isVisible = false;
        //since the built-in window UI didn't invoke this change, the event will not fire

    public void ToggleWindow()
        isVisible = !isVisible;

        result = $"the window is now visible: {isVisible}";


This item is a duplicate of an already existing item. You can find the original item here:
1 comment
Svetoslav Dimitrov
Posted on: 02 Sep 2021 05:40

Hello Karl,

We have a new feature request regarding the Ability to customize the keyboard shortcuts in all applicable Telerik UI for Blazor components. I have added your Vote for it and you can click the Follow button to receive email notifications on status updates.

I have also transferred all votes from this feature request to the more general one.

That being said, I am marking this thread as a duplicate.

Svetoslav Dimitrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.