()
| 412 | } |
| 413 | |
| 414 | func NewKeybindings() *Keybindings { |
| 415 | kb := &Keybindings{ |
| 416 | On: true, |
| 417 | Shortcuts: map[string]*Shortcut{}, |
| 418 | KeyShortcutsByFamily: map[sdl.Keycode][]*Shortcut{}, |
| 419 | MouseShortcutsByFamily: map[uint8][]*Shortcut{}, |
| 420 | } |
| 421 | kb.Default() |
| 422 | return kb |
| 423 | } |
| 424 | |
| 425 | func (kb *Keybindings) DefineKeyShortcut(bindingName string, keyCode sdl.Keycode, mods ...sdl.Keycode) *Shortcut { |
| 426 | sc := NewShortcut(bindingName) |