History

Fix copy shortcut in macOS notebook cells (#59431)

Fix `cmd-c` not copying text inside macOS notebook cell editors. Previously, the macOS notebook keymap bound `cmd-c` to `notebook::InterruptKernel` in notebook contexts, including `NotebookEditor > Editor`. This shadowed the normal editor copy shortcut while editing notebook cells. ## Solution Move the macOS notebook interrupt shortcut from `cmd-c` to `ctrl-c`. This keeps the notebook interrupt shortcut available while allowing the normal editor keybindings to handle: - `cmd-c` for copy - `cmd-x` for cut - `cmd-v` for paste inside notebook cell editors. - This change is macOS-specific. Release Notes: - N/A ---------

AA committed 5 months ago

Commit ea673ff1 parent f9a4bfd3 files · +0 −3Browse files

Unified · Split

3 files
  1. assets/keymaps/default-linux.json +0 −1
  2. assets/keymaps/default-macos.json +0 −1
  3. assets/keymaps/default-windows.json +0 −1
assets/keymaps/default-linux.json+0−1
@@ -1495,7 +1495,6 @@ · 1494 unmodified lines
1495 "ctrl-m": "notebook::AddCodeBlock",1495 "ctrl-m": "notebook::AddCodeBlock",
1496 "ctrl-shift-m": "notebook::AddMarkdownBlock",1496 "ctrl-shift-m": "notebook::AddMarkdownBlock",
1497 "ctrl-shift-r": "notebook::RestartKernel",1497 "ctrl-shift-r": "notebook::RestartKernel",
1498 "ctrl-c": "notebook::InterruptKernel",
1499 "escape": "notebook::EnterCommandMode",1498 "escape": "notebook::EnterCommandMode",
1500 },1499 },
1501 },1500 },
assets/keymaps/default-macos.json+0−1
@@ -1633,7 +1633,6 @@ · 1632 unmodified lines
1633 "cmd-m": "notebook::AddCodeBlock",1633 "cmd-m": "notebook::AddCodeBlock",
1634 "cmd-shift-m": "notebook::AddMarkdownBlock",1634 "cmd-shift-m": "notebook::AddMarkdownBlock",
1635 "cmd-shift-r": "notebook::RestartKernel",1635 "cmd-shift-r": "notebook::RestartKernel",
1636 "cmd-c": "notebook::InterruptKernel",
1637 "escape": "notebook::EnterCommandMode",1636 "escape": "notebook::EnterCommandMode",
1638 },1637 },
1639 },1638 },
assets/keymaps/default-windows.json+0−1
@@ -1558,7 +1558,6 @@ · 1557 unmodified lines
1558 "ctrl-m": "notebook::AddCodeBlock",1558 "ctrl-m": "notebook::AddCodeBlock",
1559 "ctrl-shift-m": "notebook::AddMarkdownBlock",1559 "ctrl-shift-m": "notebook::AddMarkdownBlock",
1560 "ctrl-shift-r": "notebook::RestartKernel",1560 "ctrl-shift-r": "notebook::RestartKernel",
1561 "ctrl-c": "notebook::InterruptKernel",
1562 "escape": "notebook::EnterCommandMode",1561 "escape": "notebook::EnterCommandMode",
1563 },1562 },
1564 },1563 },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t