On 2004.12.26 20:34:19 +0100, Nuno Alexandre wrote:
> Hi everyone,
> I have a question about keybindings, and wether it is
> possible to dynamically assign keybindings depending on the
> application being used.
> I'd like to disable/re-map some keybindings to other keys so
> that the current maps dont interfere with the application in
> use, this could be some 3D application which makes intensive uses of
> the Meta+mouse buttons.
>
> So the idea would be like, specifying all the keybindings
> for all situations, and then, depending if the window class
> would match, a set of keybindings would become active
> overrulling the set already mapped.
> When the application exits, the keybindings revert to
> their "original" state.
>
> Anyone have some pratical way of accomplish this?
> Thanks.
You could define a set of functions that setup all keybindings that
change when you switch applications and call them using FvwmEvent.
DestroyFunc Keybinds_A
DestroyFunc Keybinds_B
AddToFunc Keybinds_A I Key Key1 A A ThisFunc
AddToFunc Keybinds_B I Key Key1 A A ThatFunc
AddToFunc Keybinds_A I Key Key2 A A ThisFunc2
AddToFunc Keybinds_B I Key Key2 A A ThatFunc2
DestroyFunc Change_KB
AddToFunc Change_KB
+ I ThisWindow (MyApp) Keybinds_A
+ I ThisWindow (!MyApp) Keybinds_b
*FvwmEvent-Keybinds: focus_change Change_KB
Module FvwmEvent FvwmEvent-Keybinds
HTH
Bjoern
--
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 Mon Dec 27 2004 - 09:26:36 GMT