Support more accelerator keys

This commit is contained in:
Lea Anthony
2020-11-29 14:18:53 +11:00
parent fb1d4c6325
commit 5c39467879
3 changed files with 81 additions and 7 deletions

View File

@@ -22,6 +22,13 @@ type Accelerator struct {
Modifiers []Modifier
}
// Accel creates a standard key Accelerator
func Accel(key string) *Accelerator {
return &Accelerator{
Key: key,
}
}
// CmdOrCtrlAccel creates a 'CmdOrCtrl' Accelerator
func CmdOrCtrlAccel(key string) *Accelerator {
return &Accelerator{