kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.12k stars 971 forks source link

alt+left/right broken under psql #6721

Closed andersarpi closed 12 months ago

andersarpi commented 12 months ago

Describe the bug When using alt+left and alt+right to move word-wise in psql. I simply get ;3D and ;3C as output.

I have no special keymaps related to alt+left/alt+right.

Note: this is on macOS so the actual key used is the option key.

To Reproduce Steps to reproduce the behavior:

  1. Start kitty
  2. Start psql
  3. Write two words with space a space between them
  4. Try jumping between the words with alt+left / alt+right

Environment details kitty 0.30.1 (6a3529b7c2) created by Kovid Goyal Darwin {redacted} 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:43:05 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6020 arm64 ProductName: macOS ProductVersion: 14.0 BuildVersion: 23A344 Frozen: True Paths: kitty: /Applications/kitty.app/Contents/MacOS/kitty base dir: /Applications/kitty.app/Contents/Resources/kitty extensions dir: /Applications/kitty.app/Contents/Resources/Python/lib/kitty-extensions system shell: /bin/zsh Loaded config files: /Users/andarp/.config/kitty/kitty.conf

Config options different from defaults: cursor_blink_interval 0.0 disable_ligatures 2 enabled_layouts ['tall:bias=50;full_size=1;mirrored=false'] font_family Fira Code font_size 13.0 hide_window_decorations 1 mouse_hide_wait 2.0 scrollback_lines 10000 tab_bar_min_tabs 1 tab_bar_style powerline tab_powerline_style slanted tab_title_template {index}: {title} window_padding_width FloatEdges(left=5.0, top=5.0, right=5.0, bottom=5.0) Added shortcuts: cmd+[ → previous_window cmd+] → next_window cmd+d → new_window_with_cwd cmd+left → send_text all \x01 cmd+right → send_text all \x05 Removed shortcuts: cmd+k → clear_terminal to_cursor active Changed shortcuts: cmd+1 → goto_tab 1 cmd+2 → goto_tab 2 cmd+3 → goto_tab 3 cmd+4 → goto_tab 4 cmd+5 → goto_tab 5 cmd+6 → goto_tab 6 cmd+7 → goto_tab 7 cmd+8 → goto_tab 8 cmd+9 → goto_tab 9 Colors: active_border_color #b7bdf8
active_tab_background #c6a0f6
active_tab_foreground #181926
background #24273a
bell_border_color #eed49f
color0 #494d64
color1 #ed8796
color10 #a6da95
color11 #eed49f
color12 #8aadf4
color13 #f5bde6
color14 #8bd5ca
color15 #a5adcb
color2 #a6da95
color3 #eed49f
color4 #8aadf4
color5 #f5bde6
color6 #8bd5ca
color7 #b8c0e0
color8 #5b6078
color9 #ed8796
cursor #f4dbd6
cursor_text_color #24273a
foreground #cad3f5
inactive_border_color #6e738d
inactive_tab_background #1e2030
inactive_tab_foreground #cad3f5
mark1_background #b7bdf8
mark1_foreground #24273a
mark2_background #c6a0f6
mark2_foreground #24273a
mark3_background #7dc4e4
mark3_foreground #24273a
selection_background #f4dbd6
selection_foreground #24273a
tab_bar_background #181926
url_color #f4dbd6

Important environment variables seen by the kitty process: PATH /Applications/kitty.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin LANG en_US.UTF-8 SHELL /bin/zsh USER andarp

kovidgoyal commented 12 months ago

this will be an issue in psql. kitty sens the same bytes for a key regardless of what program is running. it's upto the program to interpret them correctly. You can run

kitten show-key

to see what those bytes are.