# Key binding hell



## Alain De Vos (May 31, 2022)

My desktop (xfce4) bind keys.
My window manager within (i3) bind keys.
My terminal (zakura) kind keys.
My shell (zsh) bind keys.
My terminal editor (neovim) bind keys.
Without my intention to nag, in the very end, i don't know anymore which keys are bound to what anymore ?
I should find a strategy ... Anyone ?


----------



## SirDice (May 31, 2022)

Add screen/tmux to the mix, they also have their own keybindings. And yeah, you sometimes end up with "overlap" when two different applications try to bind to the same key (combination).


----------



## getopt (May 31, 2022)

Alain De Vos said:


> I should find a strategy ...


maybe if the level of suffering became high enough.

a) you could neglect the problem
b) you could play it down
c) you could strengthen your humor 
d) at the last ressort start hacking the problem out of pure despair

if you got to somewhere near d) 

start with your local documentation of key bindings
write cheat sheats for your apps
identify overlapping bindings
hack bindings where neccessary


----------



## mer (May 31, 2022)

Write down the key bindings that you actually use plus what application sets it.
Go into every application that sets keybindings and remove them all.
Go into the applications that set the keybinds you actually use and set them.

Most applications that set keybindings are only active when the application actually has focus.
Most terminals that set key bindings the bindings are only active when that terminal has focus
Window Manager bindings are typically active when no window has focus, the mouse cursor is on the desktop/root window or on a title bar of a window.

But I agree it gets convoluted and there is really no good solution.


----------



## macondo (May 31, 2022)

I use the Fn keys:
F1 terminal
F4 close
F2 file manager
F8 chat
F5 browser

use icewm


----------



## jrm@ (May 31, 2022)

SirDice said:


> Add screen/tmux to the mix, they also have their own keybindings. And yeah, you sometimes end up with "overlap" when two different applications try to bind to the same key (combination).



At least screen and tmux each use a prefix key to limit key collisions with other applications.  Some window managers like x11-wm/ratpoison, x11-wm/sdorfehs, and x11-wm/stumpwm, which were inspired by screen and tmux, do the same.  It would be nice if other window managers like x11-wm/dwm, x11-wm/i3, or x11-wm/sway could easily be configured to also use a prefix key.  It's been years since I looked into this, so maybe it is straightforward to do this nowadays.


----------

