Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features should set their keystrokes through the keystroke handler #339

Closed
Reinmar opened this issue Sep 28, 2016 · 1 comment
Closed

Features should set their keystrokes through the keystroke handler #339

Reinmar opened this issue Sep 28, 2016 · 1 comment
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:improvement This issue reports a possible enhancement of an existing feature. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@Reinmar
Copy link
Member

Reinmar commented Sep 28, 2016

This is an extension of https://github.com/ckeditor/ckeditor5-core/issues/20.

Features like the enter key, delete and list (tab to indent) listen on the view. This makes it harder to change keystroke which triggers them. In CKEditor 4 you were able to define that the enter command is triggered by any key. Sometimes this may be useful. Perhaps not this case, but I can see more people redefining indent/outdent keystrokes.

Edit: Please read #340 for more details.

Another thing to consider is that perhaps actions which will have their associated beforeinput type should not be set through the keystroke handler. This, in the future, would be a serious problem, because we'd need to stop listening to the keystroke and start listening to the beforeinput event (you can do both at the same time). After all, if someone wants to change some key behaviour, then the keystroke handler will always be available (keydown should be fired first).

tl;dr:

1. Keystrokes which have their associated beforeinput type should be handled directly through the view#keydown event.
2. All other keystrokes should be handled through the keystroke handler.

@Reinmar Reinmar added type:improvement This issue reports a possible enhancement of an existing feature. status:confirmed type:task This issue reports a chore (non-production change) and other types of "todos". labels Sep 28, 2016
@Reinmar
Copy link
Member Author

Reinmar commented Jul 18, 2018

We kept defining the "typing" keystrokes (typing, delete, enter) via the editing view and I think now that it was a sensible choice. These keystrokes are not to be changed just like that. They are part of the "essentials" feature which recreates a textarea-like behaviour. We can say that this is the stable ground on which editing features are built and these editing features can use (and do that) the keystroke manager.

@Reinmar Reinmar closed this as completed Jul 18, 2018
@Reinmar Reinmar added resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). and removed candidate:backlog labels Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:improvement This issue reports a possible enhancement of an existing feature. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

1 participant