Skip to content

ply-terminal: Only set keyboard mode when changing it

Ray Strode requested to merge dont-set-keyboard-mode-so-much into main

Setting the console keyboard mode is not entirely idempotent. The kernel may flush the input buffer leading to lost key strokes. We currently set the mode explicitly on graphics updates as part of our more general "fix things up in case something during boot screws with the terminal settings" code.

That leads to keystrokes getting eaten.

This commit makes the terminal more careful about setting the keyboard mode. It now only changes it when plymouth thinks its necessary to do so.

In the future we could query the keyboard mode and reset it when it's wrong, but I think we should hold off on doing that until shown we need to.

Edited by Ray Strode

Merge request reports