By Javier Acosta on Mar 18, 2008
setxkbmap has been integrated into Solaris Nevada! It is a command which allows users to switch between different keyboard layouts on-the-fly. This command, maps the keyboard using the layout determined by different options specified on the command line. Although it still has some minor issues to be fixed in Nevada, it is a very useful program for those looking for an alternative of IIIMF on switching keyboard layout on-the-fly. Unlike IIIMF, setxkbmap is not character encoding dependent, it means that it works not only for UTF-8 but also for ISO and other locales.
setxkbmap sets the keyboard layout using the X keyboard Extention. The source for all of the components used can be found in /usr/X11/lib/X11/xkb/ directory.
The source of all keyboard maps is taken from /usr/X11/lib/X11/xkb/symbols/"kb_layout"
where "kb_layout" is the name of the keyboard layout in the above directory.
e.g. es, fr, ru, cz, etc...
As I mentioned before there are some issues to be fixed:
- the most important is probably that setxkbmap has by default its path to the source of all xkb components in /usr/X11/share/X11/xkb directory like other Unix OS, but Solaris has its xkb source in a different directory (/usr/X11/lib/X11/xkb), I believe that this issue will be fixed soon but for now you must add the correct path manually (at least for the 'rules' file). You will need to do that just once because 'rules' file will be remembered until you restart your Xserver.
$ setxkbmap -rules /usr/X11/lib/X11/xkb/rules/xorg
- Another issue is that user don't have by default path to the 'setxkbmap' command, so in case you don't like typing /usr/X11/bin/setxkbmap each time you want to switch your kb layout; you can add /usr/X11/bin to your path.