io/key: add ModAlt, ModSuper

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-08 18:21:43 +01:00
parent c4416ffbc4
commit c833c98fd7
6 changed files with 45 additions and 1 deletions
+12
View File
@@ -64,6 +64,12 @@ const (
ModCommand
// ModShift is the shift modifier key.
ModShift
// ModAlt is the alt modifier key, or the option
// key on Apple keyboards.
ModAlt
// ModSuper is the "logo" modifier key, often
// represented by a Windows logo.
ModSuper
)
const (
@@ -121,5 +127,11 @@ func (m Modifiers) String() string {
if m.Contain(ModShift) {
strs = append(strs, "ModShift")
}
if m.Contain(ModAlt) {
strs = append(strs, "ModAlt")
}
if m.Contain(ModSuper) {
strs = append(strs, "ModSuper")
}
return strings.Join(strs, "|")
}