Advanced chromium control -> No more keyboard shortcut emulation #84
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.