Skip to content

Commit

Permalink
Merge pull request #4 from firezym/main
Browse files Browse the repository at this point in the history
change `ctrl+num` hotkeys to `alt+num`
  • Loading branch information
parmentelat authored Nov 28, 2023
2 parents 311c869 + a13c1d4 commit bb3032c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,5 @@ dmypy.json
.DS_Store

.yarn/

yarn.lock
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It was have preferred not to re-use the term 'split', because in jupyterlab _spl

there is no button (yet) in this extension to do the equivalent of the former 'split-cell' thing, you can use

- either keyboard Ctrl-\ Ctrl-1 Ctrl-2 (meaning you want to use 1 / 2 of the horizontal space)
- either keyboard `Alt+1, Alt+2` (meaning you want to use 1 / 2 of the horizontal space)
- or type `gridwidth` in the Palette and pick 1/2
- or command `gridwidth:toggle-1-2`
- that you can bind to a keyboard shortcut of your choice
Expand All @@ -40,9 +40,9 @@ notebooks passed as arguments

### keyboard shortcuts

- `Ctrl-\ Ctrl-1 Ctrl-2` and so on; these will toggle the corresponding tag, and
- `Alt+1, Alt+2` and so on; these will toggle the corresponding tag, and
remove any other tag that might be present
- `Ctrl-\ Ctrl-0` to reset to full width
- `Alt+0` to reset to full width

### available tags:

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
palette.addItem({ command, category: 'gridwidth' })
app.commands.addKeyBinding({
command,
keys: ['Ctrl \\', `Ctrl ${num}`, `Ctrl ${den}`],
keys: [`Alt ${num}`, `Alt ${den}`],
selector: '.jp-Notebook'
})
}
Expand All @@ -85,7 +85,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
palette.addItem({ command, category: 'gridwidth' })
app.commands.addKeyBinding({
command,
keys: ['Ctrl \\', 'Ctrl 0'],
keys: ['Alt 0'],
selector: '.jp-Notebook'
})
}
Expand Down

0 comments on commit bb3032c

Please sign in to comment.