MCPcopy Create free account
hub / github.com/SolarLune/masterplan / NewKeybindings

Function NewKeybindings

keybindings.go:414–423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

412}
413
414func 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
425func (kb *Keybindings) DefineKeyShortcut(bindingName string, keyCode sdl.Keycode, mods ...sdl.Keycode) *Shortcut {
426 sc := NewShortcut(bindingName)

Callers 1

initFunction · 0.85

Calls 1

DefaultMethod · 0.95

Tested by

no test coverage detected