Re: [AD] xkeymap fix

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> No idea, I just noticed that xkeymap somehow treats the keys >=
> KEY_MODIFIERS differently.

Yes, and xkeymap is not alone:

[eric@xxxxxxxxxx allegro]$ grep -r "KEY_MODIFIERS" .
./include/allegro/keyboard.h:#define KEY_MODIFIERS         103
./src/linux/lkeybd.c:static unsigned short modifier_table[KEY_MAX - 
KEY_MODIFIERS] =
./src/linux/lkeybd.c:                if (mycode >= KEY_MODIFIERS) {
./src/linux/lkeybd.c:                        int flag = modifier_table[mycode 
- KEY_MODIFIERS];
./src/misc/pckeys.c:static unsigned short modifier_table[KEY_MAX - 
KEY_MODIFIERS] =
./src/misc/pckeys.c:   if (mycode >= KEY_MODIFIERS)
./src/misc/pckeys.c:      flag = modifier_table[mycode - KEY_MODIFIERS];
./tools/x11/xkeymap.c:   if (k < KEY_MODIFIERS)

so it appears that I should have been more careful before accepting Angelo's 
patch.


I think we need to put the new keys before KEY_MODIFIERS and shift the 
modifiers. Hopefully this will not require us to make changes incompatible 
with the current situation.

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/