KeyBindingScope.cs 783 B

1234567891011121314151617181920212223242526
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Defines the scope of a <see cref="Command"/> that has been bound to a key with
  4. /// <see cref="KeyBindings.Add(Key, Terminal.Gui.Command[])"/>.
  5. /// </summary>
  6. /// <remarks>
  7. /// <para>Key bindings are scoped to the most-focused view (<see cref="Focused"/>) by default.</para>
  8. /// </remarks>
  9. /// <seealso cref="Application.KeyBindings"/>
  10. /// <seealso cref="View.KeyBindings"/>
  11. /// <seealso cref="Command"/>
  12. [Flags]
  13. public enum KeyBindingScope
  14. {
  15. /// <summary>The key binding is disabled.</summary>
  16. Disabled = 0,
  17. /// <summary>
  18. /// The key binding is scoped to just the view that has focus.
  19. /// <para>
  20. /// </para>
  21. /// </summary>
  22. /// <seealso cref="View.KeyBindings"/>
  23. Focused = 1
  24. }