cyd01 / KiTTY

:computer: KiTTY, a free telnet/ssh client for Windows
https://www.9bis.com/kitty
Other
1.55k stars 132 forks source link

Home/End keys behave unexpectedly compared to PuTTY or older KiTTY #500

Open deejayy opened 1 year ago

deejayy commented 1 year ago

Setting the stage: Windows 10, removed all registry keys from HKCU/Software/9bis.com and SimonTatham to get a fresh, default config each time. Three below runtimes put in the same, empty directory.

Destination: my home server, running ubuntu, term is "screen-256color", going into tmux, running midnight commander 4.8.1. When running kitty/putty, only setting I change is Terminal / Keyboard / The Function keys and keypad: Xterm R6.

✔ Trial 1: KiTTY 0.66.6.2 Edit a file (F4), press End (jump to the end of the line), press Home (jump to the start of the line), quit (F10).

Works like a charm.

✔ Trial 2: PuTTY 0.76 Edit a file (F4), press End (jump to the end of the line), press Home (jump to the start of the line), quit (F10).

Works like a charm.

❌ Trial 3: KiTTY 0.76.1.12 Edit a file (F4), press End: inserts an uppercase "F" at the cursors position, press Home: inserts an uppercase "H" at the cursors position, quit (F10), "File was modified. Save with exit?", [ No ]

--

This issue is present for some time now (not started with 0.76), I stopped updating since the first occurrence.

Showkeys output (exactly the same for all 3 scenarios, keys pressed are: F4, F10, Home, End):

user@host:~$ echo 0.66.6.2
0.66.6.2
user@host:~$ showkey -a

Press any keys - Ctrl-D will terminate this program

^[OS     27 0033 0x1b
         79 0117 0x4f
         83 0123 0x53
^[[21~   27 0033 0x1b
         91 0133 0x5b
         50 0062 0x32
         49 0061 0x31
        126 0176 0x7e
^[[1~    27 0033 0x1b
         91 0133 0x5b
         49 0061 0x31
        126 0176 0x7e
^[[4~    27 0033 0x1b
         91 0133 0x5b
         52 0064 0x34
        126 0176 0x7e
^D        4 0004 0x04

user@host:~$ echo putty 0.76
putty 0.76
user@host:~$ showkey -a

Press any keys - Ctrl-D will terminate this program

^[OS     27 0033 0x1b
         79 0117 0x4f
         83 0123 0x53
^[[21~   27 0033 0x1b
         91 0133 0x5b
         50 0062 0x32
         49 0061 0x31
        126 0176 0x7e
^[[1~    27 0033 0x1b
         91 0133 0x5b
         49 0061 0x31
        126 0176 0x7e
^[[4~    27 0033 0x1b
         91 0133 0x5b
         52 0064 0x34
        126 0176 0x7e
^D        4 0004 0x04

user@host:~$ echo 0.76.1.12
0.76.1.12
user@host:~$ showkey -a

Press any keys - Ctrl-D will terminate this program

^[OS     27 0033 0x1b
         79 0117 0x4f
         83 0123 0x53
^[[21~   27 0033 0x1b
         91 0133 0x5b
         50 0062 0x32
         49 0061 0x31
        126 0176 0x7e
^[[1~    27 0033 0x1b
         91 0133 0x5b
         49 0061 0x31
        126 0176 0x7e
^[[4~    27 0033 0x1b
         91 0133 0x5b
         52 0064 0x34
        126 0176 0x7e
^D        4 0004 0x04
deejayy commented 1 year ago

Tracked down the version change: ✔ 0.73.2.5 - ok ❌ 0.73.2.6 - fail

deejayy commented 1 year ago

Found a hint, not sure if applies.

https://github.com/cyd01/KiTTY/compare/0.73.2.5...0.73.2.6#diff-dcecb78744da6cbff94f8cceb9ea87acc91bc9395e36d2917c164a3e0aa1b0b8R7500

drinn commented 1 year ago

I've been having an issue with kitty not behaving properly when using a newer version of tmux (#496). Out of curiosity, I went and tested the versions where you tracked down where the behavior changed and am seeing similar results.

Using 0.73.2.5, tmux works fine. 👍 Using 0.73.2.6, tmux fails. ❌

Not sure if anyone is taking a look at this or not? My ticket has been open for weeks without any comments. I've already just resorted to going back and using putty for the time being as I can't work without tmux. But hopefully it gets looked at soon.