You are not logged in.
Pages: 1
Hello,
i post this question here, since im pretty sure, the solution is pretty simple and i am just too stupid to find any solution.
So my question is:
On my Notebook, which is a Lenovo IdeaPad 5 14ARE05, i have a key(FN+F10), which is used to lock the notebook on windows. since im desperate to use linux and learn linux, i build up a system with arch as a base and am using bspwm as a wm and sxhkd as my keybind manager.
After searching the www, i couldnt find a solution.
i checked this page and tried XF86ScreenSaver to start betterlockscreen -l but it didnt work out.
XF86ScreenSaver
betterlockscreen -li tried to find a solution with showkeys in the tty but that just give me key 38+125 pressed and i am pretty confused and dont know how to use that in sxhkdrc.
i hope somebody can help me or give me an advice.
thanks in advance
greets
Last edited by manaog (2021-01-29 08:33:05)
Offline
First off all run "xev -event keyboard" to see whether the key generates an event an at which symbol.
A common trap w/ the screenlockers (and some other tools) is that they want to grab the keyboard what will fail if there's a passivley grabbed key pressed, you can mitigate that by pre-sleeping for a few ms, eg.
XF86ScreenSaver
sleep 0.5; betterlockscreen -lThis should give you the time to release the shortcut before the locker tries to grab the keyboard.
Offline
KeyPress event, serial 28, synthetic NO, window 0x1000001,
root 0x6aa, subw 0x0, time 1723774, (471,363), root:(1435,411),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeymapNotify event, serial 28, synthetic NO, window 0x0,
keys: 4294967210 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 this is the output when i press FN+F10.
i think i have to use another keybinding than "XF86ScreenSaver" or bind that keyevent to XF86ScreenSaver but i really dont know how i could do that, i will google abit if i can see anything in that direction
i changed the code in sxhkdrc how you wrote it.
Offline
Super_L is the "windows key" (a modifier) and the keycode fits - are you sure you pressed Fn+F10 to trigger this?
What many keyboards do is to not provide a specific key but the key triggers a combo (Super_L+L, the windows shortcut to lock the screen)
Have you tried to bind that combo to the locker?
Offline
Thx for your answer.
Super_L is the "windows key" (a modifier) and the keycode fits - are you sure you pressed Fn+F10 to trigger this?
i redid it and it was the same code as before. Yes i pressed FN+F10 for 100%.
What many keyboards do is to not provide a specific key but the key triggers a combo (Super_L+L, the windows shortcut to lock the screen)
Have you tried to bind that combo to the locker?
After binding betterlockscreen -l on super + l, i got the same result as before, it didnt work.
While writing this, i thought about that super + l is bound to another command by default. after commenting it out, while betterlockscreen -l is bind on super + l, i could lock the screen. seems like u are completely right and we can see this problem as solved.
Thank you and i appreciate your help !
greets.
Offline
Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Pages: 1