Skip to main content
Glama

Keyboard Shortcuts MCP Server

by jenova-marie
keyboard-shortcuts.md64.5 kB
# UBUNTU_KB.md - Complete Ubuntu Keyboard Reference for Computer Use ## SECTION 1: System-Level Navigation (GNOME/Ubuntu Desktop) ### Window Management - `Super` - Open Activities Overview (search apps/windows/files) - `Super + A` - Show Applications menu - `Alt + F1` - Open Applications menu (alternative) - `Alt + F2` - Run command dialog - `Super + L` - Lock screen - `Ctrl + Alt + Del` - Log out dialog - `Super + D` - Show desktop (minimize all windows) - `Super + M` - Toggle notification tray ### Window Switching & Control - `Alt + Tab` - Switch between applications - `Alt + Shift + Tab` - Switch between applications (reverse) - `Alt + \`` (backtick) - Switch between windows of same application - `Super + Tab` - Switch between applications (alternative) - `Alt + F4` - Close current window - `Alt + F5` - Unmaximize window - `Alt + F7` - Move window (then use arrow keys) - `Alt + F8` - Resize window (then use arrow keys) - `Alt + F9` - Minimize window - `Alt + F10` - Maximize window - `Super + ↑` - Maximize window - `Super + ↓` - Restore/unmaximize window - `Super + ←` - Tile window to left half - `Super + →` - Tile window to right half - `Super + H` - Hide window (minimize) ### Virtual Desktops/Workspaces - `Ctrl + Alt + ↑` - Switch to workspace above - `Ctrl + Alt + ↓` - Switch to workspace below - `Ctrl + Alt + ←` - Switch to workspace left - `Ctrl + Alt + →` - Switch to workspace right - `Shift + Ctrl + Alt + ↑` - Move window to workspace above - `Shift + Ctrl + Alt + ↓` - Move window to workspace below - `Shift + Ctrl + Alt + ←` - Move window to workspace left - `Shift + Ctrl + Alt + →` - Move window to workspace right - `Super + Page Up` - Switch to workspace above (alternative) - `Super + Page Down` - Switch to workspace below (alternative) ### System Functions - `Ctrl + Alt + T` - Open terminal - `Print Screen` - Take screenshot of entire screen - `Alt + Print Screen` - Take screenshot of current window - `Shift + Print Screen` - Take screenshot of selected area - `Ctrl + Alt + L` - Lock screen (alternative) - `Super + P` - Switch display mode (mirror/extend) --- ## SECTION 2: Terminal & Shell (Critical for System Control) ### Terminal Application Shortcuts - `Ctrl + Shift + T` - New tab - `Ctrl + Shift + W` - Close tab - `Ctrl + Shift + N` - New terminal window - `Ctrl + Shift + Q` - Close terminal window - `Ctrl + Page Up` - Previous tab - `Ctrl + Page Down` - Next tab - `Alt + 1-9` - Switch to tab 1-9 - `Ctrl + Shift + C` - Copy - `Ctrl + Shift + V` - Paste - `Ctrl + Shift + F` - Find in terminal - `Ctrl + Shift + +` - Zoom in - `Ctrl + -` - Zoom out - `Ctrl + 0` - Reset zoom - `F11` - Toggle fullscreen ### Shell Command Line Editing - `Ctrl + A` - Move to beginning of line - `Ctrl + E` - Move to end of line - `Ctrl + U` - Delete from cursor to beginning - `Ctrl + K` - Delete from cursor to end - `Ctrl + W` - Delete word before cursor - `Alt + D` - Delete word after cursor - `Ctrl + Y` - Paste deleted text - `Ctrl + L` - Clear screen - `Ctrl + R` - Reverse search history - `Ctrl + S` - Forward search history (may need `stty -ixon`) - `Ctrl + G` - Escape from search - `Alt + F` - Move forward one word - `Alt + B` - Move backward one word - `Ctrl + T` - Swap last two characters - `Alt + T` - Swap last two words - `Ctrl + _` - Undo last edit ### Process Control - `Ctrl + C` - Interrupt/kill process (SIGINT) - `Ctrl + Z` - Suspend process (SIGTSTP) - `Ctrl + D` - EOF (exit shell if line empty) - `Ctrl + \` - Quit process (SIGQUIT, creates core dump) --- ## SECTION 3: File Manager (Nautilus/Files) ### Navigation - `Alt + ↑` - Parent directory - `Alt + ←` - Back - `Alt + →` - Forward - `Alt + Home` - Home directory - `Ctrl + L` - Edit location bar (type path) - `/` - Edit location bar (type path, alternative) - `~` - Go to home directory (in location bar) - `Ctrl + 1/2/3` - Switch to tab 1/2/3 - `Ctrl + Page Up/Down` - Switch tabs - `Ctrl + W` - Close tab - `Ctrl + Shift + W` - Close window - `Ctrl + N` - New window - `Ctrl + T` - New tab ### File Operations - `Ctrl + A` - Select all - `Ctrl + S` - Select items matching pattern - `Ctrl + Shift + N` - Create new folder - `Ctrl + Shift + I` - Invert selection - `F2` - Rename file - `Delete` - Move to trash - `Shift + Delete` - Permanently delete - `Ctrl + C` - Copy - `Ctrl + X` - Cut - `Ctrl + V` - Paste - `Ctrl + Z` - Undo - `Ctrl + Shift + Z` - Redo ### View Options - `Ctrl + 1` - Icon view - `Ctrl + 2` - List view - `Ctrl + H` - Show/hide hidden files - `Ctrl + Shift + G` - Show/hide grid (icon view) - `Ctrl + =` - Zoom in - `Ctrl + -` - Zoom out - `Ctrl + 0` - Reset zoom - `F9` - Toggle sidebar - `Ctrl + F` - Search files ### Special Actions - `Ctrl + Shift + D` - Bookmark current location - `Ctrl + B` - Show/hide bookmarks - `Alt + Enter` - Properties - `Ctrl + M` - Create link - `Ctrl + I` - File properties --- ## SECTION 4: Text Editors ### Gedit (Default Text Editor) - `Ctrl + N` - New document - `Ctrl + O` - Open file - `Ctrl + S` - Save - `Ctrl + Shift + S` - Save as - `Ctrl + W` - Close tab - `Ctrl + Q` - Quit - `Ctrl + Z` - Undo - `Ctrl + Shift + Z` - Redo - `Ctrl + F` - Find - `Ctrl + H` - Find and replace - `Ctrl + G` - Go to line - `Ctrl + I` - Go to matching bracket - `Alt + ↑/↓` - Move line up/down - `Ctrl + D` - Delete line - `Ctrl + Shift + D` - Duplicate line ### Vim/Vi (Terminal Editor) **Normal Mode:** - `i` - Insert before cursor - `I` - Insert at line start - `a` - Append after cursor - `A` - Append at line end - `o` - New line below - `O` - New line above - `Esc` - Return to normal mode - `dd` - Delete line - `yy` - Yank (copy) line - `p` - Paste after - `P` - Paste before - `u` - Undo - `Ctrl + R` - Redo - `/` - Search forward - `?` - Search backward - `n` - Next search result - `N` - Previous search result - `:w` - Save - `:q` - Quit - `:wq` or `ZZ` - Save and quit - `:q!` - Quit without saving - `gg` - Go to first line - `G` - Go to last line - `0` - Go to line start - `$` - Go to line end - `w` - Next word - `b` - Previous word - `v` - Visual mode - `V` - Visual line mode - `Ctrl + V` - Visual block mode ### Nano (Simple Terminal Editor) - `Ctrl + O` - Save (WriteOut) - `Ctrl + X` - Exit - `Ctrl + K` - Cut line - `Ctrl + U` - Paste - `Ctrl + W` - Search - `Alt + W` - Search next - `Ctrl + \` - Replace - `Ctrl + G` - Help - `Alt + U` - Undo - `Alt + E` - Redo - `Ctrl + C` - Show cursor position - `Ctrl + _` - Go to line number - `Alt + A` - Start selection - `Alt + 6` - Copy selection --- ## SECTION 5: Web Browsers (Firefox/Chrome) ### Tab Management - `Ctrl + T` - New tab - `Ctrl + W` - Close tab - `Ctrl + Shift + T` - Reopen closed tab - `Ctrl + Tab` - Next tab - `Ctrl + Shift + Tab` - Previous tab - `Ctrl + 1-8` - Switch to tab 1-8 - `Ctrl + 9` - Switch to last tab - `Ctrl + N` - New window - `Ctrl + Shift + N` - New private/incognito window - `Ctrl + Shift + W` - Close window - `Alt + 1-9` - Switch to tab (Firefox alternative) ### Navigation - `Alt + ←` - Back - `Alt + →` - Forward - `Ctrl + L` or `F6` - Focus address bar - `Ctrl + K` - Focus search bar - `Ctrl + R` or `F5` - Reload - `Ctrl + Shift + R` - Hard reload (bypass cache) - `Ctrl + D` - Bookmark current page - `Ctrl + Shift + D` - Bookmark all tabs - `Ctrl + Shift + B` - Show/hide bookmarks bar - `Ctrl + H` - History - `Ctrl + Shift + Del` - Clear browsing data - `Home` - Scroll to top - `End` - Scroll to bottom - `Space` - Page down - `Shift + Space` - Page up ### Page Interaction - `Ctrl + F` - Find in page - `Ctrl + G` or `F3` - Find next - `Ctrl + Shift + G` or `Shift + F3` - Find previous - `Ctrl + P` - Print - `Ctrl + S` - Save page - `Ctrl + +` - Zoom in - `Ctrl + -` - Zoom out - `Ctrl + 0` - Reset zoom - `F11` - Fullscreen - `Ctrl + U` - View page source - `Ctrl + Shift + I` or `F12` - Developer tools - `Ctrl + Shift + J` - Console - `Ctrl + Shift + K` - Web console (Firefox) - `Ctrl + Shift + C` - Inspect element - `'` (single quote) - Quick find (Firefox) - `/` - Quick find (Firefox, search links only) ### Forms & Text - `Tab` - Next form field - `Shift + Tab` - Previous form field - `Enter` - Submit form/follow link - `Ctrl + Enter` - Submit form (alternative) - `Alt + Shift + K` - Focus search bar (Chrome) - `Ctrl + A` - Select all - `Ctrl + C` - Copy - `Ctrl + V` - Paste - `Ctrl + X` - Cut --- ## SECTION 6: Office Applications (LibreOffice) ### Writer (Word Processing) - `Ctrl + N` - New document - `Ctrl + O` - Open - `Ctrl + S` - Save - `Ctrl + Shift + S` - Save as - `Ctrl + P` - Print - `Ctrl + W` - Close document - `Ctrl + Q` - Quit - `Ctrl + Z` - Undo - `Ctrl + Y` - Redo - `Ctrl + A` - Select all - `Ctrl + F` - Find - `Ctrl + H` - Find & replace - `F7` - Spell check - `Ctrl + B` - Bold - `Ctrl + I` - Italic - `Ctrl + U` - Underline - `Ctrl + D` - Double underline - `Ctrl + Shift + P` - Superscript - `Ctrl + Shift + B` - Subscript - `Ctrl + L` - Align left - `Ctrl + E` - Align center - `Ctrl + R` - Align right - `Ctrl + J` - Justify - `Ctrl + 1` - Single line spacing - `Ctrl + 2` - Double line spacing - `Ctrl + 5` - 1.5 line spacing - `Ctrl + M` - Increase indent - `Ctrl + Shift + M` - Decrease indent - `F5` - Navigator - `Ctrl + Enter` - Page break - `Ctrl + Shift + Enter` - Column break ### Calc (Spreadsheet) - `Ctrl + Home` - Go to cell A1 - `Ctrl + End` - Go to last used cell - `Ctrl + ;` - Insert current date - `Ctrl + Shift + ;` - Insert current time - `Ctrl + D` - Fill down - `Ctrl + R` - Fill right - `Ctrl + Shift + 1` - Format as number - `Ctrl + Shift + 2` - Format as time - `Ctrl + Shift + 3` - Format as date - `Ctrl + Shift + 4` - Format as currency - `Ctrl + Shift + 5` - Format as percentage - `F2` - Edit cell - `F4` - Toggle absolute/relative reference - `F9` - Recalculate - `Alt + ↓` - Open autocomplete list - `Ctrl + Shift + Space` - Select all cells - `Ctrl + /` - Select array formula range - `Ctrl + Page Up` - Previous sheet - `Ctrl + Page Down` - Next sheet ### Impress (Presentations) - `F5` - Start presentation - `Shift + F5` - Start from current slide - `Esc` - End presentation - `Space` or `→` - Next slide (in presentation) - `Backspace` or `←` - Previous slide (in presentation) - `Home` - First slide (in presentation) - `End` - Last slide (in presentation) - `B` - Black screen (in presentation) - `W` - White screen (in presentation) - `Ctrl + M` - New slide - `Page Down` - Next slide (editing) - `Page Up` - Previous slide (editing) --- ## SECTION 7: Image & Media Applications ### GIMP (Image Editor) - `Ctrl + N` - New image - `Ctrl + O` - Open image - `Ctrl + S` - Save - `Shift + Ctrl + E` - Export - `Ctrl + W` - Close image - `Ctrl + Q` - Quit - `Ctrl + Z` - Undo - `Ctrl + Y` - Redo - `Ctrl + A` - Select all - `Ctrl + Shift + A` - Select none - `Ctrl + I` - Invert selection - `Ctrl + X` - Cut - `Ctrl + C` - Copy - `Ctrl + V` - Paste - `Tab` - Toggle toolbox/docks - `F11` - Fullscreen - `Shift + Ctrl + E` - Fit image in window - `1` - Zoom to 100% - `+` - Zoom in - `-` - Zoom out - `R` - Rectangle select tool - `E` - Ellipse select tool - `F` - Foreground select tool - `U` - Fuzzy select (magic wand) - `Shift + O` - Color select - `P` - Pencil tool - `N` - Paintbrush - `Shift + E` - Eraser - `A` - Airbrush - `K` - Ink tool - `C` - Clone tool - `O` - Color picker - `M` - Move tool - `Shift + C` - Crop tool - `Shift + R` - Rotate tool - `Shift + S` - Scale tool - `Shift + F` - Flip tool - `Shift + P` - Perspective tool - `T` - Text tool ### Image Viewer (Eye of GNOME/eog) - `Space` or `→` - Next image - `Backspace` or `←` - Previous image - `Home` - First image - `End` - Last image - `+` - Zoom in - `-` - Zoom out - `1` - Normal size (100%) - `F` - Fit to window - `F11` - Fullscreen - `Ctrl + W` - Close window - `Delete` - Move to trash - `Ctrl + S` - Save - `L` - Rotate left - `R` - Rotate right ### VLC Media Player - `Space` - Play/pause - `F` - Fullscreen - `Esc` - Exit fullscreen - `N` - Next item - `P` - Previous item - `S` - Stop - `Ctrl + Q` - Quit - `Ctrl + ↑/↓` - Volume up/down - `Ctrl + →` - Fast forward - `Ctrl + ←` - Rewind - `Shift + →` - Jump 3 seconds forward - `Shift + ←` - Jump 3 seconds back - `Alt + →` - Jump 10 seconds forward - `Alt + ←` - Jump 10 seconds back - `T` - Show time - `M` - Mute - `A` - Audio track - `S` - Subtitle track - `G/H` - Subtitle delay +/- - `J/K` - Audio delay +/- - `Z` - Zoom in - `X` - Zoom out - `D` - Deinterlace - `E` - Next frame - `Ctrl + H` - Hide controls --- ## SECTION 8: Development Tools ### VS Code / Code OSS - `Ctrl + Shift + P` - Command palette - `Ctrl + P` - Quick open file - `Ctrl + ,` - Settings - `Ctrl + K Ctrl + S` - Keyboard shortcuts - `Ctrl + Shift + N` - New window - `Ctrl + W` - Close editor - `Ctrl + K Ctrl + W` - Close all editors - `Ctrl + \` - Split editor - `Ctrl + 1/2/3` - Focus editor group - `Ctrl + Tab` - Switch between open files - `Ctrl + Shift + T` - Reopen closed editor - `Ctrl + G` - Go to line - `Ctrl + Shift + O` - Go to symbol - `Ctrl + T` - Go to symbol in workspace - `F12` - Go to definition - `Alt + F12` - Peek definition - `Shift + F12` - Show references - `F2` - Rename symbol - `Ctrl + .` - Quick fix - `Ctrl + Space` - Trigger suggestions - `Ctrl + Shift + Space` - Trigger parameter hints - `Ctrl + K Ctrl + I` - Show hover - `Ctrl + /` - Toggle line comment - `Ctrl + Shift + /` - Toggle block comment - `Ctrl + D` - Add selection to next find match - `Ctrl + Shift + L` - Select all occurrences - `Alt + Click` - Insert cursor - `Ctrl + Alt + ↑/↓` - Add cursor above/below - `Ctrl + U` - Undo last cursor operation - `Alt + ↑/↓` - Move line up/down - `Shift + Alt + ↑/↓` - Copy line up/down - `Ctrl + Shift + K` - Delete line - `Ctrl + Enter` - Insert line below - `Ctrl + Shift + Enter` - Insert line above - `Ctrl + ]` - Indent line - `Ctrl + [` - Outdent line - `Ctrl + Shift + \` - Jump to matching bracket - `Ctrl + Shift + [` - Fold region - `Ctrl + Shift + ]` - Unfold region - `Ctrl + K Ctrl + 0` - Fold all - `Ctrl + K Ctrl + J` - Unfold all - `Ctrl + \`` - Toggle terminal - `Ctrl + Shift + \`` - New terminal - `Ctrl + Shift + E` - Show explorer - `Ctrl + Shift + F` - Show search - `Ctrl + Shift + G` - Show source control - `Ctrl + Shift + D` - Show debug - `Ctrl + Shift + X` - Show extensions - `F5` - Start debugging - `Shift + F5` - Stop debugging - `F9` - Toggle breakpoint - `F10` - Step over - `F11` - Step into - `Shift + F11` - Step out ### Git (Command Line) Not keyboard shortcuts, but essential commands: ```bash # Navigation & Info git status git log --oneline --graph --all git diff git show <commit> # Branching git branch git checkout <branch> git checkout -b <new-branch> git merge <branch> # Staging & Committing git add <file> git add . git commit -m "message" git commit -a -m "message" # Remote Operations git fetch git pull git push git clone <url> # Undo Operations git reset --soft HEAD~1 git reset --hard HEAD~1 git revert <commit> git stash git stash pop ``` --- ## SECTION 9: System Utilities & Accessibility ### Screenshot Tool (gnome-screenshot) - `Print Screen` - Screenshot entire screen - `Alt + Print Screen` - Screenshot current window - `Shift + Print Screen` - Screenshot selected area - `Ctrl + Print Screen` - Copy screenshot to clipboard - `Ctrl + Alt + Print Screen` - Copy window screenshot to clipboard - `Ctrl + Shift + Print Screen` - Copy area screenshot to clipboard ### Screen Recording (Ctrl+Alt+Shift+R in GNOME) - `Ctrl + Alt + Shift + R` - Start/stop recording ### Accessibility - `Alt + Shift + Print Screen` - Toggle high contrast - `Super + Alt + S` - Toggle screen reader - `Super + Alt + 8` - Toggle zoom - `Alt + Super + +` - Zoom in (when zoom enabled) - `Alt + Super + -` - Zoom out (when zoom enabled) ### System Monitor - `Ctrl + F` - Find process - `Ctrl + R` - Refresh - `Ctrl + Q` - Quit - `Delete` - End process - `Ctrl + K` - Kill process ### Calculator - `Ctrl + C` - Copy result - `Ctrl + V` - Paste - `Ctrl + Shift + D` - Delete history - `Ctrl + R` - Toggle basic/advanced - `Ctrl + F` - Toggle financial mode - `Ctrl + P` - Toggle programming mode - `Ctrl + K` - Toggle keyboard mode --- ## SECTION 10: Package Management & System Tools ### APT Commands (Terminal - Must Know) ```bash # Update package lists sudo apt update # Upgrade all packages sudo apt upgrade # Install package sudo apt install <package-name> # Remove package sudo apt remove <package-name> # Remove package and config files sudo apt purge <package-name> # Remove unused dependencies sudo apt autoremove # Search for packages apt search <keyword> # Show package info apt show <package-name> # List installed packages apt list --installed # List upgradable packages apt list --upgradable ``` ### Snap Commands ```bash # Install snap sudo snap install <package-name> # List installed snaps snap list # Update all snaps sudo snap refresh # Remove snap sudo snap remove <package-name> # Find snaps snap find <keyword> # Show snap info snap info <package-name> ``` ### Systemd Service Management ```bash # Start service sudo systemctl start <service> # Stop service sudo systemctl stop <service> # Restart service sudo systemctl restart <service> # Enable service at boot sudo systemctl enable <service> # Disable service at boot sudo systemctl disable <service> # Check service status sudo systemctl status <service> # List all services systemctl list-units --type=service # View service logs sudo journalctl -u <service> ``` --- ## SECTION 11: Power User Terminal Commands ### File Operations ```bash # Find files find /path -name "filename" find . -type f -name "*.txt" # Search in files grep -r "text" /path grep -i "text" file.txt # case-insensitive # Disk usage du -sh /path/* # summarize directory sizes df -h # disk space # File permissions chmod +x file.sh # make executable chmod 644 file # rw-r--r-- chmod 755 file # rwxr-xr-x chown user:group file # Archive/compress tar -czf archive.tar.gz directory/ tar -xzf archive.tar.gz zip -r archive.zip directory/ unzip archive.zip ``` ### Process Management ```bash # List processes ps aux ps aux | grep process-name top # interactive process viewer htop # better interactive viewer # Kill processes kill <PID> kill -9 <PID> # force kill killall <process-name> pkill <pattern> # Background/foreground command & # run in background jobs # list background jobs fg %1 # bring job 1 to foreground bg %1 # send job 1 to background disown # detach from terminal ``` ### Network Commands ```bash # Network info ip addr ip route ifconfig # older command # Network testing ping <host> traceroute <host> nslookup <domain> dig <domain> # Network connections netstat -tuln # listening ports ss -tuln # modern alternative lsof -i :<port> # process using port # Download wget <url> curl -O <url> ``` ### System Information ```bash # System info uname -a # kernel info lsb_release -a # Ubuntu version hostnamectl # system info # Hardware info lscpu # CPU info lsmem # memory info lsblk # block devices lsusb # USB devices lspci # PCI devices # Disk info fdisk -l # list disks (requires sudo) blkid # block device attributes mount # mounted filesystems ``` --- ## SECTION 12: Emergency & Recovery ### TTY Access (When GUI Fails) - `Ctrl + Alt + F1-F6` - Switch to TTY 1-6 (text consoles) - `Ctrl + Alt + F7` - Return to GUI (or F1/F2 depending on Ubuntu version) ### TTY Commands (Text Console) ```bash # Login at TTY # username: <your-username> # password: <your-password> # Restart GUI sudo systemctl restart gdm3 # or gdm, lightdm depending on display manager # Reboot system sudo reboot # Shutdown system sudo shutdown -h now sudo poweroff # Fix broken packages sudo apt --fix-broken install sudo dpkg --configure -a # Reconfigure packages sudo dpkg-reconfigure <package> # Check disk sudo fsck /dev/sda1 # must be unmounted ``` ### Recovery Mode 1. Reboot and hold `Shift` during boot 2. Select "Advanced options for Ubuntu" 3. Select "recovery mode" 4. Choose repair option from menu --- ## SECTION 13: Clipboard & Selection (X11 Specific) ### X11 Selection Types Ubuntu (X11) has THREE clipboards: 1. **PRIMARY** - Middle-click paste (select text to copy) 2. **CLIPBOARD** - Ctrl+C/V (explicit copy/paste) 3. **SECONDARY** - Rarely used ### Clipboard Tools (Terminal) ```bash # xclip - clipboard from terminal echo "text" | xclip -selection clipboard # copy to clipboard xclip -selection clipboard -o # paste from clipboard xclip -selection primary -o # paste from primary (selection) # xsel - alternative echo "text" | xsel --clipboard --input xsel --clipboard --output # wl-clipboard (Wayland) echo "text" | wl-copy wl-paste ``` ### Clipboard Manager (Parcellite/CopyQ) - `Ctrl + Alt + H` - Show clipboard history (default Parcellite) - Configure custom shortcuts in clipboard manager settings --- ## SECTION 14: Custom Shortcuts & Automation ### Creating Custom Keyboard Shortcuts 1. Open Settings → Keyboard → Shortcuts 2. Scroll to "Custom Shortcuts" 3. Click "+" to add new shortcut 4. Enter name, command, and shortcut key ### Useful Custom Shortcuts to Create ```bash # Quick terminal in home Command: gnome-terminal --working-directory=$HOME Shortcut: Super + Enter # File manager in home Command: nautilus $HOME Shortcut: Super + E # Screenshot tool Command: gnome-screenshot -i Shortcut: Shift + Print # System monitor Command: gnome-system-monitor Shortcut: Ctrl + Shift + Esc # Browser private window Command: firefox --private-window Shortcut: Ctrl + Shift + P # Quick note Command: gedit ~/quick-note.txt Shortcut: Super + N # Screen lock with custom command Command: gnome-screensaver-command -l Shortcut: Super + X # Clipboard manager Command: parcellite Shortcut: Ctrl + Alt + V ``` ### Automation with xdotool ```bash # Simulate key press xdotool key Return xdotool key ctrl+c # Type text xdotool type "Hello, World!" # Move mouse (relative) xdotool mousemove_relative 100 100 # Click mouse xdotool click 1 # left click xdotool click 3 # right click # Get window info xdotool getactivewindow getwindowname xdotool search --name "Firefox" # Activate window xdotool windowactivate <window-id> xdotool search --name "Firefox" windowactivate # Focus window xdotool windowfocus <window-id> # Minimize/maximize window xdotool windowminimize <window-id> xdotool windowactivate <window-id> # Resize/move window xdotool windowsize <window-id> 800 600 xdotool windowmove <window-id> 0 0 ``` ### Scripting Common Workflows ```bash # Example: Open development environment #!/bin/bash # Save as ~/bin/dev-env.sh and chmod +x # Open terminal in project directory gnome-terminal --working-directory=~/projects/myproject & # Open VS Code code ~/projects/myproject & # Open browser with localhost firefox http://localhost:3000 & # Open file manager nautilus ~/projects/myproject & ``` --- ## SECTION 15: Application-Specific Advanced Shortcuts ### Thunderbird (Email Client) - `Ctrl + N` - New message - `Ctrl + R` - Reply - `Ctrl + Shift + R` - Reply all - `Ctrl + L` - Forward - `Ctrl + M` - New message to address - `Ctrl + Enter` - Send message - `Ctrl + Shift + A` - Mark all read - `M` - Mark as read - `U` - Mark as unread - `S` - Star message - `Delete` or `Del` - Delete message - `J` - Mark as junk - `Shift + J` - Mark as not junk - `Ctrl + Shift + C` - Copy to folder - `Ctrl + Shift + M` - Move to folder - `F` - Forward message inline - `Ctrl + U` - View source - `Ctrl + Shift + B` - Address book - `Ctrl + K` - Focus search - `Ctrl + Shift + K` - Search messages - `N` - Next message - `P` - Previous message - `F5` - Get messages ### Evolution (Alternative Email Client) - `Ctrl + N` - New message - `Ctrl + R` - Reply to sender - `Ctrl + Shift + R` - Reply to all - `Ctrl + F` - Forward message - `Ctrl + J` - Mark as junk - `Ctrl + Shift + J` - Mark as not junk - `Ctrl + K` - Delete message - `Ctrl + U` - Mark as unread - `!` - Mark as important - `Ctrl + Shift + V` - Move to folder - `Ctrl + Shift + Y` - Copy to folder - `.` - Next unread message - `,` - Previous unread message - `Ctrl + .` - Next flagged message - `Ctrl + ,` - Previous flagged message ### PDF Viewers (Evince/Document Viewer) - `Ctrl + F` - Find - `Ctrl + G` or `F3` - Find next - `Ctrl + Shift + G` - Find previous - `Page Down` or `Space` - Next page - `Page Up` or `Shift + Space` - Previous page - `Ctrl + Page Down` or `N` - Next page (alternative) - `Ctrl + Page Up` or `P` - Previous page (alternative) - `Home` - First page - `End` - Last page - `Ctrl + L` - Go to page number - `+` or `=` - Zoom in - `-` - Zoom out - `Ctrl + 0` - Best fit - `Ctrl + 1` - Fit width - `R` - Rotate clockwise - `Shift + R` - Rotate counter-clockwise - `F5` or `F11` - Presentation mode - `Ctrl + S` - Save copy - `Ctrl + P` - Print - `Ctrl + T` - Show/hide toolbar - `F9` - Show/hide sidebar - `Ctrl + Shift + D` - Show/hide properties ### Archive Manager (File Roller) - `Ctrl + O` - Open archive - `Ctrl + N` - New archive - `Ctrl + E` - Extract - `Ctrl + D` - Delete selected files - `Ctrl + A` - Select all - `Ctrl + Shift + A` - Deselect all - `Ctrl + F` - Find in archive - `Delete` - Delete selected - `Ctrl + T` - Test archive - `Ctrl + P` - View archive properties - `Alt + Up` - Go up one level - `Alt + Home` - Go to root ### Disk Usage Analyzer (Baobab) - `Ctrl + O` - Scan folder - `Ctrl + H` - Scan home - `Ctrl + Shift + R` - Rescan - `Ctrl + Shift + A` - Scan all filesystems - `Ctrl + Alt + F` - Scan filesystem - `Ctrl + E` - Expand all - `Ctrl + C` - Collapse all - `Delete` - Move to trash (selected folder/file) --- ## SECTION 16: Keyboard Navigation Patterns ### Universal Navigation Principles 1. **Tab-based navigation**: `Tab` moves forward, `Shift+Tab` moves backward 2. **Arrow keys**: Navigate within menus, lists, and focused areas 3. **Enter/Return**: Activate/select/confirm 4. **Escape**: Cancel/close dialog/go back 5. **Space**: Toggle checkbox/button, page down in documents 6. **F10**: Activate menu bar in most applications 7. **Alt + F10**: Maximize window 8. **Alt + F9**: Minimize window 9. **Alt + F8**: Resize window ### Dialog Box Navigation - `Tab` - Next control - `Shift + Tab` - Previous control - `Space` - Activate button/toggle checkbox - `Alt + Letter` - Activate control with underlined letter - `Enter` - Activate default button (usually OK/Apply) - `Esc` - Cancel/close dialog - `↑/↓` - Navigate dropdown lists - `Alt + ↓` - Open dropdown - `F1` - Help (if available) ### Menu Navigation - `F10` or `Alt` - Activate menu bar - `←/→` - Move between top-level menus - `↑/↓` - Move within menu - `Enter` - Select menu item - `Esc` - Close menu - `Alt + <underlined letter>` - Jump to menu directly - Example: `Alt + F` opens File menu, `Alt + E` opens Edit menu ### List/Tree Navigation - `↑/↓` - Move up/down - `Home` - First item - `End` - Last item - `Page Up/Down` - Scroll page - `Space` - Select/deselect item - `Ctrl + A` - Select all - `Ctrl + Space` - Toggle selection without moving - `Shift + ↑/↓` - Extend selection - `Ctrl + ↑/↓` - Move without selecting - `Enter` - Activate/open item - `→` - Expand tree node - `←` - Collapse tree node - `*` (on numpad) - Expand all under selected node - `Type first letters` - Quick search/jump to item ### Text Field Navigation (Universal) - `Ctrl + A` - Select all - `Ctrl + C` - Copy - `Ctrl + X` - Cut - `Ctrl + V` - Paste - `Ctrl + Z` - Undo - `Ctrl + Shift + Z` or `Ctrl + Y` - Redo - `Ctrl + ←/→` - Move by word - `Shift + ←/→` - Select by character - `Ctrl + Shift + ←/→` - Select by word - `Home` - Beginning of line - `End` - End of line - `Ctrl + Home` - Beginning of document - `Ctrl + End` - End of document - `Shift + Home` - Select to beginning of line - `Shift + End` - Select to end of line --- ## SECTION 17: Accessibility & Alternative Input ### Orca Screen Reader (For Vision Accessibility) - `Orca + Space` - Activate/silence Orca (Orca key = Insert or Caps Lock) - `Orca + H` - Learn mode (shows keyboard shortcuts) - `Orca + S` - Orca settings - `Orca + F` - Find - `Orca + ;` - Speak entire window - `Orca + Enter` - Speak current item - `Orca + Delete` - Speak previous line - `Orca + Insert` - Speak next line - `Ctrl` - Interrupt speech - `Insert + F1-F12` - Custom bookmark locations - `Insert + Alt + F1-F12` - Jump to bookmark ### On-Screen Keyboard - Enable in Settings → Accessibility → Typing → Screen Keyboard - `Super + Alt + K` - Toggle on-screen keyboard (if shortcut configured) - Use mouse or accessibility switches to activate keys ### Sticky Keys (For Single-Key Modifier Access) - Enable in Settings → Accessibility → Typing → Sticky Keys - Press modifier key (Ctrl, Alt, Shift, Super) twice to lock - Press modifier once to use for next key only - Allows using keyboard shortcuts without holding multiple keys ### Slow Keys (Ignore Brief Key Presses) - Enable in Settings → Accessibility → Typing → Slow Keys - Requires key to be held for set duration before registering ### Bounce Keys (Ignore Fast Repeated Keys) - Enable in Settings → Accessibility → Typing → Bounce Keys - Prevents accidental repeated key presses ### Mouse Keys (Control Mouse with Keyboard) - Enable in Settings → Accessibility → Pointing & Clicking → Mouse Keys - `Numpad 5` - Click - `Numpad /` - Left click mode - `Numpad *` - Middle click mode - `Numpad -` - Right click mode - `Numpad +` - Double click - `Numpad 0` - Hold button - `Numpad .` - Release button - `Numpad 8,4,6,2` - Move mouse up/left/right/down - `Numpad 7,9,1,3` - Move diagonally --- ## SECTION 18: Virtual Machine & Remote Desktop Shortcuts ### VirtualBox Guest (Ubuntu as Guest OS) - `Right Ctrl` - Host key (releases mouse/keyboard capture) - `Host + F` - Toggle fullscreen - `Host + L` - Toggle seamless mode - `Host + C` - Toggle scaled mode - `Host + Home` - Show VirtualBox menu - `Host + P` - Pause virtual machine - `Host + R` - Reset virtual machine - `Host + Q` - Quit VirtualBox - `Host + Del` - Send Ctrl+Alt+Del to guest - `Host + Backspace` - Send Ctrl+Alt+Backspace to guest - `Host + 1-4` - Switch to virtual desktop 1-4 ### Remmina (RDP/VNC Client) - `Ctrl + Alt + F` - Toggle fullscreen - `Ctrl + Alt + G` - Grab keyboard - `Ctrl + Alt + M` - Minimize window - `Ctrl + Alt + D` - Disconnect - `Ctrl + Alt + T` - Toggle toolbar - `Ctrl + Alt + K` - Send Ctrl+Alt+Del to remote - `Ctrl + Alt + Enter` - Toggle dynamic resolution - `Ctrl + Alt + +` - Zoom in - `Ctrl + Alt + -` - Zoom out - `Ctrl + Alt + 0` - Reset zoom ### SSH Terminal Session - `Ctrl + A + D` - Detach from screen session - `Ctrl + B + D` - Detach from tmux session - `Ctrl + D` - Exit SSH session (if shell is empty) - `Enter ~ .` - Forcefully disconnect SSH - `Enter ~ Ctrl+Z` - Suspend SSH session - `Enter ~ &` - Background SSH session ### tmux (Terminal Multiplexer) Prefix key = `Ctrl + B` (press before each command) - `Prefix + C` - New window - `Prefix + N` - Next window - `Prefix + P` - Previous window - `Prefix + 0-9` - Switch to window 0-9 - `Prefix + ,` - Rename window - `Prefix + %` - Split pane vertically - `Prefix + "` - Split pane horizontally - `Prefix + O` - Switch pane - `Prefix + Arrow` - Move to pane in direction - `Prefix + X` - Close pane - `Prefix + Z` - Zoom/unzoom pane - `Prefix + [` - Enter scroll mode (q to exit) - `Prefix + D` - Detach session - `Prefix + ?` - List shortcuts ### GNU Screen Prefix key = `Ctrl + A` (press before each command) - `Prefix + C` - New window - `Prefix + N` - Next window - `Prefix + P` - Previous window - `Prefix + 0-9` - Switch to window 0-9 - `Prefix + "` - List windows - `Prefix + A` - Rename window - `Prefix + S` - Split horizontal - `Prefix + |` - Split vertical - `Prefix + Tab` - Switch split - `Prefix + X` - Lock screen - `Prefix + D` - Detach session - `Prefix + K` - Kill window - `Prefix + [` - Copy mode (Enter to select, Space to copy) - `Prefix + ]` - Paste --- ## SECTION 19: Advanced X11 Window Management ### xdotool Window Management Scripts ```bash # Get active window ID WINDOW_ID=$(xdotool getactivewindow) # Get window name xdotool getwindowname $WINDOW_ID # Get window PID xdotool getwindowpid $WINDOW_ID # Move window to specific position xdotool windowmove $WINDOW_ID 0 0 # Resize window to specific size xdotool windowsize $WINDOW_ID 1920 1080 # Maximize window xdotool windowactivate $WINDOW_ID xdotool key --window $WINDOW_ID Super+Up # Tile window left xdotool windowactivate $WINDOW_ID xdotool key --window $WINDOW_ID Super+Left # Focus window by name xdotool search --name "Firefox" windowactivate # Close window xdotool windowclose $WINDOW_ID # Send keys to specific window xdotool type --window $WINDOW_ID "text to type" xdotool key --window $WINDOW_ID ctrl+s # Get mouse location xdotool getmouselocation # Move mouse to coordinates xdotool mousemove 500 500 # Click at current location xdotool click 1 # left click xdotool click 2 # middle click xdotool click 3 # right click # Click at specific coordinates xdotool mousemove 500 500 click 1 # Drag operation xdotool mousemove 100 100 mousedown 1 mousemove 500 500 mouseup 1 ``` ### wmctrl Window Management ```bash # List all windows wmctrl -l # Close window by title wmctrl -c "Firefox" # Activate window by title wmctrl -a "Terminal" # Move window to desktop 2 wmctrl -r "Firefox" -t 2 # Move and resize window (x, y, width, height) wmctrl -r "Firefox" -e 0,100,100,800,600 # Maximize window wmctrl -r "Firefox" -b add,maximized_vert,maximized_horz # Unmaximize window wmctrl -r "Firefox" -b remove,maximized_vert,maximized_horz # Make window sticky (show on all desktops) wmctrl -r "Firefox" -b add,sticky # Set window above all others wmctrl -r "Firefox" -b add,above # Set window below all others wmctrl -r "Firefox" -b add,below ``` ### xprop - Window Properties Inspector ```bash # Get window properties (click on window) xprop # Get specific window property xprop -name "Firefox" WM_CLASS # Get window ID at mouse click xprop -root _NET_ACTIVE_WINDOW # Get window geometry xwininfo # then click window ``` --- ## SECTION 20: Clipboard & Automation Workflows ### Advanced Clipboard Operations ```bash # Copy command output to clipboard ls -la | xclip -selection clipboard # Paste clipboard to file xclip -selection clipboard -o > file.txt # Copy file contents to clipboard xclip -selection clipboard < file.txt # Take screenshot and copy to clipboard gnome-screenshot -a -c # area screenshot to clipboard gnome-screenshot -w -c # window screenshot to clipboard # Copy text and process it xclip -selection clipboard -o | tr '[:lower:]' '[:upper:]' | xclip -selection clipboard ``` ### Automated Workflow Scripts #### Quick Window Switcher Script ```bash #!/bin/bash # Save as ~/bin/quick-switch.sh # Get list of windows WINDOW=$(wmctrl -l | awk '{$1=$2=$3=""; print $0}' | sed 's/^[ \t]*//' | \ zenity --list --column="Window" --title="Switch Window" --height=400) # Activate selected window if [ -n "$WINDOW" ]; then wmctrl -a "$WINDOW" fi ``` #### Workspace Manager Script ```bash #!/bin/bash # Save as ~/bin/workspace-manager.sh case "$1" in dev) wmctrl -s 0 # Switch to workspace 1 code ~/projects & gnome-terminal --working-directory=~/projects & ;; web) wmctrl -s 1 # Switch to workspace 2 firefox & chromium-browser & ;; comm) wmctrl -s 2 # Switch to workspace 3 slack & thunderbird & ;; *) echo "Usage: $0 {dev|web|comm}" ;; esac ``` #### Batch Window Operations Script ```bash #!/bin/bash # Save as ~/bin/tile-windows.sh # Tiles all windows in a grid # Get screen dimensions SCREEN_WIDTH=$(xdpyinfo | awk '/dimensions:/ {print $2}' | cut -d'x' -f1) SCREEN_HEIGHT=$(xdpyinfo | awk '/dimensions:/ {print $2}' | cut -d'x' -f2) # Calculate grid (2x2 for 4 windows) WINDOW_WIDTH=$((SCREEN_WIDTH / 2)) WINDOW_HEIGHT=$((SCREEN_HEIGHT / 2)) # Get all window IDs WINDOWS=$(wmctrl -l | awk '{print $1}') WINDOW_ARRAY=($WINDOWS) # Position windows in grid for i in "${!WINDOW_ARRAY[@]}"; do ROW=$((i / 2)) COL=$((i % 2)) X=$((COL * WINDOW_WIDTH)) Y=$((ROW * WINDOW_HEIGHT)) wmctrl -i -r "${WINDOW_ARRAY[$i]}" -e 0,$X,$Y,$WINDOW_WIDTH,$WINDOW_HEIGHT done ``` #### Application Launcher Menu Script ```bash #!/bin/bash # Save as ~/bin/app-menu.sh CHOICE=$(zenity --list --radiolist \ --column="Select" --column="Application" --column="Command" \ FALSE "Terminal" "gnome-terminal" \ FALSE "File Manager" "nautilus" \ FALSE "Browser" "firefox" \ FALSE "Code Editor" "code" \ FALSE "Calculator" "gnome-calculator" \ --title="Quick Launch" --height=300) if [ -n "$CHOICE" ]; then $CHOICE & fi ``` --- ## SECTION 21: Context-Specific Optimizations ### When in Terminal (Shell Context) **Priority shortcuts**: Focus on shell editing and process control - Always use `Ctrl+R` for command history search - Use `Ctrl+A` and `Ctrl+E` for line navigation - Master `Ctrl+U`, `Ctrl+K`, `Ctrl+W` for editing - Know `Ctrl+C`, `Ctrl+Z`, `Ctrl+D` for process control ### When in Text Editor (Editing Context) **Priority shortcuts**: Focus on navigation and editing - Use `Ctrl+F` for finding text - Master multi-cursor with `Ctrl+D` (VS Code) - Use `Ctrl+G` for go-to-line - Know comment toggles `Ctrl+/` ### When in Browser (Web Context) **Priority shortcuts**: Focus on tab and page navigation - Master `Ctrl+T`, `Ctrl+W`, `Ctrl+Shift+T` for tabs - Use `Ctrl+L` for address bar - Know `Ctrl+Tab` for tab switching - Use `F12` for developer tools ### When in File Manager (File Context) **Priority shortcuts**: Focus on file operations - Master `Ctrl+L` for path editing - Use `Ctrl+H` for hidden files - Know `F2` for rename - Use `Alt+Up` for parent directory ### When Debugging Code (Debug Context) **Priority shortcuts**: Focus on stepping and inspection - Master `F5` (run), `F9` (breakpoint), `F10` (step over) - Know `F11` (step into), `Shift+F11` (step out) - Use `Ctrl+Shift+I` for inspect --- ## SECTION 22: Emergency & Troubleshooting Shortcuts ### System Frozen/Unresponsive 1. **Try Ctrl+Alt+F3** - Switch to TTY3 (text console) 2. **Login and run**: `top` or `htop` to find problematic process 3. **Kill process**: `kill -9 <PID>` or `killall <process-name>` 4. **Restart GUI**: `sudo systemctl restart gdm3` 5. **If all else fails**: `sudo reboot` or hold power button ### Application Not Responding 1. **Try Escape** - May cancel current operation 2. **Try Alt+F4** - Close window 3. **Try xkill**: - Run `xkill` in terminal - Click on frozen window 4. **Force kill from terminal**: ```bash # Find process ID ps aux | grep <app-name> # Kill it kill -9 <PID> # Or killall -9 <app-name> ``` ### Keyboard Not Working 1. **Try USB keyboard** if on laptop 2. **Use on-screen keyboard**: - Settings → Accessibility → Typing → Screen Keyboard 3. **Restart input method** from TTY: ```bash Ctrl+Alt+F3 # Switch to TTY # Login sudo systemctl restart gdm3 ``` ### Screen Issues (Wrong Resolution, Black Screen) 1. **Try Ctrl+Alt+F3** to access TTY 2. **Reset display**: ```bash sudo systemctl restart gdm3 # Or sudo dpkg-reconfigure xserver-xorg ``` 3. **Check display settings**: ```bash xrandr # List displays xrandr --output <display> --mode <resolution> ``` --- ## SECTION 23: Pro Tips & Best Practices ### Efficiency Rules 1. **Never use mouse when keyboard is faster** (it always is) 2. **Learn app-switching**: `Alt+Tab` → `Alt+\`` → `Enter` is faster than clicking 3. **Use workspace switching**: Organize by context (dev, web, comm) 4. **Master your terminal**: 80% of tasks are faster in CLI 5. **Create custom shortcuts**: For your most common 10 tasks 6. **Use clipboard history**: Install Parcellite or CopyQ 7. **Learn regex**: For advanced find/replace everywhere ### Muscle Memory Development 1. **Practice one shortcut per day** until automatic 2. **Start with "Big 5"**: - `Alt+Tab` (switch app) - `Ctrl+T` (new tab) - `Ctrl+L` (address/path bar) - `Ctrl+Shift+P` (command palette) - `Ctrl+Alt+T` (terminal) 3. **Print cheat sheet**: Keep visible until memorized 4. **Disable mouse** for 1 hour daily to force learning 5. **Use keyboard-only** for one specific task until mastered ### Advanced Techniques 1. **Chain shortcuts**: `Super` → type "term" → `Enter` opens terminal 2. **Workspace workflow**: Dedicate each workspace to specific task 3. **Terminal multiplexing**: Use tmux/screen for session persistence 4. **Clipboard stack**: Use clipboard manager with history 5. **Window tiling**: `Super+Left/Right` for side-by-side work 6. **Search everything**: `Super` then type beats all navigation ### Common Mistake Avoidance 1. **Don't memorize all at once** - Learn by context 2. **Don't ignore app-specific shortcuts** - They're often faster 3. **Don't forget TTY access** - `Ctrl+Alt+F3` saves frozen systems 4. **Don't use `Ctrl+Alt+Del`** - Use `Ctrl+Shift+Esc` for system monitor 5. **Don't forget middle-click paste** - X11 primary selection is powerful --- ## SECTION 24: Quick Reference Card ### The Essential 20 (Must Know) ``` Super - Activities/Search Alt + Tab - Switch applications Alt + ` - Switch windows (same app) Ctrl + Alt + T - Terminal Ctrl + L - Focus address/path bar Ctrl + F - Find Ctrl + A - Select all / Start of line Ctrl + C - Copy / Interrupt process Ctrl + V - Paste Ctrl + Z - Undo / Suspend process Ctrl + Shift + T - New tab / Reopen tab Ctrl + W - Close tab/window Ctrl + Q - Quit application Alt + F4 - Close window Super + L - Lock screen Super + Arrow - Window tiling Ctrl + Alt + Arrow - Switch workspace F2 - Rename file/folder F11 - Fullscreen Print Screen - Screenshot ``` ### Context-Based Quick Select **In Terminal:** ``` Ctrl + R - History search Ctrl + C - Kill process Ctrl + A/E - Line start/end Ctrl + U/K - Delete to start/end ``` **In Browser:** ``` Ctrl + T - New tab Ctrl + L - Address bar Ctrl + Tab - Next tab F12 - DevTools ``` **In Editor:** ``` Ctrl + P - Quick open Ctrl + Shift + F - Search in files Ctrl + D - Select next occurrence Ctrl + / - Comment toggle ``` **In File Manager:** ``` Ctrl + L - Edit path Ctrl + H - Show hidden Alt + Up - Parent directory F2 - Rename ``` --- ## SECTION 25: Environment Variables for Scripting ### Useful X11/Ubuntu Environment Variables ```bash # Display and session $DISPLAY # X11 display (usually :0) $XDG_SESSION_TYPE # Session type (x11 or wayland) $DESKTOP_SESSION # Desktop environment (ubuntu, gnome, etc.) $GDMSESSION # GDM session name # User directories $HOME # User home directory $USER # Current username $PWD # Current working directory $OLDPWD # Previous working directory $XDG_CONFIG_HOME # User config dir (~/.config) $XDG_DATA_HOME # User data dir (~/.local/share) $XDG_CACHE_HOME # User cache dir (~/.cache) # Application paths $PATH # Executable search paths $LD_LIBRARY_PATH # Library search paths $EDITOR # Default text editor $VISUAL # Visual editor (usually same as EDITOR) $BROWSER # Default web browser $TERM # Terminal type # Locale and language $LANG # System language $LC_ALL # Override all locale settings $TZ # Timezone # Process info $PPID # Parent process ID $PID # Current process ID $SHELL # Current shell path ``` ### Using Environment Variables in Shortcuts ```bash # Custom shortcut command examples gnome-terminal --working-directory="$HOME/projects" code "$HOME/Documents/notes.md" nautilus "$HOME/Downloads" firefox "$HOME/bookmarks.html" # In scripts #!/bin/bash export EDITOR=vim $EDITOR "$HOME/.bashrc" ``` --- ## APPENDIX A: Installation Commands for Essential Tools ### Keyboard-Centric Tools Installation ```bash # Clipboard managers sudo apt install parcellite # Simple clipboard manager sudo apt install copyq # Advanced clipboard manager # Window management tools sudo apt install wmctrl # Window manager control sudo apt install xdotool # X11 automation sudo apt install xprop # Window properties sudo apt install xwininfo # Window information sudo apt install xclip # Clipboard CLI tool sudo apt install xsel # Alternative clipboard tool # Terminal multiplexers sudo apt install tmux # Terminal multiplexer sudo apt install screen # GNU Screen # Terminal enhancements sudo apt install htop # Better process viewer sudo apt install ncdu # Disk usage analyzer (ncurses) sudo apt install ranger # File manager for terminal sudo apt install fzf # Fuzzy finder sudo apt install ripgrep # Fast grep alternative # System utilities sudo apt install zenity # Dialog boxes from shell sudo apt install notify-send # Desktop notifications sudo apt install rofi # Application launcher (alternative to gnome) sudo apt install dmenu # Dynamic menu for X ``` ### Configuration Examples **Setup Parcellite (Clipboard Manager):** ```bash # Install sudo apt install parcellite # Run at startup - add to Startup Applications: # Name: Parcellite # Command: parcellite # Default shortcut: Ctrl+Alt+H ``` **Setup fzf (Fuzzy Finder):** ```bash # Install sudo apt install fzf # Add to ~/.bashrc for Ctrl+R command history [ -f /usr/share/doc/fzf/examples/key-bindings.bash ] && \ source /usr/share/doc/fzf/examples/key-bindings.bash # Ctrl+R - command history # Ctrl+T - file finder # Alt+C - directory changer ``` --- ## APPENDIX B: Creating the Ultimate .inputrc ### Enhanced Readline Configuration Create or edit `~/.inputrc`: ```bash # ~/.inputrc - Readline configuration for better keyboard control # Case-insensitive completion set completion-ignore-case on # Show all autocomplete results at once set page-completions off # Immediately show completions set show-all-if-ambiguous on # Show file type indicators set visible-stats on # Show extra file information set colored-stats on # Use colored completion set colored-completion-prefix on # Append slash to directory completions set mark-directories on set mark-symlinked-directories on # Enable incremental search set enable-bracketed-paste on # Vi mode (optional - comment out if you prefer emacs mode) # set editing-mode vi # set keymap vi-command # Or stick with emacs mode (default, keep these) set editing-mode emacs # Additional emacs-mode bindings "\e[A": history-search-backward # Up arrow - search history "\e[B": history-search-forward # Down arrow - search history "\e[C": forward-char # Right arrow "\e[D": backward-char # Left arrow # Ctrl+Left/Right for word movement "\e[1;5C": forward-word # Ctrl+Right "\e[1;5D": backward-word # Ctrl+Left # Alt+Left/Right for word movement (alternative) "\e[1;3C": forward-word # Alt+Right "\e[1;3D": backward-word # Alt+Left # Home and End keys "\e[H": beginning-of-line "\e[F": end-of-line "\e[1~": beginning-of-line "\e[4~": end-of-line # Delete key "\e[3~": delete-char # Page Up/Page Down "\e[5~": history-search-backward "\e[6~": history-search-forward # Ctrl+Delete - delete word forward "\e[3;5~": kill-word # Ctrl+Backspace - delete word backward "\C-h": backward-kill-word # Quick directory navigation "\C-x\C-d": "cd ..\n" # Ctrl+X Ctrl+D - cd to parent # Quick ls after cd "\C-x\C-l": "ls -lah\n" # Ctrl+X Ctrl+L - detailed listing # Quick git status "\C-x\C-g": "git status\n" # Ctrl+X Ctrl+G - git status ``` --- ## APPENDIX C: Ultimate .bashrc Enhancements ### Keyboard-Optimized Bash Configuration Add to `~/.bashrc`: ```bash # ======================================== # KEYBOARD WARRIOR BASH CONFIGURATION # ======================================== # Enable vi mode (optional - uncomment if preferred) # set -o vi # Better history HISTSIZE=10000 HISTFILESIZE=20000 HISTCONTROL=ignoredups:erasedups # No duplicates shopt -s histappend # Append to history, don't overwrite PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" # Enable extended globbing shopt -s extglob shopt -s globstar # ** for recursive glob # Auto-correct minor directory spelling errors shopt -s cdspell shopt -s dirspell # Check window size after each command shopt -s checkwinsize # ======================================== # KEYBOARD-CENTRIC ALIASES # ======================================== # Navigation shortcuts alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias ~='cd ~' alias -- -='cd -' # Go to previous directory # List directory shortcuts alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias lt='ls -alFt' # Sort by time alias lh='ls -alFh' # Human readable sizes alias tree='tree -C' # Colorized tree # Quick directory listing after cd cd() { builtin cd "$@" && ls -F; } # Directory stack navigation alias d='dirs -v' # Show directory stack alias po='popd' # Pop from stack alias pu='pushd' # Push to stack # Git shortcuts (fast typing) alias g='git' alias gs='git status' alias ga='git add' alias gc='git commit' alias gp='git push' alias gl='git log --oneline --graph --all' alias gd='git diff' alias gco='git checkout' alias gb='git branch' # Grep shortcuts alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias grepi='grep -i' # Case insensitive alias grepr='grep -r' # Recursive # Find shortcuts alias f='find . -name' alias ff='find . -type f -name' alias fd='find . -type d -name' # Process shortcuts alias psg='ps aux | grep -v grep | grep -i -e VSZ -e' alias k='kill' alias k9='kill -9' alias ka='killall' # System shortcuts alias h='history' alias hg='history | grep' alias j='jobs -l' alias df='df -h' alias du='du -h' alias ducks='du -cks * | sort -rn | head' # Top disk usage # Package management shortcuts alias apti='sudo apt install' alias aptr='sudo apt remove' alias aptu='sudo apt update' alias aptg='sudo apt upgrade' alias apts='apt search' # Network shortcuts alias ports='netstat -tulanp' alias listening='lsof -i -P | grep LISTEN' alias myip='curl ifconfig.me' alias ping='ping -c 5' # Safety nets alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' alias ln='ln -i' # Quick file operations alias md='mkdir -p' alias rd='rmdir' # Text editor shortcuts alias v='vim' alias vi='vim' alias e='$EDITOR' alias svi='sudo vi' alias sve='sudo $EDITOR' # Quick config editing alias bashrc='$EDITOR ~/.bashrc && source ~/.bashrc' alias vimrc='$EDITOR ~/.vimrc' alias inputrc='$EDITOR ~/.inputrc' # Clipboard shortcuts (requires xclip) alias c='xclip -selection clipboard' alias v='xclip -selection clipboard -o' alias pbcopy='xclip -selection clipboard' alias pbpaste='xclip -selection clipboard -o' # ======================================== # KEYBOARD-CENTRIC FUNCTIONS # ======================================== # Quick directory creation and navigation mkcd() { mkdir -p "$1" && cd "$1" } # Extract any archive extract() { if [ -f "$1" ]; then case "$1" in *.tar.bz2) tar xjf "$1" ;; *.tar.gz) tar xzf "$1" ;; *.bz2) bunzip2 "$1" ;; *.rar) unrar x "$1" ;; *.gz) gunzip "$1" ;; *.tar) tar xf "$1" ;; *.tbz2) tar xjf "$1" ;; *.tgz) tar xzf "$1" ;; *.zip) unzip "$1" ;; *.Z) uncompress "$1" ;; *.7z) 7z x "$1" ;; *) echo "'$1' cannot be extracted" ;; esac else echo "'$1' is not a valid file" fi } # Quick backup backup() { cp "$1"{,.backup-$(date +%Y%m%d-%H%M%S)} } # Quick find and edit fe() { local file file=$(fzf --query="$1" --select-1 --exit-0) [ -n "$file" ] && ${EDITOR:-vim} "$file" } # Quick find and cd fcd() { local dir dir=$(find ${1:-.} -type d 2>/dev/null | fzf +m) && cd "$dir" } # Quick process kill pk() { local pid pid=$(ps aux | sed 1d | fzf -m | awk '{print $2}') [ -n "$pid" ] && echo "$pid" | xargs kill -${1:-9} } # Quick git add and commit gac() { git add -A && git commit -m "$*" } # Quick server serve() { python3 -m http.server ${1:-8000} } # Quick note taking note() { $EDITOR ~/notes/"$(date +%Y%m%d-%H%M%S)"-"$*".md } # Command cheat sheet cheat() { curl cheat.sh/"$1" } # Quick directory bookmark system export MARKPATH=$HOME/.marks jump() { cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" } mark() { mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1" } unmark() { rm -i "$MARKPATH/$1" } marks() { ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo } _completemarks() { local curw=${COMP_WORDS[COMP_CWORD]} local wordlist=$(find $MARKPATH -type l -printf "%f\n") COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw")) return 0 } complete -F _completemarks jump unmark # ======================================== # ENHANCED PROMPT # ======================================== # Git branch in prompt parse_git_branch() { git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } # Colorful prompt with git info if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[33m\]$(parse_git_branch)\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' fi # ======================================== # FZF INTEGRATION # ======================================== # Setup fzf if installed if [ -f /usr/share/doc/fzf/examples/key-bindings.bash ]; then source /usr/share/doc/fzf/examples/key-bindings.bash fi if [ -f /usr/share/doc/fzf/examples/completion.bash ]; then source /usr/share/doc/fzf/examples/completion.bash fi # FZF configuration export FZF_DEFAULT_OPTS=" --height 40% --layout=reverse --border --inline-info --color=fg:-1,bg:-1,hl:#5f87af --color=fg+:#d0d0d0,bg+:#262626,hl+:#5fd7ff --color=info:#afaf87,prompt:#d7005f,pointer:#af5fff --color=marker:#87ff00,spinner:#af5fff,header:#87afaf " # Use ripgrep with fzf if available if command -v rg &>/dev/null; then export FZF_DEFAULT_COMMAND='rg --files --hidden --follow --glob "!.git/*"' fi # ======================================== # KEYBOARD SHORTCUT HELPERS # ======================================== # Display keyboard shortcuts reference shortcuts() { cat << 'EOF' TERMINAL SHORTCUTS: Ctrl+A Start of line Ctrl+E End of line Ctrl+U Delete to start Ctrl+K Delete to end Ctrl+W Delete word backward Alt+D Delete word forward Ctrl+R Search history Ctrl+L Clear screen Ctrl+C Kill process Ctrl+Z Suspend process Ctrl+D Exit shell CUSTOM SHORTCUTS: .. cd .. - cd to previous dir gs git status psg <name> Search processes extract <f> Extract any archive mkcd <dir> Create and enter dir backup <f> Backup file with timestamp fe [query] Find and edit file (fzf) fcd [dir] Find and cd to directory (fzf) mark <name> Bookmark current directory jump <name> Jump to bookmarked directory Type 'cheat <command>' for command examples Type 'marks' to see bookmarked directories EOF } # Quick reference for current directory shortcuts alias ?='shortcuts' ``` --- ## APPENDIX D: Custom Keybindings Configuration Script ### Automated Keybinding Setup Script Create `~/bin/setup-keybindings.sh`: ```bash #!/bin/bash # setup-keybindings.sh - Setup custom Ubuntu keybindings echo "Setting up custom keyboard shortcuts..." # Function to set a keybinding set_keybinding() { local name="$1" local command="$2" local binding="$3" local path="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings" local index="$4" gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$path/custom$index/ name "$name" gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$path/custom$index/ command "$command" gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:$path/custom$index/ binding "$binding" } # Reset custom keybindings list gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "[]" # Define custom shortcuts # Format: name, command, binding, index # Terminal shortcuts set_keybinding "Terminal in Home" "gnome-terminal --working-directory=$HOME" "<Super>Return" 0 set_keybinding "Root Terminal" "gnome-terminal -- sudo -i" "<Super><Shift>Return" 1 # File manager shortcuts set_keybinding "File Manager Home" "nautilus $HOME" "<Super>e" 2 set_keybinding "File Manager Downloads" "nautilus $HOME/Downloads" "<Super><Shift>e" 3 # Application shortcuts set_keybinding "Firefox Private" "firefox --private-window" "<Super><Shift>b" 4 set_keybinding "Calculator" "gnome-calculator" "<Super>c" 5 set_keybinding "System Monitor" "gnome-system-monitor" "<Primary><Shift>Escape" 6 # Screenshot shortcuts set_keybinding "Screenshot Area" "gnome-screenshot -a -c" "<Super><Shift>s" 7 set_keybinding "Screenshot Window" "gnome-screenshot -w -c" "<Super><Shift>w" 8 # Clipboard manager (if installed) set_keybinding "Clipboard History" "parcellite" "<Primary><Alt>v" 9 # Quick note set_keybinding "Quick Note" "gedit $HOME/quick-note.txt" "<Super>n" 10 # Lock screen alternative set_keybinding "Lock Screen Alt" "gnome-screensaver-command -l" "<Super>x" 11 # Update the list of custom keybindings BINDINGS="[" for i in {0..11}; do BINDINGS="${BINDINGS}'/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom$i/'" if [ $i -lt 11 ]; then BINDINGS="${BINDINGS}, " fi done BINDINGS="${BINDINGS}]" gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "$BINDINGS" echo "Custom keyboard shortcuts have been set up!" echo "You may need to log out and back in for all changes to take effect." echo "" echo "Your new shortcuts:" echo " Super+Return - Terminal in Home" echo " Super+Shift+Return - Root Terminal" echo " Super+E - File Manager (Home)" echo " Super+Shift+E - File Manager (Downloads)" echo " Super+Shift+B - Firefox Private Window" echo " Super+C - Calculator" echo " Ctrl+Shift+Esc - System Monitor" echo " Super+Shift+S - Screenshot Area (to clipboard)" echo " Super+Shift+W - Screenshot Window (to clipboard)" echo " Ctrl+Alt+V - Clipboard History" echo " Super+N - Quick Note" echo " Super+X - Lock Screen" ``` Make executable and run: ```bash chmod +x ~/bin/setup-keybindings.sh ~/bin/setup-keybindings.sh ``` --- ## APPENDIX E: Window Management Automation ### Tiling Window Manager Script Create `~/bin/tile-windows.sh`: ```bash #!/bin/bash # tile-windows.sh - Intelligent window tiling # Get screen dimensions read SCREEN_WIDTH SCREEN_HEIGHT < <(xdpyinfo | awk '/dimensions:/{print $2}' | tr 'x' ' ') # Count active windows (excluding desktop) WINDOW_COUNT=$(wmctrl -l | grep -v "Desktop" | wc -l) if [ $WINDOW_COUNT -eq 0 ]; then echo "No windows to tile" exit 0 fi # Get window IDs mapfile -t WINDOWS < <(wmctrl -l | grep -v "Desktop" | awk '{print $1}') # Tiling layouts based on window count case $WINDOW_COUNT in 1) # Single window - maximize wmctrl -i -r "${WINDOWS[0]}" -b add,maximized_vert,maximized_horz ;; 2) # Two windows - side by side W=$((SCREEN_WIDTH / 2)) H=$SCREEN_HEIGHT wmctrl -i -r "${WINDOWS[0]}" -b remove,maximized_vert,maximized_horz wmctrl -i -r "${WINDOWS[1]}" -b remove,maximized_vert,maximized_horz wmctrl -i -r "${WINDOWS[0]}" -e 0,0,0,$W,$H wmctrl -i -r "${WINDOWS[1]}" -e 0,$W,0,$W,$H ;; 3) # Three windows - main left, two stacked right W1=$((SCREEN_WIDTH * 2 / 3)) W2=$((SCREEN_WIDTH / 3)) H1=$SCREEN_HEIGHT H2=$((SCREEN_HEIGHT / 2)) wmctrl -i -r "${WINDOWS[0]}" -b remove,maximized_vert,maximized_horz wmctrl -i -r "${WINDOWS[1]}" -b remove,maximized_vert,maximized_horz wmctrl -i -r "${WINDOWS[2]}" -b remove,maximized_vert,maximized_horz wmctrl -i -r "${WINDOWS[0]}" -e 0,0,0,$W1,$H1 wmctrl -i -r "${WINDOWS[1]}" -e 0,$W1,0,$W2,$H2 wmctrl -i -r "${WINDOWS[2]}" -e 0,$W1,$H2,$W2,$H2 ;; 4) # Four windows - 2x2 grid W=$((SCREEN_WIDTH / 2)) H=$((SCREEN_HEIGHT / 2)) for i in "${!WINDOWS[@]}"; do wmctrl -i -r "${WINDOWS[$i]}" -b remove,maximized_vert,maximized_horz ROW=$((i / 2)) COL=$((i % 2)) X=$((COL * W)) Y=$((ROW * H)) wmctrl -i -r "${WINDOWS[$i]}" -e 0,$X,$Y,$W,$H done ;; *) # More than 4 - grid layout COLS=$(echo "sqrt($WINDOW_COUNT)" | bc) ROWS=$(( (WINDOW_COUNT + COLS - 1) / COLS )) W=$((SCREEN_WIDTH / COLS)) H=$((SCREEN_HEIGHT / ROWS)) for i in "${!WINDOWS[@]}"; do wmctrl -i -r "${WINDOWS[$i]}" -b remove,maximized_vert,maximized_horz ROW=$((i / COLS)) COL=$((i % COLS)) X=$((COL * W)) Y=$((ROW * H)) wmctrl -i -r "${WINDOWS[$i]}" -e 0,$X,$Y,$W,$H done ;; esac notify-send "Window Tiler" "Tiled $WINDOW_COUNT windows" ``` ### Workspace Manager Script Create `~/bin/workspace-switch.sh`: ```bash #!/bin/bash # workspace-switch.sh - Intelligent workspace switching with window management WORKSPACE=$1 case "$WORKSPACE" in dev|0) # Development workspace wmctrl -s 0 # Check if code is running, if not start it if ! pgrep -x "code" > /dev/null; then code ~/projects & sleep 2 fi # Check if terminal is running in this workspace if ! wmctrl -l | grep -q "Terminal.*projects"; then gnome-terminal --working-directory=~/projects & fi wmctrl -a "Visual Studio Code" ;; web|1) # Web/Research workspace wmctrl -s 1 if ! pgrep -x "firefox" > /dev/null; then firefox & fi wmctrl -a "Firefox" ;; comm|2) # Communication workspace wmctrl -s 2 if ! pgrep -x "thunderbird" > /dev/null; then thunderbird & fi if ! pgrep -x "slack" > /dev/null && command -v slack &>/dev/null; then slack & fi wmctrl -a "Thunderbird" ;; sys|3) # System/Admin workspace wmctrl -s 3 if ! wmctrl -l | grep -q "Terminal.*root"; then gnome-terminal -- sudo -i & fi if ! pgrep -x "gnome-system-monitor" > /dev/null; then gnome-system-monitor & fi ;; *) echo "Usage: $0 {dev|web|comm|sys|0|1|2|3}" exit 1 ;; esac # Tile windows in the new workspace after a brief delay sleep 0.5 ~/bin/tile-windows.sh ``` Make both executable: ```bash chmod +x ~/bin/tile-windows.sh chmod +x ~/bin/workspace-switch.sh ``` Add custom shortcuts for these: ```bash # Tile current workspace Custom shortcut: Super+T Command: ~/bin/tile-windows.sh # Workspace switching Custom shortcut: Super+1 Command: ~/bin/workspace-switch.sh dev Custom shortcut: Super+2 Command: ~/bin/workspace-switch.sh web Custom shortcut: Super+3 Command: ~/bin/workspace-switch.sh comm Custom shortcut: Super+4 Command: ~/bin/workspace-switch.sh sys ```

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jenova-marie/keyboard-shortcuts-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server