for using xmm files (xmodmap) $ xmodmap filename say $ xmodmap inscript.hi.map to get default keymap $ xmodmap default Chek in keymap files for a line keycode = ModeSwitch XF86ModeLock if XF86ModeLock is present after ModeSwitch , this basically locks the mode (u need not keep pressing the modifier key), it works like a toggle. But for this in XF86Config file u need to disable XKB by giving XkbDisable (this was with old XFree86, I will let you know what to do with new X-4.0) > I ahve used mode_switch for some key. > But whenever i press down that particular key (which i defined as > mode_swirtch ) the key is chaged toi the defiend lanf\guage. > how to lock that particular key in a particular case. > Thats with Xmodmap keymaps. To be able to use it without keeping the key pressed you need to modify the XF86Config / XF86Config-4 file to have in InputDevice section of Keyboard have the option XkbDisable . Section "InputDevice" Identifier "Keyboard0" Driver "keyboard" Option "XkbDisable" EndSection To use xkb files, do the following copy the xkb files to /usr/X11R6/lib/X11/xkb/symbols/ # cp inscript.hi.xkb /usr/X11R6/lib/X11/xkb/symbols/hi (do same for other languages also) to load keymap $ setxkbmap -layout hi -option grp:ctrl_shift_toggle use CTRL+SHIFT toggle $ setxkbmap -layout hi -option grp:caps lets you toggle with CAPS lock (but caps lock definition changes for current X session, donno yet how to get it back). or to set is as default always then add the option XkbLayout Section "InputDevice" Identifier "Keyboard0" Driver "keyboard" Option "XkbLayout" "hi" EndSection Writing your own keymaps ------------------------ Writing a for use with xmodmap best resource is man keymaps(5), for the man page