1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-23 19:45:21 -04:00

keybinds: fix mouse wheel keysims on Hyprland and Mango

fixes #2683
This commit is contained in:
bbedward
2026-06-23 11:21:38 -04:00
parent 73f3a72d00
commit 0e7901ebbe
8 changed files with 230 additions and 5 deletions
+13 -1
View File
@@ -190,9 +190,13 @@ func (h *HyprlandProvider) formatRawAction(dispatcher, params string) string {
}
func (h *HyprlandProvider) formatKey(kb *HyprlandKeyBinding) string {
key := kb.Key
if canonical, ok := hyprlandScrollToCanonical(key); ok {
key = canonical
}
parts := make([]string, 0, len(kb.Mods)+1)
parts = append(parts, kb.Mods...)
parts = append(parts, kb.Key)
parts = append(parts, key)
return strings.Join(parts, "+")
}
@@ -411,6 +415,9 @@ func normalizeLuaBindKeyPart(part string) string {
case "alt", "mod1":
return "ALT"
}
if native, ok := hyprlandScrollToNative(part); ok {
return native
}
if len(part) == 1 {
return strings.ToUpper(part)
}
@@ -1130,6 +1137,11 @@ func parseLuaUnbindLine(line string) (string, bool) {
func luaKeyComboToInternalKey(combo string) string {
parts := strings.Fields(strings.ReplaceAll(strings.ReplaceAll(combo, "+", " "), " ", " "))
for i, part := range parts {
if canonical, ok := hyprlandScrollToCanonical(part); ok {
parts[i] = canonical
}
}
return strings.Join(parts, "+")
}