Advanced chromium control -> No more keyboard shortcut emulation#84
Open
remco-k wants to merge 2 commits intodebloper:mainfrom
Open
Advanced chromium control -> No more keyboard shortcut emulation#84remco-k wants to merge 2 commits intodebloper:mainfrom
remco-k wants to merge 2 commits intodebloper:mainfrom
Conversation
added 2 commits
May 24, 2025 17:47
…tead of using keyboard shortcuts
Owner
|
I would also prefer to get off-board from keyboard emulation as well, and send direct tab-switch commands to chromium... but given the complexity involved (extra moving parts, more edge cases, wider blast radius... not to mention, introducing python to the mix), the current solution seems like the simpler solution among all the imperfect alternatives. Thanks for the PR; I need some time to think this through. Keeping it open as a reminder. |
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.
I've had more than once that Chromium can lose keyboard input focus due to:
This causes the kiosk mode to just get stuck on whatever page is showing until you Alt+Tab to it or click it to give it focus.
I've tried to implement various ways of making sure keyboard input focus stays at Chromium, so that Ctrl+Tab and Ctrl+R keep on working, regardless of what happens with the Raspberry GUI. Only to find out its all just not good enough or a nice solid, maintainable, understandable solution.
The only nice, proper and rocksolid solution I could think of was to completely abandon the keyboard shortcut usage. For that I implemented the use of the Chromium debugging port, via that port Chromium can be controlled in many different ways and more importantly: It doesn't matter if it has or hasn't keyboard input focus, because we're not using keyboard shortcuts anymore.
This results in a always working tab-switch. Even when Chromium is not having keyboard input focus. I think this will be a great change for this project as I can imagine that many people have this problem with their "PiOSK" that suddenly stops changing tabs.
A couple of remarks about this change:
--enable-low-end-device-modeoption from Chromium, as with that option the color depth was decreased significantly, making any picture look horrible. Tested on a Raspberry Pi 4b, looked good after that. Feel free to ignore this change.