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

[ZEPPELIN-4321] Support shortcuts for the paragraphs #3517

Closed
wants to merge 1 commit into from

Conversation

hsuanxyz
Copy link
Member

@hsuanxyz hsuanxyz commented Nov 11, 2019

What is this PR for?

We are using Angular Latest to refactor Zeppelin's front-end. When implementing the features of the shortcuts, we found that the current shortcuts is somewhat complicated and did not distinguish the Command/Ctrl key between Mac and Windows.

So we compared the following applications:

They can distinguish between edit-mode and command-mode, which will simplify the shortcuts complexity. Meanwhile, we use the Monaco editor in the refactor version, it is the core library of VSCode. We think it is a good choice to use its shortcuts design.

Therefore, for the above reasons, we proposed to redesign Zeppelin's shortcuts according to the table following.

Actions Mode Mac Windows / Linux Old(Mac)
Command mode Edit ESC ESC -
Edit mode Command Enter Enter -
Run - ⇧ + Enter ⇧ + Enter ⇧ + Enter
Run all below - ⇧ + ⌘ + Enter ⇧ + Ctrl + Enter ⇧ + Ctrl + Enter
Run all above - ⇧ + ⌥ + Enter ⇧ + Alt + Enter ⇧ + Ctrl + Enter
Cancel - ⇧ + ⌘ + C ⇧ + Ctrl + C ⌥ + Ctrl + C
Switch all line number - ⇧ + ⌘ + L ⇧ + Ctrl + L -
Show / Hide all output - ⇧ + ⌘ + O ⇧ + Ctrl + O -
Show / Hide all title - ⇧ + ⌘ + T ⇧ + Ctrl + T -
Clear output - ⌘ + ⌥ + L Ctrl + Alt + L ⌥ + Ctrl + L
Enable/Disable - ⌘ + ⌥ + R Ctrl + Alt + R ⌥ + Ctrl + R
Reduce width - ⌘ + ⌥ + + Ctrl + Alt + - ⇧ + Ctrl + -
Increase width - ⌘ + ⌥ + - Ctrl + Alt + + ⇧ + Ctrl + +
Delete Command ⇧ + Del ⇧ + Del ⌥ + Ctrl + D
Move to up Command ⌘ + K / Up Ctrl + K / Up ⌥ + Ctrl + K
Move to down Command ⌘ + J / Down Ctrl + J / Down ⌥ + Ctrl + J
Select above Command K / Up K / Up -
Select below Command J / Down J / Down -
Switch line number Command L L ⌥ + Ctrl + M
Show / Hide title Command T T ⌥ + Ctrl + T
Show / Hide output Command O O ⌥ + Ctrl + O
Show / Hide editor Command E E ⌥ + Ctrl + E
Insert above Command A A ⌥ + Ctrl + A
Insert below Command B B ⌥ + Ctrl + B
Search Edit ⌘ + F Ctrl + F ⌥ + Ctrl + F
Increase Indent Edit Tab Tab -
Decrease Indent Edit ⇧ + Tab ⇧ + Tab -
Comment Out / In Edit ⌘ + / Ctrl + / Ctrl + /
Undo Edit ⌘ + Z Ctrl + Z Ctrl + Z
Redo Edit ⇧ + ⌘ + Z Ctrl + Y -
Increase font size Edit ⌘ + . Ctrl + . -
Decrease font size Edit ⌘ + , Ctrl + , -
Decrease Indent Edit ⌘ + [ Ctrl + [ -
Increase Indent Edit ⌘ + ] Ctrl + ] -
Move the line down Edit ⌥ + Down Alt + Down ⌥ + Down
Move the line up Edit ⌥ + Up Alt + Up ⌥ + Down
Replace Edit ⌘ + ⌥ + F Ctrl + F -
Select all Edit ⌘ + A Ctrl + A ⌘ + A
Select downward Edit ⇧ + Down ⇧ + Down ⇧ + Down
Select right Edit ⇧ + Right ⇧ + Right ⇧ + Right
Select left Edit ⇧ + Left ⇧ + Left ⇧ + Left
Select upward Edit ⇧ + Up ⇧ + Up ⇧ + Up
Select to the end Edit ⌘ + ⇧ + Right Alt + ⇧ + Right ⌘ + ⇧ + Right
Select to the start Edit ⌘ + ⇧ + Left Alt + ⇧ + Left ⌘ + ⇧ + Left
Align text right Edit ⌥ + Right Ctrl + ⇧ + Right ⌥ + Right
Align text left Edit ⌥ + Left Ctrl + ⇧ + Left ⌥ + Left
Add multi-cursor above Edit ⌘ + ⌥ + Up Ctrl + Alt + Up -
Add multi-cursor below Edit ⌘ + ⌥ + Down Ctrl + Alt + Down -
Move multi-cursor from current line to the line above Edit ⌘ + ⌥ + ⇧ + Up Ctrl + Alt + ⇧ + Up -
Move multi-cursor from current line to the line below Edit ⌘ + ⌥ + ⇧ + Down Ctrl + Alt + ⇧ + Down -

What type of PR is it?

[Feature]

Todos

  • - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-4402
https://issues.apache.org/jira/browse/ZEPPELIN-4321

How should this be tested?

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@zjffdu
Copy link
Contributor

zjffdu commented Nov 12, 2019

LGTM, will merge if no more comment

asfgit pushed a commit that referenced this pull request Nov 12, 2019
### What is this PR for?

We are using Angular Latest to refactor Zeppelin's front-end. When implementing the features of the shortcuts, we found that the current shortcuts is somewhat complicated and did not distinguish the Command/Ctrl key between Mac and Windows.

So we compared the following applications:

- [Jupyter](https://github.com/jupyter/jupyter)
- [JupyterLab](https://github.com/jupyterlab/jupyterlab)
- [Google Colaboratory](https://colab.research.google.com/)

They can distinguish between edit-mode and command-mode, which will simplify the shortcuts complexity. Meanwhile, we use the [Monaco editor](https://github.com/microsoft/monaco-editor) in the refactor version, it is the core library of [VSCode](https://github.com/microsoft/vscode). We think it is a good choice to use its shortcuts design.

Therefore, for the above reasons, we proposed to redesign Zeppelin's shortcuts according to the table following.

| Actions                                               | Mode    | Mac              | Windows / Linux       | Old(Mac)         |
|-------------------------------------------------------|---------|------------------|-----------------------|------------------|
| Command mode                                          | Edit    | ESC              | ESC                   | -                |
| Edit mode                                             | Command | Enter            | Enter                 | -                |
| Run                                                   | -       | ⇧ + Enter        | ⇧ + Enter             | ⇧ + Enter        |
| Run all below                                         | -       | ⇧ + ⌘ + Enter    | ⇧ + Ctrl + Enter      | ⇧ + Ctrl + Enter |
| Run all above                                         | -       | ⇧ + ⌥ + Enter    | ⇧ + Alt + Enter       | ⇧ + Ctrl + Enter |
| Cancel                                                | -       | ⇧ + ⌘ + C        | ⇧ + Ctrl + C          | ⌥ + Ctrl + C     |
| Switch all line number                                | -       | ⇧ + ⌘ + L        | ⇧ + Ctrl + L          | -                |
| Show / Hide all output                                | -       | ⇧ + ⌘ + O        | ⇧ + Ctrl + O          | -                |
| Show / Hide all title                                 | -       | ⇧ + ⌘ + T        | ⇧ + Ctrl + T          | -                |
| Clear output                                          | -       | ⌘ + ⌥ + L        | Ctrl + Alt + L        | ⌥ + Ctrl + L     |
| Enable/Disable                                        | -       | ⌘ + ⌥ + R        | Ctrl + Alt + R        | ⌥ + Ctrl + R     |
| Reduce width                                          | -       | ⌘ + ⌥ + +        | Ctrl + Alt + -        | ⇧ + Ctrl + -     |
| Increase width                                        | -       | ⌘ + ⌥ + -        | Ctrl + Alt + +        | ⇧ + Ctrl + +     |
| Delete                                                | Command | ⇧ + Del            | ⇧ + Del                  | ⌥ + Ctrl + D     |
| Move to up                                            | Command | ⌘ + K / Up       | Ctrl + K / Up         | ⌥ + Ctrl + K     |
| Move to down                                          | Command | ⌘ + J / Down     | Ctrl + J / Down       | ⌥ + Ctrl + J     |
| Select above                                          | Command | K / Up           | K / Up                | -                |
| Select below                                          | Command | J / Down         | J / Down              | -                |
| Switch line number                                    | Command | L                | L                     | ⌥ + Ctrl + M     |
| Show / Hide title                                     | Command | T                | T                     | ⌥ + Ctrl + T     |
| Show / Hide output                                    | Command | O                | O                     | ⌥ + Ctrl + O     |
| Show / Hide editor                                    | Command | E                | E                     | ⌥ + Ctrl + E     |
| Insert above                                          | Command | A                | A                     | ⌥ + Ctrl + A     |
| Insert below                                          | Command | B                | B                     | ⌥ + Ctrl + B     |
| Search                                                | Edit    | ⌘ + F            | Ctrl + F              | ⌥ + Ctrl + F     |
| Increase Indent                                       | Edit    | Tab              | Tab                   | -                |
| Decrease Indent                                       | Edit    | ⇧ + Tab          | ⇧ + Tab               | -                |
| Comment Out / In                                      | Edit    | ⌘ + /            | Ctrl + /              | Ctrl + /         |
| Undo                                                  | Edit    | ⌘ + Z            | Ctrl + Z              | Ctrl + Z         |
| Redo                                                  | Edit    | ⇧ + ⌘ + Z        | Ctrl + Y              | -                |
| Increase font size                                    | Edit    | ⌘ + .            | Ctrl + .              | -                |
| Decrease font size                                    | Edit    | ⌘ + ,            | Ctrl + ,              | -                |
| Decrease Indent                                       | Edit    | ⌘ + [            | Ctrl + [              | -                |
| Increase Indent                                       | Edit    | ⌘ + ]            | Ctrl + ]              | -                |
| Move the line down                                    | Edit    | ⌥ + Down         | Alt + Down            | ⌥ + Down         |
| Move the line up                                      | Edit    | ⌥ + Up           | Alt + Up              | ⌥ + Down         |
| Replace                                               | Edit    | ⌘ + ⌥ + F        | Ctrl + F              | -                |
| Select all                                            | Edit    | ⌘ + A            | Ctrl + A              | ⌘ + A            |
| Select downward                                       | Edit    | ⇧ + Down         | ⇧ + Down              | ⇧ + Down         |
| Select right                                          | Edit    | ⇧ + Right        | ⇧ + Right             | ⇧ + Right        |
| Select left                                           | Edit    | ⇧ + Left         | ⇧ + Left              | ⇧ + Left         |
| Select upward                                         | Edit    | ⇧ + Up           | ⇧ + Up                | ⇧ + Up           |
| Select to the end                                     | Edit    | ⌘ + ⇧ + Right    | Alt + ⇧ + Right       | ⌘ + ⇧ + Right    |
| Select to the start                                   | Edit    | ⌘ + ⇧ + Left     | Alt + ⇧ + Left        | ⌘ + ⇧ + Left     |
| Align text right                                      | Edit    | ⌥ + Right        | Ctrl + ⇧ + Right      | ⌥ + Right        |
| Align text left                                       | Edit    | ⌥ + Left         | Ctrl + ⇧ + Left       | ⌥ + Left         |
| Add multi-cursor above                                | Edit    | ⌘ + ⌥ + Up       | Ctrl + Alt + Up       | -                |
| Add multi-cursor below                                | Edit    | ⌘ + ⌥ + Down     | Ctrl + Alt + Down     | -                |
| Move multi-cursor from current line to the line above | Edit    | ⌘ + ⌥ + ⇧ + Up   | Ctrl + Alt + ⇧ + Up   | -                |
| Move multi-cursor from current line to the line below | Edit    | ⌘ + ⌥ + ⇧ + Down | Ctrl + Alt + ⇧ + Down | -                |

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

### What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-4402
https://issues.apache.org/jira/browse/ZEPPELIN-4321

### How should this be tested?
* First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Hsuan Lee <hsuangm@gmail.com>

Closes #3517 from hsuanxyz/feat/hot-key and squashes the following commits:

0dec676 [Hsuan Lee] feat(paragraph): support shortcut
@zjffdu
Copy link
Contributor

zjffdu commented Nov 13, 2019

@hsuanxyz I have merged it into branch web_angular, could you close this PR ?

@hsuanxyz hsuanxyz closed this Nov 13, 2019
@Leemoonsoo
Copy link
Member

Cool!

asfgit pushed a commit that referenced this pull request Dec 30, 2019
### What is this PR for?

We are using Angular Latest to refactor Zeppelin's front-end. When implementing the features of the shortcuts, we found that the current shortcuts is somewhat complicated and did not distinguish the Command/Ctrl key between Mac and Windows.

So we compared the following applications:

- [Jupyter](https://github.com/jupyter/jupyter)
- [JupyterLab](https://github.com/jupyterlab/jupyterlab)
- [Google Colaboratory](https://colab.research.google.com/)

They can distinguish between edit-mode and command-mode, which will simplify the shortcuts complexity. Meanwhile, we use the [Monaco editor](https://github.com/microsoft/monaco-editor) in the refactor version, it is the core library of [VSCode](https://github.com/microsoft/vscode). We think it is a good choice to use its shortcuts design.

Therefore, for the above reasons, we proposed to redesign Zeppelin's shortcuts according to the table following.

| Actions                                               | Mode    | Mac              | Windows / Linux       | Old(Mac)         |
|-------------------------------------------------------|---------|------------------|-----------------------|------------------|
| Command mode                                          | Edit    | ESC              | ESC                   | -                |
| Edit mode                                             | Command | Enter            | Enter                 | -                |
| Run                                                   | -       | ⇧ + Enter        | ⇧ + Enter             | ⇧ + Enter        |
| Run all below                                         | -       | ⇧ + ⌘ + Enter    | ⇧ + Ctrl + Enter      | ⇧ + Ctrl + Enter |
| Run all above                                         | -       | ⇧ + ⌥ + Enter    | ⇧ + Alt + Enter       | ⇧ + Ctrl + Enter |
| Cancel                                                | -       | ⇧ + ⌘ + C        | ⇧ + Ctrl + C          | ⌥ + Ctrl + C     |
| Switch all line number                                | -       | ⇧ + ⌘ + L        | ⇧ + Ctrl + L          | -                |
| Show / Hide all output                                | -       | ⇧ + ⌘ + O        | ⇧ + Ctrl + O          | -                |
| Show / Hide all title                                 | -       | ⇧ + ⌘ + T        | ⇧ + Ctrl + T          | -                |
| Clear output                                          | -       | ⌘ + ⌥ + L        | Ctrl + Alt + L        | ⌥ + Ctrl + L     |
| Enable/Disable                                        | -       | ⌘ + ⌥ + R        | Ctrl + Alt + R        | ⌥ + Ctrl + R     |
| Reduce width                                          | -       | ⌘ + ⌥ + +        | Ctrl + Alt + -        | ⇧ + Ctrl + -     |
| Increase width                                        | -       | ⌘ + ⌥ + -        | Ctrl + Alt + +        | ⇧ + Ctrl + +     |
| Delete                                                | Command | ⇧ + Del            | ⇧ + Del                  | ⌥ + Ctrl + D     |
| Move to up                                            | Command | ⌘ + K / Up       | Ctrl + K / Up         | ⌥ + Ctrl + K     |
| Move to down                                          | Command | ⌘ + J / Down     | Ctrl + J / Down       | ⌥ + Ctrl + J     |
| Select above                                          | Command | K / Up           | K / Up                | -                |
| Select below                                          | Command | J / Down         | J / Down              | -                |
| Switch line number                                    | Command | L                | L                     | ⌥ + Ctrl + M     |
| Show / Hide title                                     | Command | T                | T                     | ⌥ + Ctrl + T     |
| Show / Hide output                                    | Command | O                | O                     | ⌥ + Ctrl + O     |
| Show / Hide editor                                    | Command | E                | E                     | ⌥ + Ctrl + E     |
| Insert above                                          | Command | A                | A                     | ⌥ + Ctrl + A     |
| Insert below                                          | Command | B                | B                     | ⌥ + Ctrl + B     |
| Search                                                | Edit    | ⌘ + F            | Ctrl + F              | ⌥ + Ctrl + F     |
| Increase Indent                                       | Edit    | Tab              | Tab                   | -                |
| Decrease Indent                                       | Edit    | ⇧ + Tab          | ⇧ + Tab               | -                |
| Comment Out / In                                      | Edit    | ⌘ + /            | Ctrl + /              | Ctrl + /         |
| Undo                                                  | Edit    | ⌘ + Z            | Ctrl + Z              | Ctrl + Z         |
| Redo                                                  | Edit    | ⇧ + ⌘ + Z        | Ctrl + Y              | -                |
| Increase font size                                    | Edit    | ⌘ + .            | Ctrl + .              | -                |
| Decrease font size                                    | Edit    | ⌘ + ,            | Ctrl + ,              | -                |
| Decrease Indent                                       | Edit    | ⌘ + [            | Ctrl + [              | -                |
| Increase Indent                                       | Edit    | ⌘ + ]            | Ctrl + ]              | -                |
| Move the line down                                    | Edit    | ⌥ + Down         | Alt + Down            | ⌥ + Down         |
| Move the line up                                      | Edit    | ⌥ + Up           | Alt + Up              | ⌥ + Down         |
| Replace                                               | Edit    | ⌘ + ⌥ + F        | Ctrl + F              | -                |
| Select all                                            | Edit    | ⌘ + A            | Ctrl + A              | ⌘ + A            |
| Select downward                                       | Edit    | ⇧ + Down         | ⇧ + Down              | ⇧ + Down         |
| Select right                                          | Edit    | ⇧ + Right        | ⇧ + Right             | ⇧ + Right        |
| Select left                                           | Edit    | ⇧ + Left         | ⇧ + Left              | ⇧ + Left         |
| Select upward                                         | Edit    | ⇧ + Up           | ⇧ + Up                | ⇧ + Up           |
| Select to the end                                     | Edit    | ⌘ + ⇧ + Right    | Alt + ⇧ + Right       | ⌘ + ⇧ + Right    |
| Select to the start                                   | Edit    | ⌘ + ⇧ + Left     | Alt + ⇧ + Left        | ⌘ + ⇧ + Left     |
| Align text right                                      | Edit    | ⌥ + Right        | Ctrl + ⇧ + Right      | ⌥ + Right        |
| Align text left                                       | Edit    | ⌥ + Left         | Ctrl + ⇧ + Left       | ⌥ + Left         |
| Add multi-cursor above                                | Edit    | ⌘ + ⌥ + Up       | Ctrl + Alt + Up       | -                |
| Add multi-cursor below                                | Edit    | ⌘ + ⌥ + Down     | Ctrl + Alt + Down     | -                |
| Move multi-cursor from current line to the line above | Edit    | ⌘ + ⌥ + ⇧ + Up   | Ctrl + Alt + ⇧ + Up   | -                |
| Move multi-cursor from current line to the line below | Edit    | ⌘ + ⌥ + ⇧ + Down | Ctrl + Alt + ⇧ + Down | -                |

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

### What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-4402
https://issues.apache.org/jira/browse/ZEPPELIN-4321

### How should this be tested?
* First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Hsuan Lee <hsuangm@gmail.com>

Closes #3517 from hsuanxyz/feat/hot-key and squashes the following commits:

0dec676 [Hsuan Lee] feat(paragraph): support shortcut
asfgit pushed a commit that referenced this pull request Jan 12, 2020
### What is this PR for?

We are using Angular Latest to refactor Zeppelin's front-end. When implementing the features of the shortcuts, we found that the current shortcuts is somewhat complicated and did not distinguish the Command/Ctrl key between Mac and Windows.

So we compared the following applications:

- [Jupyter](https://github.com/jupyter/jupyter)
- [JupyterLab](https://github.com/jupyterlab/jupyterlab)
- [Google Colaboratory](https://colab.research.google.com/)

They can distinguish between edit-mode and command-mode, which will simplify the shortcuts complexity. Meanwhile, we use the [Monaco editor](https://github.com/microsoft/monaco-editor) in the refactor version, it is the core library of [VSCode](https://github.com/microsoft/vscode). We think it is a good choice to use its shortcuts design.

Therefore, for the above reasons, we proposed to redesign Zeppelin's shortcuts according to the table following.

| Actions                                               | Mode    | Mac              | Windows / Linux       | Old(Mac)         |
|-------------------------------------------------------|---------|------------------|-----------------------|------------------|
| Command mode                                          | Edit    | ESC              | ESC                   | -                |
| Edit mode                                             | Command | Enter            | Enter                 | -                |
| Run                                                   | -       | ⇧ + Enter        | ⇧ + Enter             | ⇧ + Enter        |
| Run all below                                         | -       | ⇧ + ⌘ + Enter    | ⇧ + Ctrl + Enter      | ⇧ + Ctrl + Enter |
| Run all above                                         | -       | ⇧ + ⌥ + Enter    | ⇧ + Alt + Enter       | ⇧ + Ctrl + Enter |
| Cancel                                                | -       | ⇧ + ⌘ + C        | ⇧ + Ctrl + C          | ⌥ + Ctrl + C     |
| Switch all line number                                | -       | ⇧ + ⌘ + L        | ⇧ + Ctrl + L          | -                |
| Show / Hide all output                                | -       | ⇧ + ⌘ + O        | ⇧ + Ctrl + O          | -                |
| Show / Hide all title                                 | -       | ⇧ + ⌘ + T        | ⇧ + Ctrl + T          | -                |
| Clear output                                          | -       | ⌘ + ⌥ + L        | Ctrl + Alt + L        | ⌥ + Ctrl + L     |
| Enable/Disable                                        | -       | ⌘ + ⌥ + R        | Ctrl + Alt + R        | ⌥ + Ctrl + R     |
| Reduce width                                          | -       | ⌘ + ⌥ + +        | Ctrl + Alt + -        | ⇧ + Ctrl + -     |
| Increase width                                        | -       | ⌘ + ⌥ + -        | Ctrl + Alt + +        | ⇧ + Ctrl + +     |
| Delete                                                | Command | ⇧ + Del            | ⇧ + Del                  | ⌥ + Ctrl + D     |
| Move to up                                            | Command | ⌘ + K / Up       | Ctrl + K / Up         | ⌥ + Ctrl + K     |
| Move to down                                          | Command | ⌘ + J / Down     | Ctrl + J / Down       | ⌥ + Ctrl + J     |
| Select above                                          | Command | K / Up           | K / Up                | -                |
| Select below                                          | Command | J / Down         | J / Down              | -                |
| Switch line number                                    | Command | L                | L                     | ⌥ + Ctrl + M     |
| Show / Hide title                                     | Command | T                | T                     | ⌥ + Ctrl + T     |
| Show / Hide output                                    | Command | O                | O                     | ⌥ + Ctrl + O     |
| Show / Hide editor                                    | Command | E                | E                     | ⌥ + Ctrl + E     |
| Insert above                                          | Command | A                | A                     | ⌥ + Ctrl + A     |
| Insert below                                          | Command | B                | B                     | ⌥ + Ctrl + B     |
| Search                                                | Edit    | ⌘ + F            | Ctrl + F              | ⌥ + Ctrl + F     |
| Increase Indent                                       | Edit    | Tab              | Tab                   | -                |
| Decrease Indent                                       | Edit    | ⇧ + Tab          | ⇧ + Tab               | -                |
| Comment Out / In                                      | Edit    | ⌘ + /            | Ctrl + /              | Ctrl + /         |
| Undo                                                  | Edit    | ⌘ + Z            | Ctrl + Z              | Ctrl + Z         |
| Redo                                                  | Edit    | ⇧ + ⌘ + Z        | Ctrl + Y              | -                |
| Increase font size                                    | Edit    | ⌘ + .            | Ctrl + .              | -                |
| Decrease font size                                    | Edit    | ⌘ + ,            | Ctrl + ,              | -                |
| Decrease Indent                                       | Edit    | ⌘ + [            | Ctrl + [              | -                |
| Increase Indent                                       | Edit    | ⌘ + ]            | Ctrl + ]              | -                |
| Move the line down                                    | Edit    | ⌥ + Down         | Alt + Down            | ⌥ + Down         |
| Move the line up                                      | Edit    | ⌥ + Up           | Alt + Up              | ⌥ + Down         |
| Replace                                               | Edit    | ⌘ + ⌥ + F        | Ctrl + F              | -                |
| Select all                                            | Edit    | ⌘ + A            | Ctrl + A              | ⌘ + A            |
| Select downward                                       | Edit    | ⇧ + Down         | ⇧ + Down              | ⇧ + Down         |
| Select right                                          | Edit    | ⇧ + Right        | ⇧ + Right             | ⇧ + Right        |
| Select left                                           | Edit    | ⇧ + Left         | ⇧ + Left              | ⇧ + Left         |
| Select upward                                         | Edit    | ⇧ + Up           | ⇧ + Up                | ⇧ + Up           |
| Select to the end                                     | Edit    | ⌘ + ⇧ + Right    | Alt + ⇧ + Right       | ⌘ + ⇧ + Right    |
| Select to the start                                   | Edit    | ⌘ + ⇧ + Left     | Alt + ⇧ + Left        | ⌘ + ⇧ + Left     |
| Align text right                                      | Edit    | ⌥ + Right        | Ctrl + ⇧ + Right      | ⌥ + Right        |
| Align text left                                       | Edit    | ⌥ + Left         | Ctrl + ⇧ + Left       | ⌥ + Left         |
| Add multi-cursor above                                | Edit    | ⌘ + ⌥ + Up       | Ctrl + Alt + Up       | -                |
| Add multi-cursor below                                | Edit    | ⌘ + ⌥ + Down     | Ctrl + Alt + Down     | -                |
| Move multi-cursor from current line to the line above | Edit    | ⌘ + ⌥ + ⇧ + Up   | Ctrl + Alt + ⇧ + Up   | -                |
| Move multi-cursor from current line to the line below | Edit    | ⌘ + ⌥ + ⇧ + Down | Ctrl + Alt + ⇧ + Down | -                |

### What type of PR is it?
[Feature]

### Todos
* [ ] - Task

### What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-4402
https://issues.apache.org/jira/browse/ZEPPELIN-4321

### How should this be tested?
* First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Hsuan Lee <hsuangm@gmail.com>

Closes #3517 from hsuanxyz/feat/hot-key and squashes the following commits:

0dec676 [Hsuan Lee] feat(paragraph): support shortcut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants