kitten @ send-key: Fix some keys being sent in kitty keyboard protocol encoding when not using socket for remote control

The @ kitten no longer changes keyboard mode unless actually needed.
This commit is contained in:
Kovid Goyal
2024-05-02 11:04:41 +05:30
parent 5e12c0b144
commit 814412b8ac
4 changed files with 30 additions and 11 deletions

View File

@@ -26,9 +26,11 @@ func is_stream_response(serialized_response []byte) bool {
func do_chunked_io(io_data *rc_io_data) (serialized_response []byte, err error) {
serialized_response = make([]byte, 0)
lp, err := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors, loop.OnlyDisambiguateKeys)
lp, err := loop.New(loop.NoAlternateScreen, loop.NoRestoreColors)
if io_data.on_key_event != nil {
lp.FullKeyboardProtocol()
} else {
lp.NoKeyboardStateChange()
}
if err != nil {
return