Validate returns an error if the key specification is not recognized.
(spec string)
| 133 | |
| 134 | // Validate returns an error if the key specification is not recognized. |
| 135 | func Validate(spec string) error { |
| 136 | _, _, _, err := Parse(spec) |
| 137 | |
| 138 | return err |
| 139 | } |
| 140 | |
| 141 | // CanonicalID returns a unique identifier for a parsed key combination. |
| 142 | func CanonicalID(key tcell.Key, r rune, mod tcell.ModMask) string { |