From 37e2da3332de942dfb728e7ee8f50cd31c9a2676 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 27 Dec 2012 14:01:59 +0000 Subject: Add support for key release events git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5464 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/Documentation/NuttxPortingGuide.html | 138 +++++++++++++++++++++++------ 1 file changed, 109 insertions(+), 29 deletions(-) (limited to 'nuttx/Documentation/NuttxPortingGuide.html') diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index ebb3eff4b..e626bf7a5 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -3623,20 +3623,27 @@ extern void up_ledoff(int led);

6.3.16 Keyboard/Keypad Drivers

- "Out-of-Band" Commands. - Keyboards and keypads are the same device for NuttX. + Keypads vs. Keyboards + Keyboards and keypads are really the same devices for NuttX. A keypad is thought of as simply a keyboard with fewer keys. +

+

+ Special Commands. In NuttX, a keyboard/keypad driver is simply a character driver that may have an (optional) encoding/decoding layer on the data returned by the character driver. - A keyboard may return simple text data (alphabetic, numeric, and punctuaction) or control characters (enter, control-C, etc.). - We can think about this the normal "in-band" keyboard data stream. - However, in addition, most keyboards support actions that cannot be represented as text data. + A keyboard may return simple text data (alphabetic, numeric, and punctuaction) or control characters (enter, control-C, etc.) when a key is pressed. + We can think about this the "normal" keyboard data stream. + However, in addition, most keyboards support actions that cannot be represented as text or control data. Such actions include things like cursor controls (home, up arrow, page down, etc.), editing functions (insert, delete, etc.), volume controls, (mute, volume up, etc.) and other special functions. - We can think about this as special, "out-of-band" keyboard commands. - In this case, some special encoding may be required to multiplex the in-band text data and out-of-band command streams. + In this case, some special encoding may be required to multiplex the normal text data and special command key press data streams. +

+

+ Key Press and Release Events + Sometimes the time that a key is released is needed by applications as well. + Thus, in addition to normal and special key press events, it may also be necessary to encode normal and special key release events.

Encoding/Decoding Layer. - An optional encoding/decoding layer can be used with the basic character driver to encode the out-of-band commands into the text data stream. + An optional encoding/decoding layer can be used with the basic character driver to encode the keyboard events into the text data stream. The function interfaces that comprise that encoding/decoding layer are defined in the header file include/nuttx/input/kbd_code.h. These functions provide an matched set of (a) driver encoding interfaces, and (b) application decoding interfaces.

@@ -3644,21 +3651,23 @@ extern void up_ledoff(int led);
  • Driver Encoding Interfaces. + These are interfaces used by the keyboard/keypad driver to encode keyboard events and data.