-
Notifications
You must be signed in to change notification settings - Fork 696
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... |
ok looks like Released+Clicked flags together is bad. TG code wants 2 seperate events I think. Got it, is just about order of events |
Glad you found the solution but that's really the cause of the bad behavior that was causing the right click wasn't working. Of course that each escape sequence must raise separate events, for them to work as expected. Good work and Happy New Year. |
Happy new year! There is actually no escape sequence for click so you must in fact create one manually in interpreter: Input:
We see mouse is moved with no button This must currently be translated into 4 events for Terminal.Gui right click menu to work properly:
So it is not a 1 to 1 mapping between escape codes and events, click is a 'supplemental' event that we inject into the event stream. Combining flags e.g. Released+Click as one event does not work with current codebase (which is the original thing I was doing). |
@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:
|
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)