]> git.draconx.ca Git - fvwmconf.git/blobdiff - common/bindings
Don't lock the screen on a double scroll lock.
[fvwmconf.git] / common / bindings
index c3e474a0ddb4c372b6d49f713f4f75869d3e4ebb..afc2962b13401d71416f10e1dca5172207e038a8 100644 (file)
@@ -35,8 +35,20 @@ Key grave A C  Exec exec $[TERMINAL]
 Key grave A CM Exec exec $[TERMINAL] -e zsh -f
 Key F3 A M  Module FvwmConsole -terminal urxvt
 
-# Screen locking
-Key XF86Standby A A Exec exec xscreensaver-command -lock
+# Screen locking.  Since a double scroll lock is used to communicate with the
+# KVM, take some care to only lock the screen if the scroll lock key is pressed
+# once.
+DestroyFunc FinishLock
+AddToFunc   FinishLock
+ + I Key Scroll_Lock A A LockScreen
+ + I $*
+
+DestroyFunc LockScreen
+AddToFunc   LockScreen
+ + I Schedule 750 FinishLock Exec exec xscreensaver-command -lock
+ + I Key Scroll_Lock A A FinishLock Deschedule $[schedule.last]
+
+Key Scroll_Lock A A LockScreen
 
 DestroyFunc DoPageMove
 AddToFunc   DoPageMove