Poge uses
⌘ (Command) on macOS and Ctrl on Windows/Linux. The shortcuts shown below will automatically adapt to your operating system.Query Execution
These shortcuts help you work with the Query Tool.| Action | macOS | Windows/Linux | Description |
|---|---|---|---|
| Run Query | ⌘ + Enter | Ctrl + Enter | Execute the current SQL query |
The Query Tool keyboard shortcuts were introduced in v0.2.5 with a modular setup that allows for adding more shortcuts in the future.
How Keyboard Shortcuts Work
Poge’s keyboard shortcut system is designed to be:- Cross-platform: Automatically detects macOS and uses
⌘(Command) instead ofCtrl - Non-intrusive: Shortcuts only activate when the appropriate context is active
- Extensible: Built on a modular architecture that makes it easy to add new shortcuts
Platform Detection
The system automatically detects your platform:- On macOS (Mac, iPad, iPhone, iPod), shortcuts use the
⌘(Command) key - On Windows and Linux, shortcuts use the
Ctrlkey
Modifier Keys
Keyboard shortcuts can use the following modifier keys:Ctrl- Control key (Windows/Linux)Meta- Command key ⌘ (macOS)Alt- Alt/Option keyShift- Shift key
Future Shortcuts
The keyboard shortcut system is designed to support additional shortcuts in the future. Potential areas for expansion include:- Navigation between database connections
- Quick access to saved queries
- Table browsing and schema exploration
- Settings and configuration
- Export/import operations
Customization
Currently, keyboard shortcuts are not customizable. The default shortcuts are designed to:- Follow common conventions (e.g.,
Ctrl/⌘ + Enterfor execution) - Avoid conflicts with browser shortcuts
- Work consistently across different operating systems
hooks/use-keyboard-shortcuts.ts and the respective component files.
Technical Details
For developers interested in how keyboard shortcuts are implemented:- Shortcuts are defined using the
KeyboardShortcutinterface inhooks/use-keyboard-shortcuts.ts - Each shortcut includes an ID, key combination, display label, and handler function
- The
useKeyboardShortcutshook registers shortcuts and handles keyboard events - Shortcuts are scoped to specific components to avoid conflicts
- Event propagation is stopped when a shortcut is triggered to prevent side effects
If you’re building on top of Poge or forking it, you can easily add new shortcuts by defining them in the component where they’re needed and passing them to
useKeyboardShortcuts.