-
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
Show InputPanel on focus and pointer press #4867
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.
Just to sanity check, clicking on the Terminal with a mouse doesn't bring this up, unless there's no keyboard attached, right?
@@ -824,6 +825,8 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation | |||
const auto ptr = args.Pointer(); | |||
const auto point = args.GetCurrentPoint(*this); | |||
|
|||
InputPane::GetForCurrentView().TryShow(); |
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.
Does _GotFocusHandler
not get fired automatically after this one? I'd think you'd only need it in the GotFocus one.
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.
Nope, it doesn't get fired if we already have focus. This call is here for the case where terminal is in focus, but the user closed the keyboard.
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.
Okay good enough for me. (I'd appreciate adding this as a comment in code, but you do you)
Yup, the on screen keyboard only shows up if you don't have a keyboard attached. |
Hello @leonMSFT! 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 5 hours 33 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 (
|
@msftbot merge this in 1 minute |
Hello @leonMSFT! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request I originally thought that setting `TSFInputControl::_editContext.InputPaneDisplayPolicy` to be Automatic would allow the InputPanel to show and hide automatically when `TSFInputControl` gains and loses focus. It doesn't seem to behave that way, so we'll show the InputPanel manually. I'll show the panel during `PointerPressedHandler` and during `GotFocusHandler`. A user will have the on-screen keyboard pop up when getting focus, but if they close the keyboard, they can simply re-tap on the terminal to bring it back up. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes microsoft#3639 * [x] CLA signed. * [x] Tests added/passed ## Validation Steps Performed Played on my surfaces book with the on screen keyboard by closing/tapping on the terminal and using the search box.
Summary of the Pull Request
I originally thought that setting
TSFInputControl::_editContext.InputPaneDisplayPolicy
to be Automatic would allow the InputPanel to show and hide automatically whenTSFInputControl
gains and loses focus. It doesn't seem to behave that way, so we'll show the InputPanel manually.I'll show the panel during
PointerPressedHandler
and duringGotFocusHandler
. A user will have the on-screen keyboard pop up when getting focus, but if they close the keyboard, they can simply re-tap on the terminal to bring it back up.PR Checklist
Validation Steps Performed
Played on my surfaces book with the on screen keyboard by closing/tapping on the terminal and using the search box.