Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

send_shortcut

Send keyboard shortcuts to control applications in Hyprland desktop environments. Specify modifier keys, target keys, and optionally target specific windows for automation.

Instructions

Send a keyboard shortcut via Hyprland (can target specific windows).

Args: mods: Modifier keys (e.g. "CTRL", "SUPER SHIFT", "ALT CTRL", or "" for none) key: Key name (e.g. "c", "F4", "Return", "space") target: Optional window selector (e.g. "class:firefox"). Empty = active window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modsYes
keyYes
targetNo

Implementation Reference

  • The `send_shortcut` tool implementation, which dispatches the "sendshortcut" command to hyprctl.
    async def send_shortcut(mods: str, key: str, target: str | None = None) -> str:
        """Send a keyboard shortcut via Hyprland (can target specific windows).
    
        Args:
            mods: Modifier keys (e.g. "CTRL", "SUPER SHIFT", "ALT CTRL", or "" for none)
            key: Key name (e.g. "c", "F4", "Return", "space")
            target: Optional window selector (e.g. "class:firefox"). Empty = active window.
        """
        target_str = target or ""
        await hyprctl.dispatch("sendshortcut", f"{mods}, {key}, {target_str}")
        desc = f"{mods}+{key}" if mods else key
        return f"Sent shortcut {desc}{f' to {target}' if target else ''}"

Latest Blog Posts

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/alderban107/hyprland-mcp'

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