On Sun, Jun 05, 2011 at 03:46:08PM +0200, Kalten wrote: > Hello Thomas Adam! > > >> I tried to stop FireFox from acting on [...] C-q [...] > >> Key (Firefox*) Q A C Nop > > As a general rule, don't use a glob-pattern here, use the window > > class. > You mean, what FvwmIdent(1) tells as ``Class''? So it would have been > Key (Firefox) Q A C Nop > without the ``*'', am I right?
Yes. > > > But it won't help you unfortunately, as Firefox won't accept or listen > > to synthetic key events, which is what FVWM sends along to the > > application. So you can't do what you want. > As I said (let me correct ``(Firefox*)'' to ``(Firefox)''): Yes. > >> To see the real behaviour I changed that to: > >> Key (Firefox) Q A C Exec exec xterm Yes. > and FireFox /did/ react as I wanted it to (as described in my last mail) > as it did not receive the C-q command but fvwm started an xterm instead. > > What you mentioned seems to be the problem with > >> Key Q A C Exec exec FvwmCommand 'FakeKeypress modifiers 8 press q' > and programs like e.g., ``git gui'' or ``Thunderbird''. As I had been > warned in the manual page of fvwm2(1) that FakeKeypress might not work > with all applications, I was not too surprised. > But the point remains, that: > Key (Firefox*) Q A C - > Key Q A C - > Key (Firefox) Q A C Exec exec xterm > does change the behaviour of e.g., ``git gui'' or ``Thunderbird'' by not > quitting when receiving C-q anymore and reacting properly again after we > add: > Key (Firefox) Q A C - I'm sorry, but you're not being clear enough about what's wrong, and what you expect. Do you really mean to clear the binding with "-", or do you really want to try and pass the key event through to the application to handle instead with "--"? That's what I assumed you meant before -- which won't work, due to the reasons I outlined before. There is no difference in having a global binding such as: Key Q A C Exec exec foo and then trying to override that per-application to enable ^Q to work in Firefox, as in: Key (FireFox) A C -- Or using: Key ... FakeKeyPress ... The problem here is, like with FakeKeyPress, they rely on the underlying application accepting synthetic key events, which some won't due because of security risks. This is what the man page attempts to outline. To automate this more, here's what you could try: DestroyModuleConfig A:* *A: focus_change SomeFunction AddToFunc StartFunction I Module FvwmEvent A DestroyFunc SomeFunction AddToFunc SomeFunction + I ThisWindow ("Firefox|WindowA|WindowB") Key Q A C - + I TestRc (NoMatch) Key Q A C Exec exec xterm Where, you can see the list of names there as the class names of the windows you want to match which should unbind ^Q from its original meaning so that FVWM doesn't intercept it. If the focused window then doesn't match the names you want, the key is reset to some default action. You can improve upon this slightly. The list of windows might grow, so I would be more inclined to use style conditions to give each of the windows an identifier, as in: Style FireFox State 2 Style WindowA State 2 Style WindowB State 2 Then you can change "SomeFunction" to do: DestroyFunc SomeFunction AddToFunc SomeFunction + I ThisWindow (State 2) Key Q A C - + I TestRc (NoMatch) Key Q A C Exec exec xterm Which then only matches those windows with a state bit of "2" in this case. > >> fvwm 2.7.0 compiled on Jun 4 2011 at 19:28:23 [...] > > Use FVWM 2.6.1, please. 2.7.0 doesn't technically exist anymore. > Are you kidding me? 2.7.0 is older than 2.6.1??? Who should suspect such > a thing? And the news[1] page tells us: I am not kidding. > ---SCHNIPP--- news[1] > Changes in beta release 2.7.1 (not yet released) > Changes in beta release 2.7.0 (15-Apr-2011) > Changes in stable release 2.6.1 (16-Apr-2011) > ---schnapp--- > I would have assumed, that 2.6.1 is (as told there) the stable version, > and 2.7.0 is the current beta, and 2.7.1 is the future beta version. > I am confused! One should note such things on the news[1] page! :-( It's autogenerated, so no. The download links for it have been removed. -- Thomas Adam -- "Deep in my heart I wish I was wrong. But deep in my heart I know I am not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)