-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Widgets and selection move #3893
Comments
Some idea on how this should actually work:
|
OverviewThere are two different types of actions which we need to handle:
While nature of these actions is similar, we won't be able to handle them in the same way. DeleteThe delete/backspace keys are handled as follows:
And that's it. We always handle the process from start to the end. The Move selectionUnfortunately we can't handle arrow keys in the same way. We have no access to necessary selection primitives like x-index and would have a lot of troubles calculating where to put selection in case of up/down. Therefore, we don't want to expose The primitive that we need to use in this case is
Extending selection is extensible, so implementing moving selection in this way will make it extensible as well. In the case of widgets, we won't execute the step 3 from the above algorithm, but a bit different logic which will simply select the widget which was added to the selection in step 2. Extensions for
|
We need to handle keyboard events in a special way when dealing with widgets. First of all, I would like to gather some examples presenting how model's selection should look before and after certain key event. Feel free to add more examples if needed as this list is not a complete one.
Moving
Deleting
The text was updated successfully, but these errors were encountered: