benruijl / sflock

Simple X display locker, with basic user feedback. Based on slock.
MIT License
50 stars 21 forks source link

Ctrl-Alt-Backspace bypasses sflock #6

Open firecat53 opened 11 years ago

firecat53 commented 11 years ago

Hey...love the program...any chance of modifying it to temporarily disable the Ctrl-Alt-Backspace combo while the screen is locked? I didn't notice that until today :/ I'd prefer not to completely disable that key-combo (the Xorg 'DontZap' option)...just while the screen is locked.

Thanks! Scott

benruijl commented 11 years ago

I'm afraid this seems to be impossible :-(

http://www.jwz.org/xscreensaver/faq.html#no-ctl-alt-bs

firecat53 commented 11 years ago

What about this: http://bkhome.org/blog/?viewDetailed=01653 ? Just disabling the 'Ctrl' key while the screen is locked with xmodmap? Hmm...guess I could just do that from my lock screen script....but would it make more sense to wrap sflock in a wrapper so it does that by default?

Edit: someone posted this: https://bbs.archlinux.org/viewtopic.php?pid=936454#p936454 as a hack-y way to run code after sflock terminates. I tried the xmodmap trick: xmodmap -e 'keycode 37=' sflock xmodmap -e 'keycode 37=Control_L' but the final xmodmap command was executed immediately after sflock (it forks, I'd guess), so I couldn't reset the xmodmap values after unlocking.

benruijl commented 11 years ago

Interesting. Maybe I could change the keymapping from the source itself, with XChangeKeyboardMapping or a related command.

pickfire commented 9 years ago

I would like to have this feature in slock too. http://lists.suckless.org/dev/1509/27340.html

And what is Alt-SysRq-F and Ctrl-Alt-KP_Multiply?