shouldPreventCtrlDefault MethodProtected

Determine if the default browser action should be prevented for a Ctrl key shortcut. By default, allows browser copy/cut of selected text to work naturally, and prevents paste. Only called when focus is valid for shortcuts (Home, AccuDraw, not on an editable element, context menu not open).

shouldPreventCtrlDefault(keyEvent: KeyboardEvent): boolean

@note This is called from _keyEventHandler to decide whether to call preventDefault().

@note Subclasses can override to customize preventDefault behavior for Ctrl shortcuts.

@returns true if preventDefault() should be called; false to allow browser default

Parameter Type Description
keyEvent KeyboardEvent  

Returns - boolean

true if preventDefault() should be called; false to allow browser default

Defined in

Last Updated: 03 September, 2026