* Do not allow sending mouse events and emulated up/down keys to programs
when read-only mode is enabled.
* Set the currentTerminalDisplay before sending key events, like in
keyPressEvent.
* The code is restructured a bit to easily separate code allowed only* Set the currentTerminalDisplay before sending key events, like in keyPressEvent.
when read-only m* wheelEvent code is restructured a bit to easily separate code is disablednot allowed in read-only mode.