[Solved] Safer unbind way for two keystroke bindings

Problems with decorations or key/mouse bindings? Or perhaps you have a cool mouse/key binding you want to share.
nobutaro
Kitten
Kitten
Posts: 5
Joined: Sun Jul 23, 2017 7:01 pm

[Solved] Safer unbind way for two keystroke bindings

Postby nobutaro » Sat Jul 29, 2017 6:54 pm

I would like to know how I can safely unbind 2nd keys in two keystroke bindings.

According to http://fvwm.org/documentation/faq/#how- ... m-bindings, I am trying two keystroke bindings. As it uses Schedule to unbind second keys, I also use Schedule to unbind second keys in 1 sec. Here is a part of my config.

Code: Select all

DestroyFunc Ore-SuperL-V
AddToFunc Ore-SuperL-V
+ I key right    A A     OreFocusRaiseUnbind Next
+ I key left     A A     OreFocusRaiseUnbind Prev
+ I key Escape   A A     OreUnbind-Ore-SuperL-V
+ I Schedule 1000 OreUnbind-Ore-SuperL-V

DestroyFunc OreFocusRaiseUnbind
AddToFunc   OreFocusRaiseUnbind
+ I $0 (AcceptsFocus) Focus
+ I Current (!Raise) Raise
+ I OreUnbind-Ore-SuperL-V

DestroyFunc OreUnbind-Ore-SuperL-V
AddToFunc   OreUnbind-Ore-SuperL-V
+ I key right        A A -
+ I key left         A A -
+ I key Escape       A A -

key v A 4 Ore-SuperL-V


In the above case,SuperL-V is the first key and Right/Left/Escape are the second keys. I schedule to unbind them after 1 sec.

The issue happens sometimes. I explain one example. I type SuperL-V at 0 sec. I type Right at 0.7 sec. I type SuperL-V at 0.9 sec again. Time comes to 1.0 sec. This is the scheduled time. All of the 2nd key are unbound. I type Right again but this moment, Right is not bound.

nobutaro
Kitten
Kitten
Posts: 5
Joined: Sun Jul 23, 2017 7:01 pm

[Solved] Safer unbind way for two keystroke bindings

Postby nobutaro » Sun Jul 30, 2017 3:04 pm

I find DeSchedule. Now my config is like this,

Code: Select all

DestroyFunc Ore-SuperL-V
AddToFunc Ore-SuperL-V
+ I OreUnbind-All
+ I key right    A A     OreFocusRaiseUnbind Next
+ I key Escape   A A     OreUnbind-All
+ I Schedule 1000 OreUnbind-All

DestroyFunc OreUnbind-All
AddToFunc   OreUnbind-All
+ I DeSchedule
+ I key Escape   A A -
+ I key right        A A -


Every when I type super-somekey, I unbind all second binding and cancel previous schedule. Now it is better than previous setting.


Return to “Decorations and bindings”

Who is online

Users browsing this forum: frankspace and 1 guest