* Thomas Adam <tho...@xteddy.org> [2019-08-29 09:35 -0400]:
On Wed, Aug 28, 2019 at 01:03:32PM -0400, Dave Weller-Fahy wrote:Greetings,I've searched the website, archives, wiki, and a number of configuration websites, and have been unable to find a way to cause an action to happen when a modifier key is held down and/or released. I'm running fvwm 2.6.8 on CentOS 7.This has always been historically tricky.
At least it's not easy: if it were easy I'd feel really dumb for missing it. :)
The use case is to have Ctrl-Alt-(up|down|left|right) change desks, but, if one wants, then holding Ctrl-Alt before pressing the arrow key will pop up the pager so you can see the desks to which you will be changing.A lot of the replies here have been utterly overkill, for what should be as simple as: FvwmPager -transient
Thank you! I missed that bit entirely (especially about the "when button released"), however it seems that doesn't do what I'd expect. I think I misinterpreted "button" to mean "key or button", but in this case it seems to be just "button", as in "mouse button". I created a small function called ChangeToDesk with just the pager call (with -transient) and a GotoDesk command, and bound it to Ctrl-Alt-Down. #v+ Style FvwmPager StaysOnTop, Sticky Key Down A CM ChangeToDesk 1 # Function: ChangeToDesk $0 # # Change desks downward (if $0 = 1) or upward (if $0 = -1). DestroyFunc ChangeToDesk AddToFunc ChangeToDesk + I Test ($[infostore.DEBUG]) Echo "< ChangeToDesk" + I Module FvwmPager -transient PopUpPager 0 3 + I Test ($[infostore.DEBUG]) Echo "| ChangeToDesk - FvwmPager" + I GotoDesk $0 0 3 + I Test ($[infostore.DEBUG]) Echo "| ChangeToDesk - GotoDesk" #v- My attempts to use this configuration are below. 1. I hit Ctrl-Alt-down. 2. The pager pops up, and I change desktops. 3. No other arrow keys will cause the desktop to change again until I release Ctrl and Alt. 4. Releasing Ctrl and Alt does not cause the pager to close. 5. Hitting any other key causes the pager to be closed. This is closer, and with some other options I may be able to get closer still. Thanks again for the information about transient. Also, on a side note, is there any chance that fvwm3 will have more flexibility with regards to acting upon keyboard presses, holds, and releases because of the restructuring? Regards, -dave
signature.asc
Description: PGP signature