-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #3692++ - Rearchitects drivers #3837
base: v2_develop
Are you sure you want to change the base?
Conversation
Hope you're ok with me updating the title & first post... |
@BDisp Apparently:
How is this handled in NetDriver? is MapKey the best place to put this new logic? |
Great, I have added in call to this function in the new architecture, see aa8bdd7
Right click works for v2 net but not v2 win, I will have to explore your suggestion further when I have some time. |
Windows right click working thanks! 6c55e11 |
Nice.
Works with |
I have added metrics for Redraw in v2 drivers and Trace logging for the view that is responsible for wanting itself redrawn. This will let us fix issues e.g. this one where HexView is constantly saying it wants layout and redraw when nothing is going on in app:
|
@BDisp the
Gets returned as
This then breaks
For now I am using workaround: /// <summary>
/// Converts terminal raw input class <see cref="ConsoleKeyInfo"/> into
/// common Terminal.Gui event model for keypresses (<see cref="Key"/>)
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public static Key ConsoleKeyInfoToKey (ConsoleKeyInfo input)
{
ConsoleKeyInfo adjustedInput = EscSeqUtils.MapConsoleKeyInfo (input);
// TODO : EscSeqUtils.MapConsoleKeyInfo is wrong for e.g. '{' - it winds up clearing the Key
// So if the method nuked it then we should just work with the original.
if (adjustedInput.Key == ConsoleKey.None && input.Key != ConsoleKey.None)
{
return EscSeqUtils.MapKey (input);
}
return EscSeqUtils.MapKey (adjustedInput);
} |
… running (net or win)
This is a super set of #3791 and exists to see diff and direction of v2 drivers as discussed in #3821
Fixes
ConsoleDriver
to minimize duplicated code in all drivers #2319EscSeqUtils
#2803ConsoleDriver
s to support ANSI sequences natively (e.g. Virtual Terminal Sequences on Windows) #2610Button1Clicked
events onNetdriver
orCursesDriver
#3374Progress
MouseInterpreter
)Proposed Changes/Todos
Splits drivers up into logical components, simplifies and centralizes shared code patterns.
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)