keyboard state

From: Kamil Toman (
Date: Wed Sep 26 2001 - 03:26:11 EST


        we need to backport 'cz' X layout to linux console. The actual
layout map can be seen at:
There is a problem that linux kernel is able to recognize only:
- key itself
- SHITed key

but we need (obvious from the URLed picture) at least
- key itself
- SHIFTed key
- key when CAPSLOCK is on
- SHIFTed key while CAPSLOCK is on

This could be for examle solved with a slight modification of keyboard.c. The
KD_SHIFT constant might be changed to a variable like this:

 sed -e 's/key_map = key_maps\[shift_final ^ (1<<KG_SHIFT)\];$/key_map = \
 key_maps[shift_final ^ (1<<caps_eval)];/' \
 drivers/char/keyboard.c> \

i.e. replace KG_SHIFT with caps_eval which might be one of:
        #define KG_SHIFT 0
        #define KG_CTRL 2
        #define KG_ALT 3
        #define KG_ALTGR 1
        #define KG_SHIFTL 4
        #define KG_SHIFTR 5
        #define KG_CTRLL 6
        #define KG_CTRLR 7
from include/linux/keyboard.h and then the rest of keyboard handling would
have to be changed to operate caps_eval accorddingly.

Maybe this is not best way how to do it. I'm open to anything else. Another
thing is that console-tools or kbd (which one is used today??) would have
to be changed to handle this new behaviour.

Thanks for any opinions,
Kamil Toman
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:00:41 EST