From 54790622a95b55707635631c4f04e1cf3031bdac Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Tue, 20 Mar 2012 19:34:01 -0400 Subject: [PATCH] Don't lock the screen on a double scroll lock. A double scroll lock is used to communicate with my KVM. This should not have a side effect of locking the screen, so arrange for the screen to only lock if the scroll lock key is pressed once. Unfortunately, FVWM does not appear to have "single press" versus "double press" for key bindings (although it does for mouse bindings...), so we simulate it using a timer. --- common/bindings | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/common/bindings b/common/bindings index f87c136..afc2962 100644 --- a/common/bindings +++ b/common/bindings @@ -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 Scroll_Lock 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 -- 2.43.0