! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfwm: Some keyboard shortcuts are shown correctly, but do not work after restart


Description Klaus Kusche 2013-01-05 11:09:18 CET
I've set some keyboard shortcuts in xfwm's preferences dialog:
Cycle windows                        <Primary> F14
Cycle windows (reverse)              <Primary> F13
Move win to prev workspace           <Super> F13
Move win to next workspace           <Super> F14
Prev workspace                       <Shift> F13
Next workspace                       <Shift> F14

Immediately after being set in the preferences dialog,
they all work as expected.

However, after restarting the system and logging in again,
they don't work any longer: The window manager simply ignores them,
and they end up in the focussed application (for example,
if the terminal has focus, the corresponding escape sequence is shown).
The actions above can't be invoced by the keyboard at all after restart,
the default bindings for them are also not recognized.

As far as I can tell, all my other escape sequences seem to work,
just the ones above are ignored.

The interesting thing is, they are remembered correctly in the preferences,
they do not work although being stored correctly: 
If the keyboard preferences are opened, the shortcuts are shown exactly
as they have been entered and have worked before, they have not been lost.

After setting the same shortcuts again (which doesn't change them in any way
in the list of shortcuts), they work again, but just for the current session.
Comment 1 Klaus Kusche 2013-08-15 10:12:10 CEST
Any news here?
Comment 2 Adam Milazzo 2014-01-05 04:51:37 CET
I have the same problem, and it's quite annoying, although this is probably a duplicate of #8533.
Comment 3 Klaus Kusche 2014-03-16 10:51:41 CET
Still broken in 4.11.1.
Comment 4 Olivier Fourdan editbugs 2014-03-16 11:11:18 CET
Do you have foreign keyboard layouts? (By foreign, I mean a different input language/type of keyboard)

I suspect a race at startup between the keyboard layout plugin and xfwm4 key grabbing that would cause the wrong keys to be grabbed.

But, err, never got the time to investigate this.

Quick test you could do is to check the option "keep default layout" in the keyboard plugin.
Comment 5 Adam Milazzo 2014-03-16 11:15:26 CET
I do, and I will note that the key combinations that use the same physical keys (scancodes) in both QWERTY and my layout do work on startup. It's only the key combinations that would use different keys that fail to work. But that's almost all of them in my case.

So your race condition hypothesis sounds likely.
Comment 6 Klaus Kusche 2014-03-16 11:33:02 CET
That explanation sounds reasonable to me, too.
During session startup, I run a "setxkbmap" command
which assigns or reassigns about a dozen keys, 
among them F13, F14 and Super.

However, I can't test without that command, because without,
my keyboard doesn't have F13 or F14 at all.
Comment 7 Klaus Kusche 2014-03-17 07:23:26 CET
You are talking about a race at startup between keyboard layout changes
and the window manager grabbing the keys.

If this is really the cause of the problem, it is not restricted to startup:
I'm on a notebook, and I switch between different keyboard layouts
(and different key assignments, e.g. for F keys and modifiers) on the fly
whenever changing from the notebook's keyboard (mobile opereation)
to the keyboard connected to the docking station (working on my desk)
or back.

Hence, checking for keycodes will always get messed up,
only the keysyms give the correct information.
Comment 8 Klaus Kusche 2014-03-23 10:01:05 CET
Your assumption is correct.
I moved my setxkbmap command from Xfce's Session Application Autostarts
to somewhere early in xfce4/xinitrc, and now the keys work fine.
Comment 9 Git Bot editbugs 2020-05-29 11:54:12 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfwm4/-/issues/108.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #9721

Reported by:
Klaus Kusche
Reported on: 2013-01-05
Last modified on: 2020-05-29


Olivier Fourdan
CC List:
2 users




Additional information