LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What is the difference between Mode_switch and ISO_Level3_Switch (https://www.linuxquestions.org/questions/linux-software-2/what-is-the-difference-between-mode_switch-and-iso_level3_switch-4175465999/)

polytropos 06-14-2013 07:52 AM

What is the difference between Mode_switch and ISO_Level3_Switch
 
I didn't find this information anywhere else, so here it is.

`xmodmap -pke' results in lines like this:

Code:

keycode  8 =
keycode  9 = Escape NoSymbol Escape
keycode  10 = 1 exclam 1 exclam
keycode  11 = 2 at 2 at
keycode  12 = 3 numbersign 3 numbersign
keycode  13 = 4 dollar 4 dollar
keycode  14 = 5 percent 5 percent
keycode  15 = 6 asciicircum 6 asciicircum dead_circumflex dead_circumflex dead_circumflex

Etc.

The format is:
Code:

keycode <NNN> = <symbol1> <symbol2> <symbol3> <symbol4> <symbol5> <symbol6> <symbol7> <symbol8>
The story in short is:
Quote:

Mode_switch selects <symbol3>
Mode_switch+Shift selects <symbol4>
ISO_Level3_Switch selects <symbol5>
ISO_Level3_Switch+Shift selects <symbol6>
(i) You can just dump the whole current keymap via `xmodmap -pke > .Xmodmap'.
(ii) Then edit it all you want. In the editing, you should define some particular key as the Mode_switch or ISO_Level3_Switch. (But, apparently, not both.)
(iii) You may also have to add Mode_switch or ISO_Level3_Switch (which-ever you have chosen) to one of the modifier keys. (It probably isn't required in modern systems. It isn't required in mine.)
(iv) Load the file as the new keymap, via `xmodmap .Xmodmap'.

Two fine pages to learn more are given below. The first link has much which is outdated (at least for my system -- xserver-xorg-core 2:1.12.4-6 -- but the explanation is short and good).

http://www.in-ulm.de/~mascheck/X11/xmodmap.html
https://github.com/leoboiko/pointless-xcompose

Example:
Two lines of my `xmodmap -pke' output say:
Code:

keycode  27 = p P p P U2018 NoSymbol U2018
keycode  28 = y Y y Y U2019 NoSymbol U2019

So, using the ISO_Level3_Latch † key, I can directly type Unicode symbols U2018(‘) and U2019(’).

Note that setting keys via `xmodmap' is now deprecated, but it works, and setting them via setxkbmap looks too complicated. (I myself use a patchwork of strange and crazy keymays -- not something to be emulated! You may go about in a clean manner though.)

† For the difference between ISO_Level3_Shift, ISO_Level3_Latch and ISO_Level3_Lock, see another post.
http://www.linuxquestions.org/questi...19#post4971719

druuna 06-15-2013 03:03 AM

Thread is marked as being [SOLVED], seems to be informational and no question is asked.

Taken off the zero-reply list.


All times are GMT -5. The time now is 02:33 PM.