Xmodmap clear command

It's hard for me to understand the xmodmap clear command, here is an example :

    keycode 66 = Control_L
    clear Lock
    add Control = Control_L
    keycode 117 = Caps_Lock
    add Lock = Caps_Lock
  • Control_L is already mapped to 66, why add a control to line 3?
  • Why do I need to clear Lock when I actually add Control?
  • Why not clear Lock before I add Caps_Lock?

This is really puzzling.

+5
source share
1 answer

The important thing in xmodmap is to distinguish between key codes (raw numbers from the keyboard), keysyms (which means keys in the end) and modifier flags, which are the flags on the keys (not the keys), say "this is the thing that I said the shift key should change the other keys as the toggle key "

""

keycode (keycode)66 = (keysym)Control_L
clear (modifier)Lock
add (modifier)Control = (keysym)Control_L
keycode (keycode)117 = (keysym)Caps_Lock
add (modifier)Lock = (keysym)Caps_Lock

, :

keycode 66 = Control_L
  - ( )

clear Lock
, Lock ( -, 66, , )

add Control = Control_L
, Control_L (, 66 )

keycode 117 = Caps_Lock 117, ( , 117, .)

add Lock = Caps_Lock Lock Caps_Lock keysym 117.

:

1. Control_L has already been mapped to 66, why is it necessary to add Control in line 3?

, keyym, - . ( , )

2. Why do have to clear Lock when am actually adding Control?

, 66, - Lock, . , .

3. Why not clear Lock before am actually adding Caps_Lock?

, , Lock , , keysyms.


xmodmap , , :

-, , .

+7

All Articles