From: Ran Benita Date: Mon, 22 Sep 2014 08:44:51 +0000 (+0300) Subject: x11, doc: add note about Key{Press,Release}->state field X-Git-Tag: xkbcommon-0.5.0~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f088d23f1e48ef8c9ae473c9106d1675d78a35e5;p=platform%2Fupstream%2Flibxkbcommon.git x11, doc: add note about Key{Press,Release}->state field Signed-off-by: Ran Benita --- diff --git a/xkbcommon/xkbcommon-x11.h b/xkbcommon/xkbcommon-x11.h index 5b14b66..0158315 100644 --- a/xkbcommon/xkbcommon-x11.h +++ b/xkbcommon/xkbcommon-x11.h @@ -93,13 +93,19 @@ extern "C" { * 8. When StateNotify is received, update the xkb_state accordingly * using the xkb_state_update_mask() function. * + * @note It is also possible to use the KeyPress/KeyRelease @p state + * field to find the effective modifier and layout state, instead of + * using XkbStateNotify: \n + * http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Computing_A_State_Field_from_an_XKB_State + * \n However, XkbStateNotify is more accurate. + * + * @note There is no need to call xkb_state_update_key(); the state is + * already synchronized. + * * Finally, when a key event is received, you can use ordinary xkbcommon * functions, like xkb_state_key_get_one_sym() and xkb_state_key_get_utf8(), * as you normally would. * - * Note: There is no need to call xkb_state_update_key(); the state is - * already synchronized. - * * @endparblock */