Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-08-15 07:28:49

unhammer
Member
Registered: 2011-11-08
Posts: 12

have to wait about 10s after unlocking before xfce kbd shortcuts work

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

#2 2018-08-16 12:40:55

Misko_2083
Member
Registered: 2015-10-13
Posts: 76
Website

Re: have to wait about 10s after unlocking before xfce kbd shortcuts work

You have to write a udev rule that sets xmodmap (e.g. xmodmap ~/.my-xmodmap) every time usb headphones are plugged/unplugged.

Offline

#3 2018-08-20 07:06:19

unhammer
Member
Registered: 2011-11-08
Posts: 12

Re: have to wait about 10s after unlocking before xfce kbd shortcuts work

That's horrible sad

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

#4 2018-08-21 17:14:51

Misko_2083
Member
Registered: 2015-10-13
Posts: 76
Website

Re: have to wait about 10s after unlocking before xfce kbd shortcuts work

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"

Offline

#5 2018-08-21 19:23:31

unhammer
Member
Registered: 2011-11-08
Posts: 12

Re: have to wait about 10s after unlocking before xfce kbd shortcuts work

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

Board footer

Powered by FluxBB