Skip to content

How can developers handle platform specific shortcuts for caret navigation? #180

Description

@flackr

Different platforms have different shortcuts to activate different caret navigations, e.g. Home, Command + Left Arrow (on mac), Alt + Left arrow (android) all move the text caret to the start of a line. As far as I can tell, the developer can only see the raw key events and gets no indication that on a particular platform it should perform a particular command. It seems cumbersome for developers to maintain a set of platform specific mappings, and it's possible some platforms may allow developers to customize these.

It should be possible for a developer to implement handlers for these commands when implementing their own editor. This seems like it would most naturally be supported by dispatching these as editing commands to beforeinput.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions