IKeyConverter.cs 640 B

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