-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Prevent read-only warning on mouse move, wheel and release #9107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems great to me. Thank you!
Hello @DHowett! Because this pull request has the Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 3 hours 57 minutes. No worries though, I will be back when the time is right! 😉 p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@zadjii-msft - can you please take a look? |
@@ -970,6 +971,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation | |||
const auto vkey = gsl::narrow_cast<WORD>(e.OriginalKey()); | |||
const auto scanCode = gsl::narrow_cast<WORD>(e.KeyStatus().ScanCode); | |||
|
|||
// Short-circuit isReadOnly check to avoid warning dialog | |||
if (_isReadOnly) | |||
{ | |||
e.Handled(!keyDown || _TryHandleKeyBinding(vkey, scanCode, modifiers)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey I know this isn't a part of this PR, but should this block be below the enhanced key and alt+# branches? Like move it to ~line 997? It seems like those two branches might affect the behavior of the keybinding handling
🎉 Handy links: |
Avoid sending mouse move / wheel / release to Terminal in the first place.
This kind of short-circuiting will prevent us reaching the
attempt to send input to connection
(that could result in the warning dialog in the read-only mode)
Closes #9074