New to Telerik UI for ASP.NET CoreStart a free 30-day trial

Custom Key Handling

Updated on Jun 3, 2026

Some of the Telerik UI for ASP.NET Core wrappers expose the KendoKeydown event. You can use this event to:

  • Override a built-in key or key combination by blocking the default behavior and replacing it with your own logic.
  • Add new key combinations that the component does not handle out of the box.

How the KendoKeydown Event Works

The event argument exposes the following relevant properties:

PropertyTypeDescription
e.senderObjectThe client-side component instance.
e.keyCodeNumberThe code of the pressed key. Use kendo.keys constants for readable comparisons.
e.ctrlKeyBooleantrue when Ctrl is held.
e.shiftKeyBooleantrue when Shift is held.
e.altKeyBooleantrue when Alt is held.
e.preventKendoKeydownBooleanSet to true to prevent the component from running its default keydown handler for this key press.

Supported Components

The following wrappers support the KendoKeydown event:

ComponentKey Handling Article
ActionSheetCustom Key Handling in ActionSheet
AIPromptCustom Key Handling in AIPrompt
AutoCompleteCustom Key Handling in AutoComplete
BottomNavigationCustom Key Handling in BottomNavigation
ButtonCustom Key Handling in Button
ButtonGroupCustom Key Handling in ButtonGroup
CalendarCustom Key Handling in Calendar
Chart WizardCustom Key Handling in Chart Wizard
ChipCustom Key Handling in Chip
ChipListCustom Key Handling in ChipList
ColorPickerCustom Key Handling in ColorPicker
ComboBoxCustom Key Handling in ComboBox
DateInputCustom Key Handling in DateInput
DialogCustom Key Handling in Dialog
DrawerCustom Key Handling in Drawer
DropDownListCustom Key Handling in DropDownList
DropDownTreeCustom Key Handling in DropDownTree
ExpansionPanelCustom Key Handling in ExpansionPanel
FilterCustom Key Handling in Filter
FloatingActionButtonCustom Key Handling in FloatingActionButton
GanttCustom Key Handling in Gantt
GridCustom Key Handling in Grid
ImageEditorCustom Key Handling in ImageEditor
InlineAIPromptCustom Key Handling in InlineAIPrompt
ListBoxCustom Key Handling in ListBox
ListViewCustom Key Handling in ListView
MediaPlayerCustom Key Handling in MediaPlayer
MenuCustom Key Handling in Menu
MultiSelectCustom Key Handling in MultiSelect
MultiViewCalendarCustom Key Handling in MultiViewCalendar
NumericTextBoxCustom Key Handling in NumericTextBox
OrgChartCustom Key Handling in OrgChart
OTPInputCustom Key Handling in OTPInput
PagerCustom Key Handling in Pager
PanelBarCustom Key Handling in PanelBar
PDFViewerCustom Key Handling in PDFViewer
PropertyGridCustom Key Handling in PropertyGrid
RatingCustom Key Handling in Rating
SchedulerCustom Key Handling in Scheduler
SliderCustom Key Handling in Slider
SpeechToTextButtonCustom Key Handling in SpeechToTextButton
SplitterCustom Key Handling in Splitter
SpreadsheetCustom Key Handling in Spreadsheet
StepperCustom Key Handling in Stepper
SwitchCustom Key Handling in Switch
TileLayoutCustom Key Handling in TileLayout
TimeDurationPickerCustom Key Handling in TimeDurationPicker
TimelineCustom Key Handling in Timeline
ToggleButtonCustom Key Handling in ToggleButton
ToolBarCustom Key Handling in ToolBar
TreeListCustom Key Handling in TreeList
TreeViewCustom Key Handling in TreeView
WindowCustom Key Handling in Window
WizardCustom Key Handling in Wizard

Basic Usage Pattern

The example below shows the structure of a KendoKeydown handler. The same pattern applies to all supported wrappers.

Razor
	@(Html.Kendo().Grid()
		.Name("grid")
		.Navigatable()
		.Events(events => events.KendoKeydown("onGridKendoKeydown"))
	)

Blocking the Default Behavior

To prevent a wrapper from reacting to a specific key, set e.preventKendoKeydown to true for that key in the handler. You do not need to call e.preventDefault() in most cases because setting the flag is sufficient to stop the component from handling the key.

If you also want to prevent the browser's default behavior for that key, call e.preventDefault() in addition to setting the flag:

javascript
	function onGridKendoKeydown(e) {
		if (e.ctrlKey && e.keyCode === 82) {
			e.preventDefault();
			e.preventKendoKeydown = true;
		}
	}

Adding a Custom Key Combination

You can add a key combination that the wrapper does not use. You do not need to set e.preventKendoKeydown = true in this case because there is nothing to block. Set the flag only when you want to take over a key that the component already handles.

javascript
	function onGridKendoKeydown(e) {
		if (e.keyCode === 73) {
			console.log("Custom shortcut activated.");
		}
	}

See Also