File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/Microsoft.PowerShell.ConsoleGuiTools Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -322,11 +322,15 @@ public void Dispose()
322322 {
323323 if ( ! Console . IsInputRedirected )
324324 {
325- // By emitting this, we fix an issue where arrow keys don't work in the console
326- // because .NET requires application mode to support Arrow key escape sequences
327- // Esc[?1h - Set cursor key to application mode
328- // See http://ascii-table.com/ansi-escape-sequences-vt-100.php
329- Console . Write ( "\u001b [?1h" ) ;
325+ // By emitting this, we fix two issues:
326+ // 1. An issue where arrow keys don't work in the console because .NET
327+ // requires application mode to support Arrow key escape sequences.
328+ // Esc[?1h sets the cursor key to application mode
329+ // See http://ascii-table.com/ansi-escape-sequences-vt-100.php
330+ // 2. An issue where moving the mouse causes characters to show up because
331+ // mouse tracking is still on. Esc[?1003l turns it off.
332+ // See https://www.xfree86.org/current/ctlseqs.html#Mouse%20Tracking
333+ Console . Write ( "\u001b [?1h\u001b [?1003l" ) ;
330334 }
331335 }
332336 }
You can’t perform that action at this time.
0 commit comments