ismail-yilmaz / Bobcat

A cross-platform terminal emulator, using TerminalCtrl & U++
GNU General Public License v3.0
17 stars 1 forks source link

Ctrl + Left / Right doesn't skip word #5

Closed dolik-rce closed 8 months ago

dolik-rce commented 8 months ago

Steps to reproduce:

Press Ctrl + Left while editing a command in Bash.

Expected behavior:

In other terminals, this results in cursor moving one word to the left. Similarly for Ctrl + Right to move one word to the right.

Actual behavior:

Nothing happens, cursor stays at the same position.

Additional info:

I'm using Bash 5.2.21 on Sway (wayland compositor). I believe that this should be handled by bash itself, the shortcut is loaded from /etc/inputrc:

$ bind -P | grep -E '^(for|back)ward-word'
backward-word can be found on "\e\e[D", "\e[1;3D", "\e[1;5D", "\e[5D", "\eb".
forward-word can be found on "\e\e[C", "\e[1;3C", "\e[1;5C", "\e[5C", "\ef".

Here \e[1;5C and \e[1;5C correspond to Ctrl + Left or Right respectively.

ismail-yilmaz commented 8 months ago

Bobcat activates VT function key style (used by many older cli software) by default.

Can you switch it to the PC style in the settings/emulation/function key behavior and confirm that?

Maybe I should make PC style the default option....

dolik-rce commented 8 months ago

Yes, with PC-style function keys turned on the behavior is correct. Thanks for the hint.

ismail-yilmaz commented 8 months ago

OK, thanks for the confirmation and report. I decided to make the PC style default. It can be easily switched to VT on demand. Also I'll note the difference in the help docs.