IKeyConverter.cs 631 B

123456789101112131415161718
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// Interface for subcomponent of a <see cref="InputProcessor{T}"/> which
  4. /// can translate the raw console input type T (which typically varies by
  5. /// driver) to the shared Terminal.Gui <see cref="Key"/> class.
  6. /// </summary>
  7. /// <typeparam name="T"></typeparam>
  8. public interface IKeyConverter<in T>
  9. {
  10. /// <summary>
  11. /// Converts the native keyboard class read from console into
  12. /// the shared <see cref="Key"/> class used by Terminal.Gui views.
  13. /// </summary>
  14. /// <param name="value"></param>
  15. /// <returns></returns>
  16. Key ToKey (T value);
  17. }