« Return to Thread: keyboard switch

Re: keyboard switch

by James Cloos-9 :: Rate this Message:

Reply to Author | View in Thread

>>>>> "asrael" == asrael <moncolonel@...> writes:

asrael> I'm using Icewm for quite a while. Very nice thing to have...
asrael> There's one thing though that bothers me and forces me to
asrael> switch to gnome desktop ... it's switching the keyboard
asrael> layout.

You can run setxkbmap(1x) to change the keyboard layout at runtime.

You can therefore configure menu entries for each layout you want.

As an example, you might add this to ~/.icewm/menu:

menu Keyboard keyboard {
     prog DE keyboard setxkbmap -layout us,de -option grp:alt_shift_toggle -option grp_led:scroll
     prog FR keyboard setxkbmap -layout us,fr -option grp:alt_shift_toggle -option grp_led:scroll
     prog RU keyboard setxkbmap -layout us,ru -option grp:alt_shift_toggle -option grp_led:scroll
     prog AR keyboard setxkbmap -layout us,ar -option grp:alt_shift_toggle -option grp_led:scroll
}

That would give you the US keyboard as your primary and the selected
one as your secondary.

Also, note that you can have up to four layouts configured at a time.
I tend to use « -layout us,gr,ru -varient ,,phonetic » and I also
have « -option compose:menu » so that I can use the menu key to enter
compose sequences.  (I also use « -option grp:ctrls_toggle » to ensure
that the toggle does not interfere with any X clients and recommend
the use of « -option grp_led:scroll » to let you know when a secondary
layout is selected.)

This does have the downside that the only ways you know which 2ndary
keyboard is in effect are to remember what you last chose or to test
it out.  One could, however, write a tasklet for icewm that shows an
icon representing the current layout config.  (setxkbmap -print will
output the current settings; the code that uses can be re-used to
instead output an icon or set of icons.  As an example, my current
full config gives me:

"pc(pc105)+us+gr:2+inet(evdev)+ru(phonetic):3+group(ctrls_toggle)+ctrl(nocaps)+altwin(super_win)+compose(menu)"

for xkb_symbols.  From that you can see that «us» is the primary
layout, «gr» is secondary, «ru(phonetic)» is tertiary and several
other options are also selected.  Code could use that to output a
US flag in the upper left quadrant, a GR flag in the upper right,
a RU flag in the lower left and just transparancy in the lower
right quadrant.  Or, it could have icons the same size as the
taskbar icons and set them next to each other, like:

        US GR RU

Instead of using flags you can of course also use text.

It shouldn't be too hard to write, if anyone is up for a short
challenge....

-JimC
--
James Cloos <cloos@...>         OpenPGP: 0xED7DAEA6

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
IceWM-user mailing list
IceWM-user@...
https://lists.sourceforge.net/lists/listinfo/icewm-user

 « Return to Thread: keyboard switch