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

Add shortcut keys for indenting and outdenting lists to the list block #1826

Merged
merged 1 commit into from
Jul 12, 2017

Conversation

BoardJames
Copy link

@BoardJames BoardJames commented Jul 10, 2017

By default TinyMCE overrides the tab key to provide list indentation but stops tab from being used for navigation and makes it impossible to escape from the list block. So for Gutenberg we disabled the tab key.

For the list block this pull request enables meta+[ for list outdent and meta+] for list indent where meta means control on windows/linux and command on mac.

Edit: For locales without [ meta+m is used for indent and meta+shift+m is used for outdent.

This should resolve #1640

@BoardJames BoardJames requested review from afercia and aduth July 10, 2017 04:43
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 17.786% when pulling e622210 on fix/1640-list-block-add-keyboard-shortcuts into 0f578ea on master.

@swissspidy
Copy link
Member

swissspidy commented Jul 10, 2017

This key combination is not really possible with non-US keyboard layouts I guess.

Edit: never mind.

@BoardJames
Copy link
Author

Yeah, I should note my comment from the other thread:

One other thing that needs to be considered is that '[' and ']' are not on all keyboards. I'm told that the locales 'fr', 'nl', 'sv', 'ru', 'de', 'es' and 'it' do not have those keys. Apparently on textbox.io the square brackets, "meta+]" for indent and "meta+[" for outdent, are used on most locales and "meta+m" / "meta+shift+m" is used for the ones which don't have the square brackets.

@ellatrix
Copy link
Member

Any idea what Google Docs does for keyboards without []? Are these keys not on these keyboards at all? A Belgian keyboard should be the same as French and it does have these keys.

How do we handle other key combinations for non Latin keyboards?

@afercia
Copy link
Contributor

afercia commented Jul 10, 2017

Any idea what Google Docs does for keyboards without []?

See screenshot 😬

screen shot 2017-07-10 at 20 29 26

@BoardJames
Copy link
Author

Well I'm going to merge this and if any alternate better suggestions for shortcut keys come up it can be easily changed.

@BoardJames BoardJames merged commit 55cf757 into master Jul 12, 2017
@BoardJames BoardJames deleted the fix/1640-list-block-add-keyboard-shortcuts branch July 12, 2017 23:43
Tug pushed a commit that referenced this pull request Feb 28, 2020
* Update ref to react-native-slider fork to support autolinking

* Merge develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List block: Add keyboard support for list indenting and outdenting
6 participants