qs: fix wrong capitalization in cheatsheet

This commit is contained in:
end-4
2026-05-14 14:34:07 +02:00
parent 28ba8a4f43
commit 5c66902900
3 changed files with 12 additions and 9 deletions
@@ -46,8 +46,8 @@ Scope { // Scope
implicitWidth: cheatsheetBackground.width + Appearance.sizes.elevationMargin * 2
implicitHeight: cheatsheetBackground.height + Appearance.sizes.elevationMargin * 2
WlrLayershell.namespace: "quickshell:cheatsheet"
// Hyprland 0.49: Focus is always exclusive and setting this breaks mouse focus grab
// WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
// Setting this value makes it take its sweet time to open
// WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
color: "transparent"
mask: Region {
@@ -24,7 +24,7 @@ Item {
id: flow
height: flickable.height
flow: Flow.TopToBottom
spacing: 12
spacing: 10
Repeater {
model: [...HyprlandKeybinds.keybindCategories, ""]
delegate: CheatsheetKeybindsCategory {
@@ -61,11 +61,11 @@ Column {
property var keyBlacklist: ["SUPER_L", "SUPER_R"]
property var keySubstitutions: Object.assign({
"Super": "",
"mouse_up": "Scroll ↓", // ikr, weird
"mouse_down": "Scroll ↑", // trust me bro
"mouse:272": "LMB",
"mouse:273": "RMB",
"mouse:275": "MouseBack",
"Mouse_up": "Scroll ↓", // ikr, weird
"Mouse_down": "Scroll ↑", // trust me bro
"Mouse:272": "LMB",
"Mouse:273": "RMB",
"Mouse:275": "MouseBack",
"Slash": "/",
"Hash": "#",
"Return": "Enter",
@@ -152,7 +152,10 @@ Column {
id: keybindKey
anchors.verticalCenter: parent.verticalCenter
visible: !keyBlacklist.includes(bindLine.keyData.key)
key: StringUtils.toTitleCase(root.keySubstitutions[bindLine.keyData.key] || bindLine.keyData.key)
key: {
const k = StringUtils.toTitleCase(bindLine.keyData.key)
return root.keySubstitutions[k] || k
}
pixelSize: Config.options.cheatsheet.fontSize.key
color: Appearance.colors.colOnLayer0
}