You are not logged in.
I have e.g. super-T set up to open my terminal program. This works fine most of the time, instantly showing a terminal, but right after unlocking, it takes about 10 seconds for the program to appear. Similarly with my other shortcuts like super-F for Thunar, super-S for rofi – they work instantly most of the time, but take about 10 seconds if it's right after unlocking. If I hit several in a row right after unlocking, only one of them has an effect.
Keyboard shortcuts that *aren't* from XFCE's keyboard settings work just fine, e.g. Firefox ctrl+t opens a tab instantly even if I just unlocked.
This is on a Thinkpad X270 running Xubuntu 18.04 with light-locker. I haven't seen this on earlier Xubuntu's (where I've mostly used xscreensaver instead of light-locker), but I haven't tried earlier Xubuntu's on this laptop either.
… I just noticed that if I remove my ~/.Xmodmap, currently containing
clear Lock
clear Control
keycode 66 = Control_L
add control = Control_L Control_R
then the XFCE shortcuts work instantly after unlocking again! But why?
$ time xmodmap .Xmodmap
real 0m0,049s
user 0m0,001s
sys 0m0,005s
– that shouldn't take 10 seconds :-/
-----
I could have a startup script that runs
xmodmap ~/.my-xmodmap
, but then the xmodmap settings get reset on plugging in/out USB headphones, which is even more annoying.
Last edited by unhammer (2018-08-16 06:33:51)
Offline
You have to write a udev rule that sets xmodmap (e.g. xmodmap ~/.my-xmodmap) every time usb headphones are plugged/unplugged.
Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c
Offline
That's horrible
I guess it's something like this that happens internally in xfce too, only with the script hardcoded to do "xmodmap ~/.Xmodmap". It'd be nice if there were some preferences for that, e.g. "run this script on login, unlock and on USB keyboards being plugged in" (defaulting to "xmodmap ~/.Xmodmap").
Offline
Can you try to convert .Xmodmap to .xkb and set it to autostart?
First modify the .Xmodmap file as desired. These are easier to edit directly than .xkbmap files. When it is loaded:
xmodmap .Xmodmap
then convert to an .xkb file:
xkbcomp $DISPLAY $HOME/.xkbmap
To auto-load on startup, open Startup Applications, click Add, and on the Command line enter:
xkbcomp /home/user/.xkbmap ":0"
Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c
Offline
What is the improvement of doing
xkbcomp /home/user/.xkbmap ":0"
on Startup instead of
xmodmap ~/.my-xmodmap
on Startup?
(I have a ~/.xkbmap file now, but caps-as-ctrl is still lost when I e.g. reconnect to my bluetooth loudspeaker :-/)
Offline
Found a solution: Edit /etc/default/keyboard and change
XKBOPTIONS=""
to
XKBOPTIONS="ctrl:swapcaps"
So simple. And as a bonus, it works for all users, and when not logged in. No xmodmap needed, and stays set even after plugging in usb keyboards and headphones.
Offline
[ Generated in 0.012 seconds, 8 queries executed - Memory usage: 535.79 KiB (Peak: 536.63 KiB) ]