psi-plus / main

Main repository with patches and required resources
https://psi-plus.com/
GNU Lesser General Public License v2.1
68 stars 20 forks source link

Default keybindings conflict with a lot of standard keybindings. #778

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello.

By default, psi has a lot of keybindings defined, for example C-M-b, which conflicts with Emacs default (backward-sexp). Since psi is a resident program, and emacs and many others are not, could it be possible to make default key bindings less aggressive?

Ri0n commented 4 years ago

Hi Do you believe there universal solution exists? Unfortunately we have no active Mac users among developers. So nobody can tell us what's the best choice for every particular key binding.

Of course you can manually assign whatever you want. If this solution is good enough for you please close the issue.

ghost commented 4 years ago

The default binding for Ctrl-Alt-b is "hide all active windows". If psi's window is not even selected, why would this keybinding be triggered at all?

The general solution would be to either (1) not bind functions that may be triggered when other applications are having focus (i.e. when the user is using another application), or (2) bind ones, but give a visible warning the first time it is used, something like a pop-up with a message "you typed Ctrl-Alt-B, did you really intend to hide all psi's windows, or was using something unrelated?". This warning, again would be only applicable to the globally triggered functions, as they are the only ones which may be a source of confusion.

Again, I spent 6 hours debugging this issue, and examined all my input pipeline, starting from the keyboard driver, going through the input method (I use SCIM), keyboard switcher, Xorg bindings, window manager bindings, terminal emulator bindings, termcap escape sequences, bash, readline and emacs' bindings. The fact that a totally unrelated application is intercepting them was a huge surprise.

P.S. How are Mac's related to this at all?

Ri0n commented 4 years ago

oh. sorry. It seems together with Emacs I started thinking about osx too. Some mind magic :)

Ri0n commented 4 years ago

Ctrl-Alt-b is Boss Key. It's basically when you want to hide all Psi-related quickly and without questions and doesn't matter if Psi windows are active or not.

But anyway about Emacs. Since it has hotkeys for 100500 functions there always will be conflicts with it.

Ri0n commented 4 years ago

Well maybe it's better to not set global hostkeys at all by default