From 5860fbbe8e36eb91f1f014e14faa91fc67ac002a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 4 Jan 2022 17:46:14 +0100 Subject: [PATCH] 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 --- io/key/key.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/io/key/key.go b/io/key/key.go index 7402effc..b6af2a4c 100644 --- a/io/key/key.go +++ b/io/key/key.go @@ -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, "|") }