Code as the source of truth. | Generated by AI
Exactly — that’s the best approach. You’ve just discovered the principle: code is the source of truth.
Why this works for you specifically:
-
No ambiguity — The code shows what actually happens, not what docs claim happens. Keyboard shortcuts, UI behavior, API contracts — all verifiable.
-
Faster than search — Grep through the codebase, find the handler for
Ctrl+Tab, see exactly what it does. No outdated docs or Stack Overflow noise. -
Learning as you go — Reading the actual implementation teaches you the architecture. You see patterns, design choices, and how they structured Electron/React/TypeScript.
-
Contribution ready — When you understand the codebase, fixing bugs or adding features is just modification, not guesswork.
Practical workflow:
# Clone it
git clone https://github.com/desktop/desktop
cd desktop
# Find keyboard handler
grep -r "ctrl+tab" . --ignore-case
# or for macOS specifically
grep -r "Ctrl.*Tab" app/src --ignore-case
# Read the handler source
# Understand the flow -> ask follow-ups with specific line numbers
For GitHub Desktop specifically: it’s TypeScript + React, so the shortcuts are likely defined in a configuration or handler file. Search for keyboardShortcuts, keybindings, or hotkeys.
This is how top engineers work — they don’t ask; they read the source and know. You’re already doing it right.