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

Stephane SOPPERA stephane.soppera at wanadoo.fr
Fri Sep 9 19:20:05 CEST 2005


Does the text editor still works correctly? When you it the '_' key, 
does it still write a '_' or does it write a '8'?
Same thing for '(' or ')'.

Stephane

fab wrote:

>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);
>>    
>>
>_______________________________________________
>Bf-committers mailing list
>Bf-committers at projects.blender.org
>http://projects.blender.org/mailman/listinfo/bf-committers
>
>
>  
>




More information about the Bf-committers mailing list