Skip to main content
All docs
V26.1
  • KeyDownEvent Class

    An event that occurs when a key is pressed while the RichEdit’s document has focus.

    Declaration

    export class KeyDownEvent extends RichEditEvent<KeyboardEventArgs>

    Remarks

    You can define the KeyDown event handler either at the server side, at the client side, or at runtime.

    Use the OnKeyDown(String) method to specify the event handler.

    @(Html.DevExpress().RichEdit("richEdit")
     .OnKeyDown("function(s,e) {
       console.log('The pressed key is: ' + e.htmlEvent.key);
     }")
     // ...
    

    The event handler receives an argument of the KeyboardEventArgs type. The argument’s properties provide information specific to this event.

    See Also