[Bf-committers] Better support for azerty (french) keyboards

fab fab at gnux.info
Fri Sep 9 12:19:33 CEST 2005


Hi!
Don't know if I did it the right way, but with this patch I can access
the layers keybinds and now the all rotation/scaling pivot keybinds are
ok too :)
I hope I didn't break anything, here is the patch against cvs:

Index: source/blender/src/ghostwinlay.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/ghostwinlay.c,v
retrieving revision 1.40
diff -r1.40 ghostwinlay.c
206c206,222
< static int convert_key(GHOST_TKey key) {
---
> static int convert_key(GHOST_TKey key, char ascii_code) {
>       char numbers[]="à&é\"'(-è_ç)=\0";
>       int i;
>       for(i=0;numbers[i];++i) {
>               if(ascii_code == numbers[i])
>                       return ZEROKEY+i;
>       }
>       /* ';' isn't period, but it's the same key, needed for french kbd */
>       if (ascii_code == ';'|| ascii_code == '.') {
>               return PERIODKEY;
>       }
>       if (ascii_code == ',') {
>               return COMMAKEY;
>       }
>       if (ascii_code == '²') {
>               return ACCENTGRAVEKEY;
>       }
562c578
<                       int bkey= convert_key(kd->key);
---
>                       int bkey= convert_key(kd->key,kd->ascii);


Regards.
Fabien Devaux.


More information about the Bf-committers mailing list