Module

typing/utils/injectunsafekeystrokeshandling

@ckeditor/ckeditor5-typing/src/utils/injectunsafekeystrokeshandling

module

Filtering

Functions

  • injectUnsafeKeystrokesHandling( editor )

    Handles keystrokes which are unsafe for typing. This handler's logic is explained in https://github.com/ckeditor/ckeditor5-typing/issues/83#issuecomment-398690251.

    Parameters

    editor : Editor

    The editor instance.

  • isNonTypingKeystroke( keyData ) → Boolean

    Returns true if a keystroke will not result in "typing".

    For instance, keystrokes that result in typing are letters "a-zA-Z", numbers "0-9", delete, backspace, etc.

    Keystrokes that do not cause typing are, for instance, Fn keys (F5, F8, etc.), arrow keys (←, →, ↑, ↓), Tab (↹), "Windows logo key" (⊞ Win), etc.

    Note: This implementation is very simple and will need to be refined with time.

    Parameters

    keyData : KeyEventData

    Returns

    Boolean