new symbol map

This commit is contained in:
Madjid Taha
2025-10-28 10:28:15 +01:00
parent 90cc63e57a
commit c61da40f70
2 changed files with 51 additions and 37 deletions
@@ -15,51 +15,65 @@ Item {
implicitWidth: row.implicitWidth + padding * 2
implicitHeight: row.implicitHeight + padding * 2
property list<string> superMap: [
"󰖳", "󰌽", "󰘳", "", "󰨡", "", "",
"󰖳", "󰌽", "", "", "󰨡", "", "",
"󰣇", "", "", "", "", " ", "", "󱄛"
]
property var macSymbolMap: ({
"Ctrl": "󰘴" ,
"Alt": "󰘵" ,
"Shift": "󰘶" ,
"Space": "󱁐" ,
"Tab": "↹" ,
"Equal": "󰇼" ,
"Minus": "" ,
"Print": "" ,
"BackSpace": "󰭜" ,
"Delete": "⌦" ,
"Return": "󰌑" ,
"Period": "." ,
"Escape": "⎋"
})
property var functionSymbolMap: ({
"F1": "󱊫",
"F2": "󱊬",
"F3": "󱊭",
"F4": "󱊮",
"F5": "󱊯",
"F6": "󱊰",
"F7": "󱊱",
"F8": "󱊲",
"F9": "󱊳",
"F10": "󱊴",
"F11": "󱊵",
"F12": "󱊶",
})
property var mouseSymbolMap: ({
"mouse_up": "󱕐" ,
"mouse_down": "󱕑",
"mouse:272": "L󰍽",
"mouse:273": "R󰍽",
"Scroll ↑/↓": "󱕒",
"Page_↑/↓": "⇞/⇟",
})
property var keyBlacklist: ["Super_L"]
property var keySubstitutions: ({
"Super": superMap[Config.options.appearance.keybinds.superKey],
"Ctrl": Config.options.appearance.keybinds.useMacSymbol ? "󰘴" : "Ctrl",
"Alt": Config.options.appearance.keybinds.useMacSymbol ? "󰘵" : "Alt",
"Shift": Config.options.appearance.keybinds.useMacSymbol ? "󰘶" : "Shift",
"Space": Config.options.appearance.keybinds.useMacSymbol ? "󱁐" : "Space",
"Tab": Config.options.appearance.keybinds.useMacSymbol ? "" : "Tab",
"Equal": Config.options.appearance.keybinds.useMacSymbol ? "󰇼" : "Equal",
"Minus": Config.options.appearance.keybinds.useMacSymbol ? "" : "Minus",
"Print": Config.options.appearance.keybinds.useMacSymbol ? "" : "Print",
"Delete": Config.options.appearance.keybinds.useMacSymbol ? "󰭜" : "Delete",
"Return": Config.options.appearance.keybinds.useMacSymbol ? "󰌑" : "Enter",
"Period": Config.options.appearance.keybinds.useMacSymbol ? "." : "Period",
// Function keys
"Escape": Config.options.appearance.keybinds.useFnSymbol ? "󱊷" : "Escape",
"F1": Config.options.appearance.keybinds.useFnSymbol ? "󱊫" : "F1",
"F2": Config.options.appearance.keybinds.useFnSymbol ? "󱊬" : "F2",
"F3": Config.options.appearance.keybinds.useFnSymbol ? "󱊭" : "F3",
"F4": Config.options.appearance.keybinds.useFnSymbol ? "󱊮" : "F4",
"F5": Config.options.appearance.keybinds.useFnSymbol ? "󱊯" : "F5",
"F6": Config.options.appearance.keybinds.useFnSymbol ? "󱊰" : "F6",
"F7": Config.options.appearance.keybinds.useFnSymbol ? "󱊱" : "F7",
"F8": Config.options.appearance.keybinds.useFnSymbol ? "󱊲" : "F8",
"F9": Config.options.appearance.keybinds.useFnSymbol ? "󱊳" : "F9",
"F10": Config.options.appearance.keybinds.useFnSymbol ? "󱊴" : "F10",
"F11": Config.options.appearance.keybinds.useFnSymbol ? "󱊵" : "F11",
"F12": Config.options.appearance.keybinds.useFnSymbol ? "󱊶" : "F12",
// Mouse keys
"mouse_up": Config.options.appearance.keybinds.useMouseSymbol ? "󱕐" : "Scroll ↓", // ikr, weird
"mouse_down": Config.options.appearance.keybinds.useMouseSymbol ? "󱕑" : "Scroll ↑", // trust me bro
"mouse:272": Config.options.appearance.keybinds.useMouseSymbol ? "L󰍽" : "LMB",
"mouse:273": Config.options.appearance.keybinds.useMouseSymbol ? "R󰍽" : "RMB",
"Scroll ↑/↓": Config.options.appearance.keybinds.useMouseSymbol ? "󱕒" : "Scroll ↑/↓",
"Page_↑/↓": Config.options.appearance.keybinds.useMouseSymbol ? "Page " : "Page_↑/↓",
"mouse_up": "Scroll ↓", // ikr, weird
"mouse_down": "Scroll ↑", // trust me bro
"mouse:272": "LMB",
"mouse:273": "RMB",
"mouse:275": "MouseBack",
"Slash": "/",
"Hash": "#",
// "Shift": "",
})
},
Config.options.appearance.keybinds.useMacSymbol ? macSymbolMap : {},
Config.options.appearance.keybinds.useFnSymbol ? functionSymbolMap : {},
Config.options.appearance.keybinds.useMouseSymbol ? mouseSymbolMap : {},
)
Row { // Keybind columns
id: row
@@ -192,7 +192,7 @@ ContentPage {
Config.options.appearance.keybinds.useFnSymbol = checked;
}
StyledToolTip {
text: Translation.tr("Show 󱊷 instead of Escape, 󱊫 for F1, etc to 󱊶 for F12")
text: Translation.tr("Show functions keys as symbols, e.g. 󱊫 for F1, 󱊶 for F12")
}
}
ConfigSwitch {
@@ -203,7 +203,7 @@ ContentPage {
Config.options.appearance.keybinds.useMouseSymbol = checked;
}
StyledToolTip {
text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and Page  for \"Page_↑/↓\"")
text: Translation.tr("Replace 󱕐 for \"Scroll ↓\", 󱕑 \"Scroll ↑\", L󰍽 \"LMB\", R󰍽 \"RMB\", 󱕒 \"Scroll ↑/↓\" and ⇞/⇟ for \"Page_↑/↓\"")
}
}
ConfigSwitch {