Thanks Niels for explaining this clearly. I was successfully able to map one
key using SetKeymapEntry. Since calling this for all keys would be
cumbersome I tried LoadKeymap with a keymap file. However I'm not clear on
the syntax of keymap file yet.

The header file directfb.h says it should be of the format
keycode <hw code> = <key id> = <symbol> .... (up to 4 symbols)

I tried one entry giving:
keycode 0x1e = A = A

But it seems to not working. When I look closely by putting prints in
LoadKeymap function, I found that its not calling SetKeymapEntry at all but
returning to start of while loop after the check for capslock: , :capslock
......

Where am I going wrong? Can you please give an example of one keymap entry
so that it would be helpful for me?


Thanks & Regards,
Harinandan S


On Thu, Dec 18, 2008 at 8:26 PM, Niels Roest <ni...@directfb.org> wrote:

> DirectFB distinguishes the following states:
>
> keycode - this is just a number corresponding to a physical key. My
> keyboard outputs numbers from 0 to 127.
> identifier - this is an ID corresponding to the physical letter written on
> the key. So with this you distinguish QWERTY from AZERTY, e.g.
> symbol - this is the key shown on the screen. It comes in 4 flavours: no
> modifiers pressed, SHIFT, AltGR, and SHIFT+AltGR.
> in the end, you can specify 7 values for each key: code, id, 4 symbols and
> lock state.
> lock state modifies the modifiers :) e.g. if you have CapsLock on and press
> SHIFT on the letter "A" you want "a" and not "A" to show, for this you
> enable the CapsLock lock state on the keycode corresponding to the A.
>
> hth
> Niels
>
> Harinandan S wrote:
>
>> Hi All,
>>  I had not connected my keyboard so it was crashing. I connected it and
>> GetInputDevice didnt crash. I want to know whether this keymap is a standard
>> keymap format? Since when I compared one keymap from vim with this, the
>> format was different.
>>  I also didnt understand what the locks state mean? Also there are four
>> symbols to be defined when normal, shift, alt, alt+shift is pressed. Also
>> there is an identifier. What is the symbol which actually gets displayed -
>> Is it identifier or corresponding symbol?
>>
>> Regards,
>> Harinandan S
>>
>>
>> On Wed, Dec 17, 2008 at 5:26 PM, Harinandan S <harinand...@gmail.com<mailto:
>> harinand...@gmail.com>> wrote:
>>
>>    Hi All,
>>        Thanks Niels. I took the patch and used DirectFB 1.3.0. I called
>>    SetKeymapEntry for one key to check how it works. But gtk is
>>    crashing. I had earlier commented out this part of code :
>>        directfb->GetInputDevice (directfb, DIDID_KEYBOARD, &keyboard);
>>        since i didnt have keyboard and it was crashing. Now I removed the
>>    comment and it has started to crash? Why is this GetInputDevice
>>    crashing? Does it try to access keyboard when this is called?        My
>> keyboard comes up as /dev/event0 in my system.
>>
>>    Regards,
>>    Harinandan S
>>
>>
>>    On Tue, Dec 16, 2008 at 8:43 PM, Niels Roest <ni...@directfb.org
>>    <mailto:ni...@directfb.org>> wrote:
>>
>>        You are using devmem together with linux_input.
>>        This does not support getting the keymap.
>>        If you want to make it work you have to enter the keymap
>>        manually, this is part of a recent patch:
>>
>> http://git.directfb.org/?p=core/DirectFB.git;a=commit;h=f7bf438159e3da4c733d98c1a0e47eee11f50795
>>
>>        so
>>        (1) take the patch, or take the newest sources
>>        (2) use IDirectFBInputDevice->SetKeymap for each key or
>>        LoadKeymap for all keys with a file provided.
>>        directfb.h contains a small documentation comment about the
>>        file format.
>>
>>        hth
>>        Niels
>>
>>        Harinandan S wrote:
>>
>>            Hi All,
>>             I am using DirectFB 1.1.1 with devmem, davinci gfx driver
>>            and linux input. I have got mouse to work but unable to
>>            get keyboard to work. I have removed the code to get
>>            keymap since GTK was crashing. What is keymap and how to
>>            get it?
>>             What needs to be done to get USB keyboard to work in this
>>            configuration?
>>
>>            Regards,
>>            Harinandan S
>>
>>  ------------------------------------------------------------------------
>>
>>            _______________________________________________
>>            directfb-users mailing list
>>            directfb-users@directfb.org
>>            <mailto:directfb-users@directfb.org>
>>
>> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
>>
>>
>>
>>        --
>>        .------------------------------------------.
>>        | DirectFB - Hardware accelerated graphics |
>>        | http://www.directfb.org/                 |
>>        "------------------------------------------"
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> directfb-users mailing list
>> directfb-users@directfb.org
>> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
>>
>>
>
>
> --
>
> .------------------------------------------.
> | DirectFB - Hardware accelerated graphics |
> | http://www.directfb.org/                 |
> "------------------------------------------"
>
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to