# Keybind-find: Dynamic Keyboard Shortcut Discovery for Linux Environments

A command palette utility that automatically maps and executes shortcuts from your active application configuration.

- **Source:** [Hacker News: Show HN](https://news.ycombinator.com)
- **Published:** 2026-10-31
- **Topic:** [Software & Engineering](https://brifing.si/c/engineering)
- **Original article:** <https://github.com/Benjmhart/keybind-find>
- **On Brifing:** https://brifing.si/s/70815f6a-dc0f-4c34-9925-e69ccd3545bd

## Automated Shortcut Discovery

Keybind-find functions as a context-aware command palette for Linux environments. By pressing a hotkey, users receive a searchable list of active shortcuts based on the focused window. It reads configurations directly from applications like nvim, tmux, and various window managers, ensuring that the displayed keybindings always reflect the current system state.

## Window Manager Integration

The tool supports major window managers including xmonad, sway, Hyprland, and i3. For Hyprland, it queries the compositor via hyprctl to extract live bindings and descriptions. In i3, it utilizes i3-msg to fetch the loaded configuration, effectively replacing manual documentation with a real-time, searchable interface that adapts to your specific setup.

## Terminal and Shell Support

Keybind-find identifies the active program within terminal emulators like alacritty, kitty, and foot. It parses shell-specific configurations for bash, zsh, and fish by executing them in a headless environment. This allows users to see line-editing keys and custom aliases directly, provided the shell initialization files complete within a three-second execution window.

## Editor and Tool Compatibility

The utility provides deep integration for text editors such as Neovim, Emacs, and Helix. It reads maps from running instances or headless configurations, including major mode and evil state information for Emacs. For tools like Midnight Commander and yazi, it merges compiled-in defaults with user-defined keymap files to ensure total accuracy.

## Browser and Web App Mapping

Beyond system tools, the software includes built-in sheets for browsers like Firefox and Chromium, covering standard navigation and developer tools. It also supports web applications through custom sheets. For GitHub, it requires a URL-in-title extension to function correctly, allowing users to trigger browser-specific shortcuts directly through the unified command palette interface.

## Handling Complex Configurations

Keybind-find handles complex configuration hierarchies by merging default settings with user-defined overrides. For instance, in VS Code and Zed, it parses keybindings.json files and extension-provided shortcuts. It tags these commands by context, allowing users to distinguish between global shortcuts and those specific to the language or file type currently in focus.

## Espanso and Snippet Integration

The tool integrates with Espanso to display available text snippets alongside application shortcuts. It reads the match list directly, enabling users to trigger text expansions through the same search interface. Note that regex matches and filtered executions are excluded, as they require specific input patterns that do not fit the standard command palette model.

## Performance and Execution Limits

To maintain system responsiveness, the tool enforces a three-second timeout for shell and configuration parsing. If an initialization script exceeds this duration, the process is terminated to prevent interface lag. Users can optimize performance by setting the KEYBIND_FIND environment variable, allowing them to skip slow or noisy initialization steps during the scan.

## Limitations in Visibility

The tool cannot detect bindings created dynamically within a running shell session or those added by plugins that load only upon first use. It relies on static configuration files and standard API calls. Consequently, keys mapped manually in a live terminal or via specific login profiles may remain invisible to the discovery engine.

## Zathura and Less Paging

For Zathura, the tool lists keys by mode, such as normal, index, or presentation, by parsing zathurarc files across standard XDG directories. Similarly, it reads less keybindings from the user's lesskey source file. It specifically targets the #command section, ignoring version-specific headers to ensure compatibility across different versions of the pager utility.

## Flatpak and Container Awareness

Keybind-find accounts for Flatpak-specific paths when native configuration files are absent. It attempts to locate settings in ~/.var/app/ directories for applications like mpv or zathura. By identifying the window class or app_id, the tool maintains context even when applications are sandboxed, provided the required binaries are available on the system PATH.

## Efficiency Through Automation

By bridging the gap between complex configuration files and user interaction, this tool significantly reduces the cognitive load of managing custom keybindings. It transforms static documentation into a dynamic, searchable command palette. This approach ensures that power users can leverage their entire toolchain without the overhead of memorizing hundreds of unique, application-specific shortcuts.

## Sources covering this story

- https://github.com/Benjmhart/keybind-find — 

---

_Summary written by Brifing from the original reporting. Copyright in the original article belongs to its publisher; read the full piece at the link above._
