Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt+[] also triggered by Ctrl+PageUp/PageDown #2441

Open
jovandeginste opened this issue May 10, 2023 · 6 comments
Open

Alt+[] also triggered by Ctrl+PageUp/PageDown #2441

jovandeginste opened this issue May 10, 2023 · 6 comments

Comments

@jovandeginste
Copy link

jovandeginste commented May 10, 2023

Basic information

zellij --version: 0.36.0
stty size: 53 117
uname -av or ver(Windows): 5.15.0-71-generic #78-Ubuntu (and other)

List of programs you interact with as, PROGRAM --version: output cropped meaningful, for example:
Tilix version: 1.9.5 (but other terminal emulators show the same behaviour)

Further information

  1. start a fresh instance
  2. create multiple panes
  3. use ctrl+pageup and ctrl+pagedown
  4. see the layout change as if using alt+[]

This is annoying since I use ctrl+pageup/pagedown to switch between buffers in Neovim.

Log files

zellij.log
zellij-12.log
zellij-14.log

@zsehanovic
Copy link

zsehanovic commented May 10, 2023

Thought this might help with debugging:
(log stdin_handler.rs:96)
(tables: showkey -s -k -a)
[

INP: [91] 
EVT: [Key(KeyEvent { key: Char('['), modifiers: NONE })] 
Key ASCII Keycode ScanCode
[ 91 0133 0x5b

]

INP: [93] 
EVT: [Key(KeyEvent { key: Char(']'), modifiers: NONE })] 
Key ASCII Keycode ScanCode
] 93 0135 0x5d

Alt + [

INP_buff: [27, 91] 
EVT: [Key(KeyEvent { key: Char('['), modifiers: ALT })] 
Key ASCII Keycode ScanCode
^[[ 27 0033 0x1b
91 0133 0x5b

Alt + ]

INP_buff: [27, 93] 
EVT: [Key(KeyEvent { key: Char(']'), modifiers: ALT })] 
Key ASCII Keycode ScanCode
^[] 27 0033 0x1b
93 0135 0x5d

PgUp

INP: [27, 91, 53, 126] 
EVT: [Key(KeyEvent { key: PageUp, modifiers: NONE })] 
Key ASCII Keycode ScanCode
^[[5~ 27 0033 0x1b
91 0133 0x5b
53 0065 0x35
126 0176 0x7e

PgDn

INP: [27, 91, 54, 126] 
EVT: [Key(KeyEvent { key: PageDown, modifiers: NONE })] 
Key ASCII Keycode ScanCode
^[[6~ 27 0033 0x1b
91 0133 0x5b
54 0066 0x36
126 0176 0x7e

C^PgUp

INP: [27, 91, 53, 59, 53, 126] 
EVT: [Key(KeyEvent { key: Char('['), modifiers: ALT }), Key(KeyEvent { key: Char('5'), modifiers: NONE }), Key(KeyEvent { key: Char(';'), modifiers: NONE }), Key(KeyEvent { key: Char('5'), modifiers: NONE }), Key(KeyEvent { key: Char('~'), modifiers: NONE })] 
Key ASCII Keycode ScanCode
^[[5;5~ 27 0033 0x1b
91 0133 0x5b
53 0065 0x35
59 0073 0x3b
53 0065 0x35
126 0176 0x7e

C^PgDn

INP: [27, 91, 54, 59, 53, 126] 
EVT: [Key(KeyEvent { key: Char('['), modifiers: ALT }), Key(KeyEvent { key: Char('6'), modifiers: NONE }), Key(KeyEvent { key: Char(';'), modifiers: NONE }), Key(KeyEvent { key: Char('5'), modifiers: NONE }), Key(KeyEvent { key: Char('~'), modifiers: NONE })] 
Key ASCII Keycode ScanCode
^[[6;5~ 27 0033 0x1b
91 0133 0x5b
54 0066 0x36
59 0073 0x3b
53 0065 0x35
126 0176 0x7e

@TheSast
Copy link

TheSast commented Jul 14, 2023

This also happends on Ctrl/Alt + Insert and Ctrl/Alt + Delete

@rnovacek
Copy link

rnovacek commented Aug 3, 2023

Shift + PageUp and Shift + PageDown have the same effect and cannot be remapped (I have raised #2673 about it).

@tbottomparallel
Copy link

tbottomparallel commented Aug 3, 2023

Also Alt PageUp and Alt PageDown trigger the layout changes, and cannot be unbound

$ zellij
  × Failed to parse Zellij configuration
   ╭─[/home/tbottom/.config/zellij/config.kdl:2:1]
 2 │ keybinds {
 3 │     unbind "Alt PageUp"
   ·     ─────────┬─────────
   ·              ╰── Invalid key: 'Alt PageUp'
 4 │     normal {
   ╰────
  help: For more information, please see our configuration guide: https://zellij.dev/documentation/configuration.html

and in a similar vein Ctrl Alt Arrow and Alt Shift Arrow and Ctrl Alt Shift Arrow all behave like Alt Arrow

@andreamtp
Copy link

andreamtp commented Jun 6, 2024

Same problem here: on linux you learn pretty soon to Shift PgUP/PgDown to scroll through the terminal.

If it cannot be mapped to scroll up/ down (see #2934), at least avoid making it mapped to something else: muscolar memory is hard to remap, but having it triggering other changes is really disappointing.

This bug raise frustration in daily usage of a your great project, please don't forget about user experience of linux nerds, that is likely one of your major base.

@brianmay
Copy link

brianmay commented Jun 6, 2024

Yes, I wouldn't mind if the key combination did nothing. But when it suddenly changes the layout of my panes, which were perfect they way there were. Arrgh. And I can't restore then back again.

Problem is though, I have no idea where this mapping is coming from. Or what function it maps to even. I have tried searching github, but can't find anything relevant.

I think the first step to solving this issue is knowing exactly what happens when you push Shift/Ctrl/Alt PageUp/PageDown.

If somebody could point me to a code reference where these mappings are defined, that would be a huge help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants