Skip to content

Commit 04cfd7f

Browse files
ktaletskmfisher87
andauthored
Provide mac equivalents for all keyboard shortcuts (#91)
* Add Mac keyboard shortcut equivalents to numbered chapters - Standardized all shortcuts to use Cmd/Ctrl+Key slash syntax - Added Mac equivalents for browser DevTools (F12 or Cmd/Ctrl+Shift+I, or Cmd+Option+I on Mac) - Added Mac equivalents for JupyterLab command palette (Cmd/Ctrl+Shift+C) - Updated Source Control shortcuts (Cmd/Ctrl+Shift+G) - Standardized Cursor shortcuts (Cmd/Ctrl+L, Cmd/Ctrl+N, Cmd/Ctrl+K, Cmd/Ctrl+,) - Verified Ctrl+C for SIGINT is correct on all platforms Files updated: - 02-anatomy-of-extensions.md - 03-debugging.md - 05-developing-with-ai.md * Update 04-materials/05-developing-with-ai.md Co-authored-by: Matt Fisher <[email protected]> * Update 04-materials/05-developing-with-ai.md Co-authored-by: Matt Fisher <[email protected]> --------- Co-authored-by: Matt Fisher <[email protected]>
1 parent 97a42c3 commit 04cfd7f

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

04-materials/02-anatomy-of-extensions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ Our extension will:
320320
...JupyterLab automatically opened in your browser when you started the server.
321321
:::
322322

323-
2. Confirm the extension was loaded. Open your browser's dev console (F12 or
324-
`CTRL+SHIFT+I`) and...
323+
2. Confirm the extension was loaded. Open your browser's dev console (`F12` or
324+
`Cmd/Ctrl+Shift+I`, or `Cmd+Option+I` on Mac) and...
325325

326326
:::{important} 👀 You should notice...
327327
:class: simple
@@ -363,7 +363,7 @@ git push -u origin main
363363

364364
### 🔧 Do a complete development loop
365365

366-
0. Close the JupyterLab server with `CTRL+C`.
366+
0. Close the JupyterLab server with `Ctrl+C`.
367367

368368
1. Make any change to the codebase.
369369
For example, alter the text in a `console.log()` message.
@@ -410,7 +410,7 @@ official template and set it up for development.
410410
We know how to iterate: we learned that the JupyterLab extension development loop is...
411411

412412
* Make a change to the code.
413-
* Shut down JupyterLab (`CTRL+C`).
413+
* Shut down JupyterLab (`Ctrl+C`).
414414
* Rebuild the extension with `jlpm build` [^rebuild-not-always-required].
415415
* Start JupyterLab with `jupyter lab`.
416416

@@ -622,14 +622,14 @@ the {term}`command palette <command palette>`.
622622

623623
### 🧪 Test
624624

625-
Stop your JupyterLab server (`CTRL+C`), then rebuild your extension (`jlpm
625+
Stop your JupyterLab server (`Ctrl+C`), then rebuild your extension (`jlpm
626626
build`), then restart JupyterLab (`jupyter lab`).
627627

628628
If everything went well, now you can test the extension in your browser.
629629

630630
To test from the {term}`command palette <command palette>`, click
631631
"View">"Commands" from the {term}`menu bar <menu bar>`, or use the shortcut
632-
`CTRL+SHIFT+C`.
632+
`Cmd/Ctrl+Shift+C`.
633633
Begin typing "Random image" and the command palette interface
634634
should autocomplete.
635635
Select "Random image with caption" and press `ENTER`.

04-materials/03-debugging.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,8 @@ This is where the real magic happens! Head to your browser and open the develope
117117

118118
:::{tip} 🔧 How to open DevTools
119119

120-
- **Windows/Linux**: Press `F12` or `Ctrl+Shift+I`
121-
- **Mac**: Press `Cmd+Option+I`
122-
:::
120+
Press `F12` or `Cmd/Ctrl+Shift+I` (or `Cmd+Option+I` on Mac)
121+
:::
123122

124123
### 💬 Console Tab
125124

@@ -186,7 +185,7 @@ From there, you can:
186185
- Temporarily modify HTML or CSS to test fixes
187186
188187
:::{hint}
189-
There are times where you might right-click on an element expecting to see the browser with the "Inspect" option, but are instead met with a JupyterLab menu. There are a few cases where JupyterLab prevents this default browser behavior and displays it's own context menu, but you can still access that browser menu by: holding `Shift` while right-clicking, or using the dev tools "Select an element" picker (using the keyboard shortcut `Cmd + Shift + C` for macOS or `Ctrl + Shift + C` for Windows/Linux).
188+
There are times where you might right-click on an element expecting to see the browser with the "Inspect" option, but are instead met with a JupyterLab menu. There are a few cases where JupyterLab prevents this default browser behavior and displays it's own context menu, but you can still access that browser menu by: holding `Shift` while right-clicking, or using the dev tools "Select an element" picker (using the keyboard shortcut `Cmd/Ctrl+Shift+C`).
190189
:::
191190

192191
---

04-materials/05-developing-with-ai.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,14 @@ AI can suggest code that breaks your extension. With frequent commits and stagin
340340
**The Four Safety Levels:**
341341

342342
```
343-
Level 1: Unsaved → Files on disk (Cmd/Ctrl + Z to undo)
343+
Level 1: Unsaved → Files on disk (Cmd/Ctrl+Z to undo)
344344
Level 2: Staged → git add (can unstage)
345345
Level 3: Committed → git commit (can reset)
346346
Level 4: Pushed → git push (permanent)
347347
```
348348

349349
**Keep an eye on Source Control**
350-
- Open the Source Control view (`Ctrl + Shift + G`)
350+
- Open the Source Control view (`Cmd/Ctrl+Shift+G`)
351351
- Keep this panel visible alongside your AI chat
352352
- You'll review all AI-generated changes here before committing
353353

@@ -561,7 +561,7 @@ This tells the AI assistant to use `micromamba` with the `jupytercon2025` enviro
561561

562562
### Verify that Cursor recognizes the rules
563563

564-
1. Open the Cursor Chat panel (`Cmd/Ctrl + L`) and choose Ask Mode
564+
1. Open the Cursor Chat panel (`Cmd/Ctrl+L`) and choose Ask Mode
565565

566566
:::{note}
567567
**⚠️ Avoid "Auto" mode** — it picks the cheapest model, not the best one.
@@ -664,7 +664,7 @@ Now that you're about to generate substantial code with AI, let's establish a di
664664

665665
```bash
666666
# After AI generates code:
667-
# 1. Review changes in Source Control panel (Cmd/Ctrl + Shift + G)
667+
# 1. Review changes in Source Control panel (`Cmd/Ctrl+Shift+G`)
668668

669669
# 2. Test if it works - build and verify
670670
jlpm build
@@ -692,7 +692,7 @@ When AI generates code that works, immediately stage those files (`git add`). Th
692692
:::
693693

694694
**Keep Source Control panel visible:**
695-
- `Ctrl + Shift + G` to open
695+
- `Cmd/Ctrl+Shift+G` to open
696696
- Shows all modified files with diff preview
697697
- Click any file to see exactly what changed
698698
- Stage/unstage with + and - buttons
@@ -718,7 +718,7 @@ With the right context and a detailed prompt, AI can build complete features in
718718

719719
:::{dropdown} Cursor prompting quick tips
720720
- **Use @ precisely**: `@code` (symbol), `@file` (e.g., `@src/index.ts`), `@folder` (e.g., `@src/utils/`). This steers Cursor to the exact context you want.
721-
- **Reference specific lines**: Select the lines and press `Cmd/Ctrl + L` to add them to the current chat as an `@` selection. Want a fresh chat? Press `Cmd/Ctrl + N` — the `@` reference carries over. Selection is prioritized; line‑range mentions via `@` arent supported.
721+
- **Reference specific lines**: Select the lines and press `Cmd/Ctrl+L` to add them to the current chat as an `@` selection. Want a fresh chat? Press `Cmd/Ctrl+N` — the `@` reference carries over. Selection is prioritized; line‑range mentions via `@` aren't supported.
722722
- **Bias auto‑context**: Cursor auto‑pulls from your session (active file, recent edits). Keep the relevant file active and close noisy, unrelated large files. Use `@` when you need deterministic precision.
723723
- **Docs as context**: After adding docs to Cursor, mention them with `@` (e.g., `@JupyterLab API`).
724724
:::
@@ -792,7 +792,7 @@ jupyter lab
792792
**Test the new features**:
793793
- Open the image viewer widget
794794
- Try each filter button
795-
- Check the browser console for errors (`F12` or `Cmd+Option+I`)
795+
- Check the browser console for errors (`F12` or `Ctrl+Shift+I`, or `Cmd+Option+I` on Mac)
796796
- Check the terminal running `jupyter lab` for Python errors
797797
- Find at least 3 decisions you might have made differently
798798

@@ -841,7 +841,7 @@ AI can understand what your extension looks like! This is powerful for debugging
841841
- **Windows:** Use Snipping Tool or `Win + Shift + S`
842842
- **Linux:** Use your screenshot tool (varies by desktop environment)
843843

844-
3. **Open Cursor chat** (`Cmd/Ctrl + L`) and drag or paste the screenshot into the chat
844+
3. **Open Cursor chat** (`Cmd/Ctrl+L`) and drag or paste the screenshot into the chat
845845

846846
4. **Try one of these prompts with your screenshot:**
847847

@@ -1042,7 +1042,7 @@ As you work through phases, keep an eye on **context window percentage** (shown
10421042
3. Use `@JupyterLab API` (or `@Lumino API`) in chat to use precise documentation when implementing a function.
10431043
:::
10441044

1045-
1. **Start a NEW chat** for Phase 1 (`Cmd/Ctrl + L` to focus on chat panel, then `Cmd/Ctrl + N` to start a new chat)
1045+
1. **Start a NEW chat** for Phase 1 (`Cmd/Ctrl+L` to focus on chat panel, then `Cmd/Ctrl+N` to start a new chat)
10461046

10471047
2. **Reference the plan:**
10481048

@@ -1056,7 +1056,7 @@ As you work through phases, keep an eye on **context window percentage** (shown
10561056
Note the `@plans/...` syntax tells AI to read that specific file.
10571057

10581058
3. **Review changes in Source Control** (keep this panel open!)
1059-
- Open `Ctrl + Shift + G` to see all modified files
1059+
- Open `Cmd/Ctrl+Shift+G` to see all modified files
10601060
- Click each file to review the diff
10611061
- Look for unexpected changes or files you didn't anticipate
10621062

@@ -1066,7 +1066,7 @@ As you work through phases, keep an eye on **context window percentage** (shown
10661066
jupyter lab
10671067
```
10681068
- Try the new filter buttons
1069-
- Check browser console (`F12`) for errors
1069+
- Check browser console (`F12` or `Cmd/Ctrl+Shift+I`, or `Cmd+Option+I` on Mac) for errors
10701070
- Verify backend logs in terminal
10711071

10721072
5. **Stage and commit after Phase 1 works:**
@@ -1109,6 +1109,8 @@ As you work through phases, keep an eye on **context window percentage** (shown
11091109
jlpm build
11101110
jupyter lab
11111111

1112+
# Check browser console for errors (F12 or Cmd/Ctrl+Shift+I, or Cmd+Option+I on Mac)
1113+
11121114
# Stage and commit (review each file first!)
11131115
git add src/widget.ts
11141116
git add jupytercon2025_extension_workshop/routes.py

0 commit comments

Comments
 (0)