switching keyboard layout

I stopped using Fvwm years ago, and switched to WindowMaker. Recently, I have switched back, because Fvwm seems to provide all functionality of WindowMaker I need.
Except one, that is. In wmaker there is a (hidden) feature, a button in the titlebar which lets you change your keyboard layout from the default language to a different one. Pretty neat for me, as I’m programming in English and writing letters and such in German. Now I’m sure you can configure such a feature in Fvwm, but I have no idea how and I don’t want to go deep into X to figure out how it might work either. So I’m just taking the opportunity to ask:
Doeas anyone here know of a function which might do this, or can at least provide me with an idea how to program that function myself?
TIA

Does it only change the layout of the current window? If not you may want to have a look at setxkbmap, this allows you to change the layout for an already running XSession, didn’t try it myself though.

hth

tBD

No, the layout is changed only for the current window, that’s why it’s so cool :wink: .
Thanks anyway

I did that 3 days ago (but just for whole X)

Mouse 1 5       N   Exec exec setxkbmap -layout de
Mouse 3 5       N   Exec exec setxkbmap -layout us

for the 3rd Button from the right on each window
hope to have been helpful

Combine that with windowfocus and you’ve got it

One interesting module which may be of interest to you is FvwmKb which seems to store certain keyboard layouts for certain grouped windows making it appear as though several keyboard layouts exist.

– Thomas Adam