[Bf-committers] Better support for azerty (french) keyboards
fab
fab at gnux.info
Fri Sep 9 12:29:37 CEST 2005
Ouuups, forget my previous patch, this one is slightly better:
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,228
< 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 MINUSKEY;
> }
> if (ascii_code == '=') {
> return EQUALKEY;
> }
> if (ascii_code == '²') {
> return ACCENTGRAVEKEY;
> }
562c584
< int bkey= convert_key(kd->key);
---
> int bkey= convert_key(kd->key,kd->ascii);
More information about the Bf-committers
mailing list