A GNOME Shell extension that temporarily silences system hotkeys, perfect for gaming or presentations where you don't want system shortcuts interfering.
- Quick Settings Toggle: Toggle Ghost Mode on/off from the system menu
- Selective Key Disabling: Choose which keys to disable via the menu
- Automatic Backup & Restore: Remembers your original keybindings and restores them when Ghost Mode is disabled
- Persistent Settings: Your key selection preferences are saved between sessions
- Overlay Key - The overlay key (Super/Windows key)
- Window Menu - Alt+Space menu activation
- Input Source Switch - Keyboard layout switching shortcuts
- Application View - Toggle application overview
- App Shortcuts (1-9) - Number keys that switch between applications
- Dash-to-dock Hotkeys - Dash-to-dock hotkeys (if extension is installed)
-
Clone or download this repository to your GNOME extensions directory:
git clone https://github.com/zmzhang8/ghostkey.git ~/.local/share/gnome-shell/extensions/ghostkey@zhaoming.win -
Compile the settings schema:
cd ~/.local/share/gnome-shell/extensions/ghostkey@zhaoming.win glib-compile-schemas schemas/
-
Restart GNOME Shell (X11: Alt+F2, type
r, press Enter; Wayland: log out and back in) -
Enable the extension:
gnome-extensions enable ghostkey@zhaoming.win
(Coming soon)
- Open the system menu in the top-right corner
- Click on the Ghost Key toggle to enable Ghost Mode
- Click on the indicator icon (keyboard-hide) to open the menu
- Select which keys you want to disable using the toggles
- Click the toggle again to disable Ghost Mode and restore your keys
- Crash Recovery: If GNOME Shell crashes while Ghost Mode is active, the extension detects this on next startup and resets safely
- Backup Verification: Original keybindings are always backed up before disabling
- Graceful Disable: When the extension is disabled, Ghost Mode is automatically turned off and keys are restored
- Error Handling: Individual key failures don't prevent other keys from being silenced/restored
- GNOME Shell 48 or later
- dash-to-dock extension (optional, for dash hotkeys support)
ghostkey@zhaoming.win/
├── extension.js # Main extension code
├── metadata.json # Extension metadata
├── stylesheet.css # Custom styles (if needed)
├── schemas/
│ ├── org.gnome.shell.extensions.ghostkey.gschema.xml # Settings schema
└── README.md # This file
The extension logs to the GNOME Shell journal. View logs with:
journalctl -f -o cat /usr/bin/gnome-shell | grep GhostKeyPull requests are welcome! Please ensure:
- Code follows GNOME Shell extension conventions
- Error handling is added for all gsettings operations
- The extension works both with and without dash-to-dock
