/// <summary> /// Registers the specified binding. /// </summary> /// <param name="binding">The input binding to register.</param> private void Register(InputBinding binding) { if (binding == null) { return; } binding.AdjustPriority(priorityAdjustment); collection.RegisterBinding(binding); }
/// <summary> /// Unregisters the specified input binding. /// </summary> /// <param name="binding">The input binding to unregister.</param> private void Unregister(InputBinding binding) { if (binding == null) { return; } if (binding == pressed) { released = true; pressed = null; OnReleased(); } binding.AdjustPriority(null); collection.UnregisterBinding(binding); }