sillysloft / fluxbox

Fluxbox Window Manager (Mirror)
http://fluxbox.org/news/
Other
0 stars 1 forks source link

Composed keyboard shortcuts block other ones #952

Open sillysloft opened 15 years ago

sillysloft commented 15 years ago

Hello,

the thing is tricky to explain, so here is an example of what I mean. Say you have the following shortcuts in your ~/.fluxbox/keys : # Moving around Mod1 Tab :NextWindow Mod1 Shift Tab :PrevWindow Mod1 F1 :Workspace 1 Mod1 F2 :Workspace 2 # Application shortcuts Mod4 T :ExecCommand xterm Mod4 F :ExecCommand firefox # The next one reveal the bug Control X Mod4 K :ExecCommand xkill # End of ~/.fluxbox/keys

The resulting beheaviour of such configuration is problematic. Every time you type Control X for an application (like C-x for changing servers in irssi or C-x C-f in emacs to open a file), fluxbox then waits _forever_ until you type "Mod4 K" to complete the shortcut he knowns. You can still do things, like moving windows etc, but if you don't complete the shortcut he knows, all the other shortcuts don't work anymore (no more menus, desktop changes etc.).

I think that when the user type a key that do not match a known fluxbox shortcut, fluxbox should reset its shortcut chain analysis rather than waiting for the known ones to be typed.

I'm currently using Fluxbox 1.1.1, but this bug was annoying me since many months...

Reported by: gillux

sillysloft commented 13 years ago

This might be related: Same happens if you have a long keychain and a shorter one that is subchain of that longer one. Shorter keychain is never executed. I think it would be best if you could have such behavior: if keychain is matched (lets call it A i.e. "Mod1 a") execute command assigned to it, but don't stop matching keychain if there is longer keychain (lets call it B i.e. 'Mod1 a b") that starts with previously mentioned kaychain "A" , that is if user presses "Mod1 a b", commands should be executed associated with both keychains, first command A then B. (such behavior could be configurable in init file maybe, since some people might not want this) This would allow some neat things i.e. you could have long keychains and bind some osd on shorter subchains, so that when your in a middle of long keychain window/osd pops up witch displays/explains further options to continue keychains. Of course you would do this by calling some script, for maximum flexibility since someone would come up with even neater things to do with this, i guess:)

Original comment by: morphles

sillysloft commented 8 years ago

Original comment by: baghira-style

sillysloft commented 8 years ago

The original bug is fixed (implicitly and differently) by https://github.com/fluxbox/fluxbox/commit/6ca6422344f0046ef1794c5fbaea90d28692fd5f

The other thing would introduce a new ambiguity, because you cannot start a new chain (or trigger a simple shortcut) that overlaps with the remaining sequence.

Original comment by: baghira-style