[Bf-taskforce25] Dead Keys mapping

Ton Roosendaal ton at blender.org
Thu Feb 19 12:49:34 CET 2009


Hi,

There's two levels of event handling in Blender now. We still rely on a 
proper functioning of the Ghost library, to evaluate all input on OS or 
Windowmanager level. That info is passed on to Blender's event 
handling, which already has space reserved to store utf encoded 
characters.

Preventing rawkey hotkeys to be handled is a matter of proper layout of 
the Blender internal "keymaps". Each has its own priority level, so 
when you encounter conflicts it's a mere matter of disabling these keys 
or remapping them.

There's also a function in our event system that checks events for 
matching a "text input handler", which can be further refined to match 
all cases well.

Needless to say; we'd need help in this area to test and validate it 
all, preferably a very experienced coder. :)

-Ton-

------------------------------------------------------------------------
Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands

On 19 Feb, 2009, at 11:57, Nathan Letwory wrote:

> I tested deadkeys on Windows with my keylayout (dvorak-derivative for
> Finnish language), and some of the keys are being properly
> interpreted. (like î and é and the likes). The problem you'll probably
> run against is that using deadkeys (altgr combos) might also trigger
> hotkey functions. For instance, to write a ¨ (trema), I press altgr +
> t, but that triggers the draw timing bit, so writing ë becomes
> impossible anyway. Depending on your keylayout other deadkey combos
> may be impossible with the 2.4x codebase.
>
> Anyway, if a proper deadkey handling code could be developed for text
> inputs in Blender 2.5. that'd be great.
>
> /Nathan
>
> 2009/2/19 Sven von Brand <svbrand at alumnos.inf.utfsm.cl>:
>> joe wrote:
>>> I believe bdiego and elubie have worked on this sort of stuff in the
>>> past.  I've had a little experience with input schemes like this at
>>> work, and it is a pain, especially since blender's support of utf-8
>>> isn't all that great.
>>>
>>> Anyway, google search found a page that mentioned this function:
>>>
>>> http://www.x.org/archive/X11R6.8.1/doc/XmbLookupString.3.html
>>>
>>> which is supposed to handle that sort of stuff for you.  since we use
>>> utf8 strings, you'd want to use the Xutf8LookupString  version of it.
>>>
>>> The low-level X event handling stuff is in intern/ghost, specifically
>>> intern/ghost/GHOST_SystemX11.c.  From what I gather, you have to
>>> replace usage of XLookupString with Xutf8LookupString  in some 
>>> manner.
>>
>> reading a bit, XlookupString does support the kind of characters I 
>> want,
>> I believe the problem is how it is handled, there are variables to
>> change the keyboard layout but from what I see I think there's is code
>> to be written in order for dead keys to work, I'll start investigating
>> and will inform if I manage to get something done.
>>
>>> original article I found (may be outdated, who knows):
>>> http://gwyn.tux.org/~balsa/linux/deadkeys/index.html
>>>
>>> Anyway, hope this helps.
>>
>> Thanks, it did help and it is outdated :)
>>
>>> Joe
>>>
>>
>>
>> --
>> Sven von Brand Laredo
>> Estudiante de Ing. Civil Informatica, UTFSM
>> Fedora Ambassador for Chile
>> _______________________________________________
>> Bf-taskforce25 mailing list
>> Bf-taskforce25 at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>>
>>
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>



More information about the Bf-taskforce25 mailing list