提交 2f438935 编写于 作者: M Mauro Carvalho Chehab 提交者: Dmitry Torokhov

Input: convert keyboard notifier docs into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 eba31a3a
=================
Keyboard notifier
=================
One can use register_keyboard_notifier to get called back on keyboard
events (see kbd_keycode() function for details). The passed structure is
......@@ -23,9 +25,9 @@ For each kind of event but the last, the callback may return NOTIFY_STOP in
order to "eat" the event: the notify loop is stopped and the keyboard event is
dropped.
In a rough C snippet, we have:
In a rough C snippet, we have::
kbd_keycode(keycode) {
kbd_keycode(keycode) {
...
params.value = keycode;
if (notifier_call_chain(KBD_KEYCODE,&params) == NOTIFY_STOP)
......@@ -47,6 +49,6 @@ kbd_keycode(keycode) {
return;
apply keysym;
notifier_call_chain(KBD_POST_KEYSYM,&params);
}
}
NOTE: This notifier is usually called from interrupt context.
.. note:: This notifier is usually called from interrupt context.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册