Skip to content

Instantly share code, notes, and snippets.

@krypton-byte
Created December 26, 2024 19:16
Show Gist options
  • Select an option

  • Save krypton-byte/c08e3e23da785f89167cb8880ad4a80f to your computer and use it in GitHub Desktop.

Select an option

Save krypton-byte/c08e3e23da785f89167cb8880ad4a80f to your computer and use it in GitHub Desktop.

Disable Pause Key in Hyprland

A guide to disable the Pause/Break key on Linux using the Hyprland/Hyprdots window manager.

Background

Some keyboards have a Pause/Break key that can disrupt workflow when accidentally pressed. The key generates these events:

Event: time 1735239389.511843, type 4 (EV_MSC), code 4 (MSC_SCAN), value c5
Event: time 1735239389.511843, type 1 (EV_KEY), code 119 (KEY_PAUSE), value 0

This issue also causes an "unknown escape ^[[57632u" to appear in terminals when using Hyprdots/Hyprland, which can interfere with terminal display and functionality.

Solution

Add one of these configurations to your ~/.config/hypr/userprefs.conf:

unbind = , PAUSE

Or if you want to bind it to a null command:

bind = , PAUSE, exec, echo ""

How to Use

  1. Open your Hyprland configuration file:
    nano ~/.config/hypr/userprefs.conf
  2. Add one of the configurations above
  3. Save the file
  4. Reload Hyprland with:
    hyprctl reload

Notes

  • This solution is specific to the Hyprland window manager
  • Make sure the syntax matches your installed version of Hyprland
  • Different window managers may require different configurations
  • If you're using Hyprdots, the "unknown escape ^[[57632u" issue should be resolved after applying this configuration

Contributing

Feel free to contribute if you have alternative solutions or improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment