Hi,

I am a new user of the DirectFB library.

I am going to use directvnc which does not seem to handle Unicode
input very well (Latin1 only as the sources suggest, and I need at
least Cyrillic). Xvnc (from TightVNC) is expected at another end.

So, before I start making improvements to directvnc, I need to clarify
what to expect from the keyboard when going beyond ASCII and Latin1.

As the on-site DirectFB documentation says: the DFBInputEvent
structure contains the key_symbol entry which is "advanced mapping,
unicode compatible, modifier dependent ".

The documentation for DFBInputDeviceKeySymbol (type of key_symbol)
lists various DIKS_* constants whose names bear no relationship to the
full Unicode range, rather some Latin1 stuff like diacritics plus
special values probably for handhelds.

Also, there is the DFBInputDeviceModifierMask member, and
DFBInputDeviceLockState member. These are more or less clear (except
that the hyperlink for the first member description does not open any
web page when clicked).

Now, assume I have a Linux console setup with loadkeys --unicode. This
mode would assign a keyboard switch at the console level: if cyrillic
mode is on, the keyboard driver is expected to emit Unicode (UTF)
sequences. In this case, where would I expect the Unicode value of
input character be: in DFBInputEvent->key_symbol, or anywhere else?

Another way would be to leave the console alone, and use the
locks/modifiers mask as provided by the DFBInputEvent; then a method
similar to xmodmap might be implemented in directvnc itself, as it
seems all that needed is to send correct keysym.

Or, is there any way to configure DirectFB (in a xmodmap/xkb manner)
so that IDirectFBInputDevice->GetKeymapEntry would return proper
Unicode values in DFBInputDeviceKeymapEntry->symbols array? This would
give a consistent way to configure keyboard input for any DirectFB
application, but is this needed in general anyway? Then I'd need to
make changes to both DirectFB and directvnc though.

Thanks  for any ideas.

PS Hmm, so far I see in src/core/input.h

1589 static DFBInputDeviceKeySymbol
1590 id_to_symbol( DFBInputDeviceKeyIdentifier id,
1591               DFBInputDeviceModifierMask  modifiers,
1592               DFBInputDeviceLockState     locks )
1593 {
1594      bool shift = (modifiers & DIMM_SHIFT) || (locks & DILS_CAPS);
1595
1596      if (id >= DIKI_A && id <= DIKI_Z)
1597           return (shift ? DIKS_CAPITAL_A : DIKS_SMALL_A) + id - DIKI_A;

and nothing beyond the Latin range.


-- 
Dimitry Golubovsky

Anywhere on the Web

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to