# Custom Key Handling

The Telerik UI for ASP.NET MVC TimeDurationPicker wrappers expose the `KendoKeydown` event, which lets you intercept keyboard input before the built-in handler runs and customize how it responds to specific shortcuts.

For event details and the full list of supported wrappers, refer to [Custom Key Handling Overview](https://www.telerik.com/aspnet-mvc/documentation/accessibility/custom-keyboard-navigation).

## How It Works

When the TimeDurationPicker receives keyboard input, the `KendoKeydown` event fires before the built-in handler.

Use the following configuration to subscribe to the event:

```Razor HtmlHelper
    .Events(events => events.KendoKeydown("onTimeDurationPickerKendoKeydown"))
```

## Overriding a Built-In Key Combination

The following example shows the pattern for overriding a built-in shortcut of the TimeDurationPicker. Replace `kendo.keys.ENTER` with one of the built-in shortcuts that you want to take over.

```javascript
    function onTimeDurationPickerKendoKeydown(e) {
        if (e.keyCode === kendo.keys.ENTER) {
            e.preventKendoKeydown = true;
            console.log("Built-in shortcut overridden.");
        }
    }
```

## Adding a Custom Key Combination

The following example demonstrates how to add a new `Ctrl+Shift+X` shortcut for the TimeDurationPicker.

```javascript
    function onTimeDurationPickerKendoKeydown(e) {
        if (e.ctrlKey && e.shiftKey && e.keyCode === 88) {
            console.log("Custom shortcut activated.");
        }
    }
```

## Built-In Keyboard Shortcuts

For the full list of built-in keyboard shortcuts, see the [TimeDurationPicker Keyboard Navigation Demo](https://demos.telerik.com/aspnet-mvc/timedurationpicker/keyboard-navigation) and the [Keyboard Navigation article](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/timedurationpicker/accessibility/keyboard-navigation).

## See Also

* [Custom Key Handling Overview](https://www.telerik.com/aspnet-mvc/documentation/accessibility/custom-keyboard-navigation)
* [Keyboard Navigation by the TimeDurationPicker for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/timedurationpicker/accessibility/keyboard-navigation)
* [Accessibility in the TimeDurationPicker HtmlHelper for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/timedurationpicker/accessibility/overview)
