Skip to content

Commit

Permalink
Input: convert keyboard notifier docs into ReST format
Browse files Browse the repository at this point in the history
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: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
mchehab authored and dtor committed Apr 5, 2017
1 parent eba31a3 commit 2f43893
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Documentation/input/notifier.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
=================
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
Expand All @@ -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)
Expand All @@ -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.

0 comments on commit 2f43893

Please sign in to comment.