-
I have flow where I have 3 TableView(s) that are turned on/off as one goes from A, to B, to C. I'd like to use Esc as the "go back" button in this flow. By default Esc is mapped to close the app, so I changed this to F10 using:
To make Esc work, in the main window I'm overriding the KeyDown to react to the "back" key, like this:
The What I'm seeing is that if I use the F2 key everything works perfectly. However, if I use the Esc key, it works only sometimes... The actual view changes, but it's like the screen is not being updated? For example 1) I hit Esc 2) seemingly nothing happens on screen 3) I hit the down arrow key and now the screen is refreshed and it's now showing the appropriate TableView. If I were to hit Esc twice in a row, on the second Esc I can quickly see the two screens getting refreshed one after another. It's like the first Esc was paused and when I hit Esc again it "runs" both of them one after another. Thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 17 replies
-
What driver are you using? Does it reproduce if you use NetDriver (Application.UseSystemConsole before init)? Typically you don't call Draw but instead call SetNeedsDisplay Only thing special about Escape is tied up in console escape codes (AKA Terminal Sequences) but this should be unlikely to affect things. What version of nuget package are you using? |
Beta Was this translation helpful? Give feedback.
@pebezo does the new code fix problem for you?
Also by 'artifacts with NetDriver' do you mean the corners? This seems to be an odd situation where the curved corner rune renders correct on WindowsDriver but not NetDriver. The workaround is to use regular corners (although I agree they are less pretty :)
So options are
_container = new Window { X = 0, Y = 0, Width = Dim.Fill(), Height = Dim.Fill(), - BorderStyle = LineStyle.Rounded, SuperViewRendersLineCanvas = true, CanFocus = true, TabStop = TabBehavior.TabStop };