6

From OpenSUSE wiki:

(As long as Mode_switch/ISO_Level3_Shift is assigned to the keycode of Alt Gr - if you assign Mode_switch and ISO_Level3_Shift to different keys, you can assign up to six characters to one key!).

Please tell me the generic steps for getting 6 characters to one कey (k altered to क)?

1 Answer 1

4

Put lines like the following in your ~/.Xmodmap:

keycode 0x2D = k K U03BA U039A U0915 U05DB U0137 U0136

The keycode can be obtained by running xev and pressing the key. If you're starting from a known state, for example, a US keyboard layout, you can use the keysym already assigned to the key, as in

keycode k = k K U03BA U039A U0915 U05DB U0137 U0136

The 8 columns on the right of the = sign successively correspond to the bare key, Shift, AltGr, AltGr+Shift, and repeat these four with ISO_Level3_Shift as well.

The words on the right of the = sign are keysyms. You can find valid keysym names in /usr/include/X11/keysymdef.h (or wherever your distribution puts keysymdef.h); look for lines of the form #define XK_foo 0xabcd /* ... */: foo is the keysym name. You can also use U1234 where 1234 is the number of a unicode character in hexadecimal (for “exotic” characters like , that's often the only option).

Final warning: there are two ways to configure the keyboard under X. Xmodmap is the simple way. Xkb is another way; it's more powerful, a lot more complex, and less well documented. Sometimes xkb settings can prevent xmodmap settings from working: the xkb configuration can affect what modifiers the xmodmap columns correspond to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .