io/key: remove "Mod" prefix from Modifiers.String names, concatenate by "+"

"Mod" is implied by the type, and "+" is the natural concatenation character
for displaying shortcuts.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-01-04 17:46:14 +01:00
parent 99e3481419
commit 5860fbbe8e
+5 -5
View File
@@ -174,19 +174,19 @@ func (e Event) String() string {
func (m Modifiers) String() string {
var strs []string
if m.Contain(ModCtrl) {
strs = append(strs, "ModCtrl")
strs = append(strs, "Ctrl")
}
if m.Contain(ModCommand) {
strs = append(strs, "ModCommand")
strs = append(strs, "Command")
}
if m.Contain(ModShift) {
strs = append(strs, "ModShift")
strs = append(strs, "Shift")
}
if m.Contain(ModAlt) {
strs = append(strs, "ModAlt")
strs = append(strs, "Alt")
}
if m.Contain(ModSuper) {
strs = append(strs, "ModSuper")
strs = append(strs, "Super")
}
return strings.Join(strs, "|")
}