diff --git a/io/key/key.go b/io/key/key.go index af31e3e6a..21c758821 100644 --- a/io/key/key.go +++ b/io/key/key.go @@ -220,6 +220,7 @@ const ( NameF11 = "F11" NameF12 = "F12" NameBack = "Back" + NameDash = "Dash" ) // Contain reports whether m contains all modifiers @@ -238,7 +239,15 @@ func (k Set) Contains(name string, mods Modifiers) bool { var modSet, keySet string sep := strings.LastIndex(chord, "-") if sep != -1 { - modSet, keySet = chord[:sep], chord[sep+1:] + if sep == len(chord)-1 { + if sep != 0 { + modSet, keySet = chord[:sep-1], "-" + } else { + modSet, keySet = "", "-" + } + } else { + modSet, keySet = chord[:sep], chord[sep+1:] + } } else { modSet, keySet = "", chord }