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

5 participants
@EphoxJames
Contributor

EphoxJames 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

@EphoxJames EphoxJames requested review from afercia and aduth Jul 10, 2017

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 10, 2017

Coverage Status

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

coveralls commented Jul 10, 2017

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

This comment has been minimized.

Show comment
Hide comment
@swissspidy

swissspidy Jul 10, 2017

Member

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

Edit: never mind.

Member

swissspidy commented Jul 10, 2017

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

Edit: never mind.

@EphoxJames

This comment has been minimized.

Show comment
Hide comment
@EphoxJames

EphoxJames Jul 10, 2017

Contributor

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.

Contributor

EphoxJames commented Jul 10, 2017

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.

@iseulde

This comment has been minimized.

Show comment
Hide comment
@iseulde

iseulde Jul 10, 2017

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?

Member

iseulde commented Jul 10, 2017

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

This comment has been minimized.

Show comment
Hide comment
@afercia

afercia Jul 10, 2017

Contributor

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

See screenshot 😬

screen shot 2017-07-10 at 20 29 26

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

@EphoxJames

This comment has been minimized.

Show comment
Hide comment
@EphoxJames

EphoxJames Jul 12, 2017

Contributor

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

Contributor

EphoxJames commented Jul 12, 2017

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

@EphoxJames EphoxJames merged commit 55cf757 into master Jul 12, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.03%) to 17.786%
Details

@EphoxJames EphoxJames deleted the fix/1640-list-block-add-keyboard-shortcuts branch Jul 12, 2017

@androb androb added this to Done in Ephox Team Jul 13, 2017

@anna-harrison anna-harrison moved this from Done to Logged in JIRA in Ephox Team Aug 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment