Repository navigation
feat: hide the key bar while a physical keyboard is connected - #8
Closed
andreas-byfut wants to merge 1 commit into
Closed
andreas-byfut wants to merge 1 commit into
andreas-byfut wants to merge 1 commit into
Conversation
With a physical keyboard attached the on-screen Ctrl, Alt, Esc and arrow keys only take up terminal rows. The key bar now hides itself then, on by default, with a switch under the key bar settings and a Hide/Show key bar entry in the session menu for devices that falsely report a keyboard. The setting is part of config export and import, and the settings switch says whether a keyboard is detected. Detection counts `Configuration.keyboard` as well as any enabled, non-virtual, alphabetic `InputDevice`, kept live with an `InputDeviceListener`, since tablet keyboard covers, some Bluetooth keyboards and OEM skins never set the configuration. An external keyboard counts regardless of `hardKeyboardHidden`: with "Show on-screen keyboard while physical keyboard is active" on, the window manager reports `HARDKEYBOARDHIDDEN_YES` for it. That veto still applies to the configuration and to built-in keyboards, which covers a closed lid or slider. A Ctrl or Alt latch is cleared when the bar hides, so it cannot linger unseen.
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a physical keyboard attached, the on-screen Ctrl, Alt, Esc and arrow keys only take up
terminal rows. The key bar now hides itself while a keyboard is connected.
Configuration.keyboardreports one, or if there is anyenabled, non-virtual, alphabetic
InputDevice. AnInputDeviceListenerkeeps this live asdevices come and go.
hardKeyboardHidden. With "Show on-screen keyboardwhile physical keyboard is active" on, the window manager reports
HARDKEYBOARDHIDDEN_YESfor it.
lid or slider.
hideKeyBarWithHardwareKeyboard, a switch under the key bar settings that alsoshows whether a keyboard is currently detected. It is included in config export and import.
that wrongly report a keyboard. If you prefer it off by default, that is a one-word change in
getHideKeyBarWithHardwareKeyboard.Tested on a tablet with a keyboard on a USB-C hub. Tests:
PhysicalKeyboardTest,ConfigImportTest.