Skip to content

[keybind-cheatsheet][BUG] Keybinding category is ignored for binds with a multiline description #193

Description

@BMasta

Submission checklist

  • I have searched existing issues and confirmed this is not a duplicate.
  • I am using the latest available version of Noctalia and of the plugin.
  • This is a bug in a community plugin, not in Noctalia itself (those belong in the noctalia repo).

Plugin

keybind-cheatsheet

Plugin version

0.2.1

Bug description

Keybind categories are not parsed correctly unless the key description and at least one non-empty string token are defined on the same line

Category is picked up correctly

-- 1. Foo
hl.bind(mainMod .. " + 1", hl.dsp.window.cycle_next({next = false}), {
    description = "Bar"
})

...and

hl.bind(mainMod .. " + 1", hl.dsp.window.cycle_next({next = false}), {description = "Bar" ..
    "Baz"
})

Category is not picked up

-- 1. Foo
hl.bind(mainMod .. " + 1", hl.dsp.window.cycle_next({next = false}), { description = "" ..
    "Bar"
})

...and

-- 1. Foo
hl.bind(mainMod .. " + 1", hl.dsp.window.cycle_next({next = false}), { description = "Bar\
    Baz"
})

...and

-- 1. Foo
hl.bind(mainMod .. " + 1", hl.dsp.window.cycle_next({next = false}), { description =
    "Bar"
})

Steps to reproduce

  1. Create a hyprland lua config file at ~/.config/hypr/hyprland.lua.
  2. Paste a non-working example from the description above into the confg.
  3. Make hyprland reload the config if necessary.
  4. Open the cheatsheet and observe the result.

Expected behavior

The keybinding should be assigned to the category specified in the comment.

Actual behavior

The keybinding is assigned to the "Other" category.

Logs / error output


Noctalia version

v5.0.0-beta.6-74-g09a1e7da9269

Compositor

Hyprland

Environment information

$ hyprland --version
Hyprland 0.56.1 built from branch v0.56.1 at commit 5c9377c15f85c50648f35ca5a213754f95b93ca0 clean (version: bump to 0.56.1).
Date: Mon Jul 27 16:33:49 2026
Tag: v0.56.1, commits: 7643

Libraries:
Hyprgraphics: built against 0.5.1, system has 0.5.1
Hyprutils: built against 0.14.0, system has 0.14.0
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.8, system has 0.6.8
Aquamarine: built against 0.14.0, system has 0.14.0

Version ABI string: 5c9377c15f85c50648f35ca5a213754f95b93ca0_aq_0.14_hu_0.14_hg_0.5_hc_0.1_hlg_0.6
no flags were set

$ uname -r
7.1.5-arch1-2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions