Resend not to make this mail scrubbed. Sorry. :)

------- Original Message -------
Sender : 박성진<sj76.p...@samsung.com> S5(책임)/책임/Common Platform Lab(S/W센터)/삼성전자
Date : 2015-06-01 20:22 (GMT+09:00)
Title : Re: Re: [libxkbcommon] Question about how to get xkb_keycode_t from 
xkb_keysym_t.

Dear Daniel, thanks for your quick answer. :)
In theory, one or more keysym can be mapped to each corresponding keycode
therefore we need to look through the keymap to find them out. I agree with you 
on that. :)

Actually, we'd like to provide a key grab protocol to wayland client(s)
with which each client can make request to grab a key to wayland compositor.
To use the protocol, we need to provide one or more keycodes associated with a 
given keysym to the compositor as an argument.
At this moment we would like to call the following API to get keycode(s) from a 
keysym if exist.
Could you share your opinion ?

/**
 @param[in] keymap : xkb_keymap pointer
 @param[in] keysym : xkb_keysym_t keysym
 @param[out] keycodes array : xkb_keycode_t pointer
 @return number of keycodes found on success, otherwise -1
*/
XKB_EXPORT int xkb_keycodes_from_keysym(struct xkb_keymap *keymap, xkb_keysym_t 
keysym, xkb_keycode_t *keycodes);
or XKB_EXPORT int xkb_keymap_keycodes_from_keysym(struct xkb_keymap *keymap, 
xkb_keysym_t keysym, xkb_keycode_t *keycodes);

Thanks and regards,
Sung-Jin Park

------- Original Message -------
Sender : Daniel Stone<dan...@fooishbar.org>
Date : 2015-06-01 18:57 (GMT+09:00)
Title : Re: [libxkbcommon] Question about how to get xkb_keycode_t from 
xkb_keysym_t.

Hi Sung-Jin, 


On 1 June 2015 at 07:16, Sung-Jin Park <sj76.p...@samsung.com> wrote:

I'd like to ask how to get keycode(s) from keysym using libxkbcommon API.

Is there any API in libxkbcommon ?


The short answer is, no.


The long answer is, look through the keymap and find every keycode which 
produces that keysym, which may be on various layouts (groups) or shift levels.


If you can share more details of what you actually want to achieve, that might 
be helpful.


Cheers,
Daniel 
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to