Skip to content

Keyboard Shortcuts

Dragon edited this page Dec 22, 2025 · 2 revisions

⌨️ Keyboard Shortcuts Guide

Complete reference for all keyboard shortcuts in NaviDuck. Work faster, navigate smarter, and master the command line.

📋 Table of Contents


🌍 Global Shortcuts

Essential Shortcuts

Shortcut Action Description Works In
Ctrl+X Exit Quit immediately Everywhere
Ctrl+C Cancel Stop current operation Everywhere
Ctrl+L Clear Clear screen Everywhere
Tab Complete Auto-complete commands Command line
History Navigate command history Command line
Ctrl+R Search Search command history Command line
Ctrl+D EOF Exit if no input Command line
Ctrl+Z Suspend Suspend to background Unix/Mac only

Navigation Shortcuts

Shortcut Action Description
Alt+← Back Go to previous page
Alt+→ Forward Go to next page
Alt+R Refresh Reload current page
Alt+H Home Go to homepage
Alt+S Search Focus search bar
Alt+B Bookmarks Open bookmarks
Alt+T History Open history

Quick Access Shortcuts

Shortcut Action Equivalent Command
F1 Help help
F2 Settings settings
F5 Refresh refresh
F10 Exit quit
Ctrl+H History history
Ctrl+B Bookmarks bookmarks
Ctrl+T New Tab (Future feature)

🔍 Search Results Navigation

When Viewing Search Results

After any search (s query or search engine query), you'll see results like:

1. 🔍 Python Official Website - python.org
2. 🔍 Python Tutorial - w3schools.com/python
3. 🔍 Learn Python - Free Interactive Python Tutorial

Result Selection Shortcuts

Shortcut Action Description
1-0 Open Open result 1-10 in NaviDuck
o1-o0 Open External Open result 1-10 in browser
b Bookmark Bookmark first result
Enter Return Return to command line
q Quit Return to main menu
/ Filter Filter results (future)
n Next Next page of results
p Previous Previous page of results

Result Navigation Examples

Open Specific Result

Results appear...
Type: 3      # Opens 3rd result in NaviDuck
Type: o2     # Opens 2nd result in browser
Type: b      # Bookmarks 1st result

Quick Actions

# After search, immediately press:
3          # Open 3rd result
o1         # Open 1st in browser  
b          # Bookmark 1st result
(Enter)    # Return to search
q          # Back to main

Advanced Result Navigation

Shortcut Action Description
j Down Move selection down
k Up Move selection up
g Top Go to first result
G Bottom Go to last result
d Download Download selected (future)
s Share Share result (future)
m Mark Mark for batch action (future)

📄 Page View Navigation

When Viewing Any Page

After opening a page (go URL or selecting from results), you'll see:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃        Page Title                   ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Page content here...

Page Actions:
  b - Bookmark this page
  o - Open in browser
  s - Search related
  h - Back to history
  q - Return to main

Page Action Shortcuts

Shortcut Action Description
b Bookmark Save current page
o Open Open in system browser
s Search Search related content
h History View browsing history
q Quit Return to main menu
Enter Continue Continue reading
Space Page Down Scroll down
u Page Up Scroll up

Page Navigation Shortcuts

Shortcut Action Description
j Scroll Down Scroll down one line
k Scroll Up Scroll up one line
Space Page Down Scroll one page down
b u Page Up Scroll one page up
g Top Go to top of page
G Bottom Go to bottom of page
/ Search Search in page (future)
n Next Next search match (future)
N Previous Previous match (future)

Page Interaction Examples

While Reading a Page

Press: Space   # Scroll down
Press: b       # Bookmark page
Press: o       # Open in browser
Press: s       # Search for related terms
Press: q       # Return to main

Quick Navigation

# Navigate long pages
gg          # Go to top
G           # Go to bottom
10j         # Down 10 lines
5k          # Up 5 lines

🕰️ History & Bookmarks Navigation

History List Navigation

When viewing history (history command):

1. 🔍 Search: python tutorial
2. 📄 Visited: python.org
3. 🔍 Search: machine learning

History Shortcuts

Shortcut Action Description
1-9 Open Open history item 1-9
j Down Move selection down
k Up Move selection up
Enter Open Open selected item
d Delete Delete selected (future)
q Quit Return to main
/ Search Filter history (future)
c Clear Clear all history

History Navigation Examples

history     # View history
# Then:
3           # Open 3rd item
j           # Move down
k           # Move up
(Enter)     # Open selected
q           # Return

Bookmarks List Navigation

When viewing bookmarks (bookmarks command):

1. 📑 Python Official Website
2. 📑 GitHub
3. 📑 Stack Overflow

Bookmark Shortcuts

Shortcut Action Description
1-9 Open Open bookmark 1-9
j Down Move selection down
k Up Move selection up
Enter Open Open selected bookmark
d Delete Delete selected bookmark
e Edit Edit bookmark (future)
q Quit Return to main
a Add Add new bookmark
/ Search Filter bookmarks (future)

Bookmark Management Examples

bookmarks   # View bookmarks
# Then:
2           # Open 2nd bookmark
d2          # Delete 2nd bookmark
o2          # Open 2nd in browser
q           # Return

⚙️ Settings Navigation

Settings Menu Navigation

When in settings (settings command):

1. Change default search engine
2. Manage search engines
3. Toggle icons
4. Set Tor path
5. Clear history
6. Clear bookmarks
7. Back to main

Settings Shortcuts

Shortcut Action Description
1-9 Select Choose menu option
j Down Move selection down
k Up Move selection up
Enter Confirm Select current option
q Quit Return to main
Esc Cancel Cancel and return

Sub-menu Navigation

In sub-menus (like engine management):

enable 1    # Enable engine 1
disable 2   # Disable engine 2
set 3       # Set engine 3 as default
back        # Return to settings

💻 Command Line Editing

Basic Editing Shortcuts

Shortcut Action Description
Ctrl+A Beginning Move to start of line
Ctrl+E End Move to end of line
Ctrl+B Back Move back one character
Ctrl+F Forward Move forward one character
Ctrl+W Delete Word Delete previous word
Ctrl+U Delete Line Delete entire line
Ctrl+K Delete to End Delete to end of line
Ctrl+Y Paste Paste deleted text

History Navigation

Shortcut Action Description
Previous Previous command
Next Next command
Ctrl+R Search Search command history
Ctrl+P Previous Same as up arrow
Ctrl+N Next Same as down arrow
Alt+< Beginning First command in history
Alt+> End Last command in history

Completion Shortcuts

Shortcut Action Description
Tab Complete Auto-complete command
Tab Tab List Show completion options
Alt+? List Show possible completions
Alt+* Insert Insert all completions

Editing Examples

Quick Command Editing

naviduck> search python tutorial
# Press Ctrl+A to go to start
# Press Ctrl+F to move forward
# Press Ctrl+B to move back
# Press Ctrl+E to go to end
# Press Ctrl+U to delete line
# Press Ctrl+Y to paste it back

Using History

# Type partial command
naviduck> py
# Press ↑ to find "python tutorial"
# Press Ctrl+R, type "search" to find
# Press Enter to execute

🖥️ Platform-Specific Shortcuts

Windows Specific

Shortcut Action Notes
Ctrl+Break Exit Alternative to Ctrl+X
Alt+Enter Fullscreen Toggle fullscreen
Alt+F4 Close Close window
Win+↑ Maximize Maximize window
Win+↓ Minimize Minimize window
Ctrl+Shift+C Copy In some terminals
Ctrl+Shift+V Paste In some terminals

macOS Specific

Shortcut Action Notes
Cmd+Q Quit Quit application
Cmd+W Close Close window
Cmd+, Settings Open settings
Cmd+F Find Search in page
Cmd+L Location Focus address bar
Ctrl+Cmd+F Fullscreen Toggle fullscreen
Cmd+↑ Top Scroll to top
Cmd+↓ Bottom Scroll to bottom

Linux Specific

Shortcut Action Notes
Alt+F2 Run Run command
Ctrl+Alt+T Terminal New terminal
Ctrl+Shift+T Tab New tab
Ctrl+Shift+W Close Tab Close tab
Ctrl+PageUp Next Tab Next terminal tab
Ctrl+PageDown Previous Tab Previous tab
Shift+Insert Paste Paste from clipboard

Terminal-Specific Shortcuts

Windows Terminal

Ctrl+Shift+1      # New tab
Ctrl+Shift+W      # Close tab
Ctrl+Tab          # Next tab
Ctrl+Shift+Tab    # Previous tab
Alt+↑/↓           # Resize pane

iTerm2 (macOS)

Cmd+T             # New tab
Cmd+W             # Close tab
Cmd+Number        # Switch to tab
Cmd+Option+Arrow  # Switch pane
Cmd+Shift+H       # History

GNOME Terminal (Linux)

Ctrl+Shift+T      # New tab
Ctrl+Shift+W      # Close tab
Ctrl+PageUp/Down  # Switch tabs
Ctrl+Shift+C      # Copy
Ctrl+Shift+V      # Paste

🛠️ Custom Shortcuts

Creating Aliases

Shell Aliases

Add to ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish:

# Quick NaviDuck commands
alias nd="python ~/NaviDuck/naviduck.py"
alias nds="nd && s"  # NaviDuck with search
alias ndg="nd && go" # NaviDuck with go

# Common searches
alias searchpy="nd && s python"
alias searchweb="nd && s web development"
alias searchai="nd && ai"

# Quick actions
alias ndtor="nd && tor start"
alias ndhelp="nd && help"

NaviDuck Command Shortcuts

Create shortcut scripts:

#!/bin/bash
# ~/bin/nd-search
python ~/NaviDuck/naviduck.py <<EOF
s $@
EOF

Keyboard Macro Tools

Using AutoHotkey (Windows)

; Ctrl+Alt+S for NaviDuck search
^!s::
    Run, python C:\NaviDuck\naviduck.py
    Sleep, 1000
    Send, s{Space}
return

; Ctrl+Alt+A for NavAI
^!a::
    Run, python C:\NaviDuck\naviduck.py
    Sleep, 1000
    Send, ai{Space}
return

Using Hammerspoon (macOS)

-- Open NaviDuck with Cmd+Shift+N
hs.hotkey.bind({"cmd", "shift"}, "N", function()
    hs.execute("python ~/NaviDuck/naviduck.py")
end)

-- Quick search with Cmd+Shift+S
hs.hotkey.bind({"cmd", "shift"}, "S", function()
    hs.execute("python ~/NaviDuck/naviduck.py && s ")
end)

Using xbindkeys (Linux)

# ~/.xbindkeysrc
"python ~/NaviDuck/naviduck.py"
  Control+Shift+n

"python ~/NaviDuck/naviduck.py && s "
  Control+Shift+s

Custom Shortcut Configuration

Create Shortcuts File

# ~/.naviduck_shortcuts
# Format: shortcut=command
gs=go github.com
py=search python
ai=ai what is
so=go stackoverflow.com

Load Shortcuts

# In NaviDuck or wrapper script
while read line; do
    alias "${line%=*}"="python naviduck.py <<< '${line#*=}'"
done < ~/.naviduck_shortcuts

🚨 Troubleshooting

Common Shortcut Issues

"Shortcut doesn't work"

# Check 1: Terminal compatibility
# Some terminals handle shortcuts differently

# Check 2: Conflicts with shell
# Your shell might intercept shortcuts

# Check 3: OS differences
# Mac uses Cmd, Windows uses Ctrl, Linux uses Ctrl/Super

"Ctrl+C doesn't cancel"

# NaviDuck handles Ctrl+C specially
# It shows message instead of exiting
# Use Ctrl+X for immediate exit
# Or type 'quit' to exit properly

"Tab completion not working"

# Ensure readline/gnureadline installed
pip install gnureadline  # Unix/Mac

# On Windows, try:
pip install pyreadline3

Platform-Specific Issues

Windows Issues

# Windows Terminal vs Command Prompt
# Different shortcut behaviors

# Try: Ctrl+Shift+Key instead of Ctrl+Key
# Some terminals require Shift for copy/paste

macOS Issues

# iTerm2 vs Terminal.app differences
# Check iTerm2 preferences -> Keys

# Cmd vs Ctrl differences
# NaviDuck uses Ctrl, macOS often uses Cmd

Linux Issues

# Terminal emulator differences
# GNOME Terminal, Konsole, xterm all different

# Window manager shortcuts may conflict
# Check system keyboard shortcuts

Diagnostic Commands

Test Key Detection

# In terminal, test what keys are detected
read -n 1 key
echo "You pressed: $key"

# Or use Python
python3 -c "import sys; print(repr(sys.stdin.read(1)))"

Check Terminal Type

echo $TERM        # Terminal type
echo $TERM_PROGRAM  # Terminal program (macOS)
echo $WT_SESSION  # Windows Terminal session

View Current Bindings

# In bash
bind -p | grep -v "^#"

# In zsh
bindkey -L

⚡ Pro Tips

Efficiency Tips

Master the Essential 5

  1. Ctrl+X - Exit quickly
  2. Tab - Command completion
  3. - Command history
  4. Ctrl+R - History search
  5. Ctrl+L - Clear screen

Create Muscle Memory

# Practice these sequences:
# 1. Search and open
s query → 1 → q

# 2. Search, open in browser
s query → o1 → q

# 3. Quick AI query
ai question → q

# 4. Bookmark workflow
go site → b → q

Use Number Shortcuts

# Instead of navigating with arrows:
# Slow: history → ↓ ↓ ↓ ↓ → Enter
# Fast: history → 4

Workflow Optimization

Chain Common Operations

# Create shell functions
ndsearch() {
    python ~/NaviDuck/naviduck.py <<EOF
s $1
$2  # Optional: auto-open result
EOF
}

# Use: ndsearch "python tutorial" 1

Use Keyboard Macros

Record common sequences:

# If your terminal supports macros
# Record: s python → 1 → b → q
# Assign to F2

Custom Key Bindings

# Add to .inputrc
# For readline/GNU readline
"\C-xs": "s "
"\C-xa": "ai "
"\C-xg": "go "

Advanced Techniques

Vim-Style Navigation

If you prefer Vim keys:

# Add to .inputrc
set editing-mode vi
set keymap vi

# Now use Vim keys:
# i - Insert mode
# Esc - Normal mode
# h,j,k,l - Navigation
# dd - Delete line
# p - Paste

Emacs-Style Navigation

Default is Emacs-style:

# Ctrl keys work like Emacs:
Ctrl+A/E - Line start/end
Ctrl+F/B - Forward/backward
Ctrl+N/P - Next/previous line
Ctrl+K - Kill line
Ctrl+Y - Yank (paste)

Custom Prompt Shortcuts

# Add shortcuts to prompt
export PS1="\n📦 NaviDuck> "
# Or include common commands
export PS1="\n[s/search/ai/go/open/help]> "

Productivity Hacks

Quick Launch Scripts

#!/bin/bash
# quick_nd.sh - One-key NaviDuck
case $1 in
    "search") python naviduck.py <<< "s $2" ;;
    "ai") python naviduck.py <<< "ai $2" ;;
    "go") python naviduck.py <<< "go $2" ;;
    *) python naviduck.py ;;
esac

# Make executable, then:
quick_nd search "python tutorial"

Desktop Shortcuts

Create desktop/launcher shortcuts:

# Linux .desktop file
[Desktop Entry]
Name=NaviDuck
Exec=python /path/to/naviduck.py
Icon=terminal
Terminal=true
Type=Application

# Windows shortcut
# Target: python.exe C:\NaviDuck\naviduck.py

Browser Integration

Bookmarklet for quick searches:

javascript:location.href='python://naviduck/search?q='+encodeURIComponent(window.getSelection());

Accessibility Tips

For Reduced Mobility

# Use fewer keys, more automation
# Create scripts for common tasks
# Use mouse if terminal supports
# Increase font size in terminal

For Visual Impairment

# Use high contrast themes
# Increase font size
# Use screen reader compatible output
# Stick to text-based navigation

For Repetitive Strain

# Use fewer keystrokes
# Create aliases for long commands
# Use tab completion aggressively
# Consider voice control integration

🎮 Shortcut Games & Practice

Shortcut Drills

# Drill 1: Basic Navigation
# Time yourself:
# 1. Open NaviDuck
# 2. Search "python"
# 3. Open 3rd result
# 4. Bookmark it
# 5. Exit
# Target: Under 15 seconds

# Drill 2: History Usage
# 1. Do 5 different searches
# 2. Navigate history with ↑ only
# 3. Reopen 2nd search
# 4. Exit
# Target: Under 20 seconds

Shortcut Challenges

# Challenge 1: No Mouse
# Complete a research task without touching mouse
# 1. Find information
# 2. Bookmark useful pages
# 3. Ask AI follow-up
# 4. Save notes

# Challenge 2: Speed Run
# How quickly can you:
# 1. Find current weather
# 2. Find news headlines
# 3. Bookmark both
# 4. Exit

Learning Progress

Track your shortcut mastery:

# Week 1: Learn 5 essential shortcuts
# Week 2: Add 5 navigation shortcuts  
# Week 3: Master command line editing
# Week 4: Create custom shortcuts
# Month 2: No longer need mouse

🔮 Future Shortcut Features

Planned Shortcuts

  • Customizable key bindings
  • Mouse support for clicking
  • Gesture support on touch devices
  • Voice commands integration
  • Multi-key chorded shortcuts
  • Context-aware shortcuts
  • Shortcut suggestions based on usage
  • Shortcut training mode

Community Requests

  • Vim/Emacs mode toggle
  • Game controller support
  • Eye tracking integration
  • Brain-computer interface (future!)
  • Shortcut sharing between users
  • Shortcut conflict detection
  • Accessibility shortcut profiles
  • Child-friendly simplified shortcuts

📚 Related Resources


💡 Shortcut Wisdom

Golden Rules for Shortcuts

  1. Learn gradually - Master a few at a time
  2. Practice regularly - Use them or lose them
  3. Customize for you - Adapt to your workflow
  4. Teach others - Solidify your own knowledge
  5. Stay updated - New shortcuts get added

Remember:

"A shortcut mastered is time earned. The minutes you save each day become hours each year."


❓ Shortcut FAQ

Q: Can I change the shortcuts? A: Not currently, but planned for future versions.

Q: Why doesn't Ctrl+C quit? A: Ctrl+X is for immediate exit. Ctrl+C cancels operations.

Q: Do shortcuts work over SSH? A: Yes, but depends on your SSH client and terminal.

Q: Can I use a game controller? A: Not currently, but could be added if there's interest.

Q: Are there shortcuts for visually impaired users? A: Standard terminal navigation works with screen readers.

Q: Can I create my own shortcuts? A: Through shell aliases and scripts, yes.

Q: Do shortcuts work in all terminals? A: Most work in modern terminals. Some vary by platform.

Q: How do I see all available shortcuts? A: Type help shortcuts in NaviDuck.


"Keyboard shortcuts turn thought into action. Master them, and you master the machine."

# Try a new shortcut now:
# Press Ctrl+L to clear screen
# Press Tab while typing command
# Press ↑ to repeat last command

Happy shortcutting! ⌨️⚡


Last updated: 12/22/2025
Keyboard Shortcuts Guide version: 2.0

Clone this wiki locally