// OnKey sends the event to all plugins and
// returns false as soon as the first plugin returns false
// or true if all loaded plugins returned true.
OnKey sends the event to all plugins and
returns false as soon as the first plugin returns false
or true if all loaded plugins returned true.
// OnKey sends the event to all plugins and // returns false as soon as the first plugin returns false // or true if all loaded plugins returned true .
func (h *PluginManager) OnKey(k *termios.Key) bool {
	var ok bool = true
	for _, f := range h.keyListener {
		ok = f(h.parent, k)
		if !ok {
			h.parent.DebugMessage(shared.ModPluginLoader, "Key event was cancelled by a plugin")
			return false
		}
	}
	return true
}
func ( h * PluginManager ) OnKey ( k * termios . Key ) bool { var ok bool = true for _ , f := range h . keyListener { ok = f ( h . parent , k ) if ! ok { h . parent . DebugMessage ( shared . ModPluginLoader , " " ) return false } } return true }
OnKey sends the event to all plugins and
returns false as soon as the first plugin returns false
or true if all loaded plugins returned true.
OnKey sends the event to all plugins and returns false as soon as the first plugin returns false or true if all loaded plugins returned true .