zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
21.58k stars 651 forks source link

Use `Ctrl+Space` keybinding #357

Open PhML opened 3 years ago

PhML commented 3 years ago

Information

zellij --version: 0.5.1

I tried to bind lockmode to Ctrl+space like this in the config file:

- action: [SwitchToMode: Locked,]
  key: [Ctrl: ' ',]

but it doesn’t work.

Is it a termion issue?

a-kenji commented 3 years ago

Thank you for the issue! This is definitely worth investigating! I wish that were possible as well.

Is it a termion issue?

I believe so, but I am not sure.

For investigation: https://gitlab.redox-os.org/redox-os/termion/-/issues/169 https://gitlab.redox-os.org/redox-os/termion/-/issues/16 https://gitlab.redox-os.org/redox-os/termion/-/merge_requests/175

SaintFenix commented 3 years ago

I've noticed this issue myself, in my Pull Request #362, I wasn't able to bind in a similar manner these keys:

- action: [Resize: Up,]
   key: [Ctrl: 'Up',]
- action: [Resize: Down,]
   key: [Ctrl: 'Down',]
- action: [Resize: Left,]
   key: [Ctrl: 'Left',]
- action: [Resize: Right,]
   key: [Ctrl: 'Right',]

It seems as though any non-alphanumeric keys, do not combo properly in the current setup.

rosshadden commented 2 years ago

Does anybody have a workaround for this? I understand the problem lies in a library used, but if there's anything anybody has gotten to work that bypasses or mitigates the problem in user-land it would be very much appreciated.

imsnif commented 2 years ago

Does anybody have a workaround for this? I understand the problem lies in a library used, but if there's anything anybody has gotten to work that bypasses or mitigates the problem in user-land it would be very much appreciated.

Maybe you can look into binding a key in your terminal emulator? Eg. if you can get Alacritty to bind ctrl+space to ctrl+y (or some such) maybe it'll work out like that.

Mic92 commented 2 years ago

In the foot terminal this option might do the job the text-bindings option would allow this.

LukeCarrier commented 5 months ago

It is currently possible to achieve this by binding Ctrl @, but it seems #3383 finally adds support for Ctrl space directly. This is possible without changes to termion since both keys result in a null byte (\0) in the console.