2026-03-13 14:34:30 +00:00
|
|
|
package keybinding
|
|
|
|
|
|
|
|
|
|
import "forge.lthn.ai/core/go/pkg/core"
|
|
|
|
|
|
2026-03-31 12:18:41 +01:00
|
|
|
// Register(p) binds the keybinding service to a Core instance.
|
|
|
|
|
// core.WithService(keybinding.Register(wailsKeybinding))
|
2026-03-13 14:34:30 +00:00
|
|
|
func Register(p Platform) func(*core.Core) (any, error) {
|
|
|
|
|
return func(c *core.Core) (any, error) {
|
|
|
|
|
return &Service{
|
2026-03-31 05:13:43 +00:00
|
|
|
ServiceRuntime: core.NewServiceRuntime[Options](c, Options{}),
|
|
|
|
|
platform: p,
|
|
|
|
|
registeredBindings: make(map[string]BindingInfo),
|
2026-03-13 14:34:30 +00:00
|
|
|
}, nil
|
|
|
|
|
}
|
|
|
|
|
}
|