On Wed, Sep 25, 2002 at 09:24:00AM -0400, Dan Espen wrote:
> Bob Vloon <bob.vloon_at_edmond.nl> writes:
> > Hi,
> >
> > Would it be possible to trigger an event when, for example, one presses the
> > CTRL key for a certain time? I imagine something like this:
> >
> > - press CTRL for a second
> > - pop up dialog
> > - press additional key to trigger another event (becomes key combination
> > CTRL+<key>)
> >
> > I suppose it's possible and - to me ;) - it would be rather nice..
>
> It might be possible, but not without source code changes.
Wrong :-) Don't underestimate fvwm's scripting features, Dan.
You can get a rough approximation of that behaviour with 2.5.x:
Key Control_L A A Schedule 1000 1234 Menu RootMenu
Key F1 A C SomeOtherActionAndDeschedule
AddToFunc SomeOtherActionAndDeschedule
+ I Deschedule 1234
# insert custom actions below here
+ I WindowShade
...
This solution has a few drawbacks:
1) The timing may not be accurate and vary.
2) It effectively disables the left control key in all
applications. You should better use a modifier key that no
application knows about.
3) You have to issue the "Deschedule ..." line for every action
that may be triggered with the key.
4) When the key is released before the timeout, the menu still
pops up after a second.
There is little you can do about the first two. The latter two
can be solved once we have a "KeyRelease" command that allows
triggering actions when a key is released. With that, we could
add
KeyRelease Control_L A A Deschedule 1234
(Wow, sometimes even I am surprised what you can do with fvwm!)
Bye
Dominik ^_^ ^_^
--
Dominik Vogt, mail: dominik.vogt_at_schlund.de, phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed Sep 25 2002 - 09:25:55 BST