change MtxOrb kyboard mapping code to use KeyMap_<X>=<name>

This commit is contained in:
marschap
2006-10-06 18:35:01 +00:00
parent 112f7ccf0f
commit 9608cf6d6f
3 changed files with 55 additions and 12 deletions
+9 -8
View File
@@ -643,14 +643,15 @@ Speed=19200
# Set the display type [default: lcd; legal: lcd, lkd, vfd, vkd]
Type=lkd
# The following table translate from MtxOrb Key to Logical Key.
# See [menu] section for an explanation of the key mappings
LeftKey=A
RightKey=B
EnterKey=C
UpKey=D
DownKey=E
EscapeKey=F
# The following table translates from MtxOrb key letters to logical key namess.
# By default no keys are mapped, meaning the keypad is not used at all.
#KeyMap_A=Left
#KeyMap_B=Right
#KeyMap_C=Up
#KeyMap_D=Down
#KeyMap_E=Enter
#KeyMap_F=Escape
# See the [menu] section for an explanation of the key mappings
# You can find out which key of your display sends which
# character by setting keypad_test_mode to yes and running
+42 -1
View File
@@ -1,5 +1,5 @@
<sect1 id="MtxOrb">
<title>The Matrix Orbital Driver (MtxOrb)</title>
<title>The MtxOrb Driver</title>
<para>
This section covers the installation process for the Matrix Orbital LCD
@@ -209,6 +209,8 @@
</sect4>
</sect3>
</sect2>
<!-- This is already covered in bookinfo.docbook
<sect2 id="MtxOrb-copy">
<title>Copyright</title>
@@ -220,6 +222,7 @@ This section was originally part of the lcdproc.sgml file by William W. Ferrell
Slightly modified in order to include it in this document March 2002, Rene Wagner <email>reenoo@gmx.de</email>
</para>
</sect2>
-->
<!-- ## Matrix Orbital driver ## -->
<sect2 id="MtxOrb-config">
@@ -328,6 +331,43 @@ Slightly modified in order to include it in this document March 2002, Rene Wagne
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>KeyMap_<replaceable>LETTER</replaceable>=</command>
<arg choice="plain"><replaceable>KEY</replaceable></arg>
</term>
<listitem>
<para>
Matrix Orbital displays support keypads with up to 25 keys, which return
one of the letters <literal>A</literal> - <literal>Y</literal> for each
pressed key.
</para>
<para>
These settings allow to map the letter <replaceable>LETTER</replaceable>,
that is generated by the display when a key is pressed, to be mapped to
a key name <replaceable>KEY</replaceable> that <command>LCDd</command>
can understand (see <link linkend="menu-section" endterm="menu-section.title"/>
for more information).
</para>
<para>
There is no default key mapping; if no keys are mapped in the
<filename>LCDd.conf</filename> config file, the display is treated
as if it had no keys attached.
</para>
<example id="MtxOrb-config-keymap-example">
<programlisting>
KeyMap_A=Left
KeyMap_B=Right
KeyMap_C=Up
KeyMap_D=Down
KeyMap_E=Enter
KeyMap_F=Escape
</programlisting>
</example>
</listitem>
</varlistentry>
<!--
<varlistentry>
<term>
<command>LeftKey=</command>
@@ -361,6 +401,7 @@ Slightly modified in order to include it in this document March 2002, Rene Wagne
<literal>A</literal> - <literal>F</literal>.
</para></listitem>
</varlistentry>
-->
<varlistentry>
<term>
+4 -3
View File
@@ -57,9 +57,10 @@
#include "report.h"
// Uncomment to test new key mapping code
//#define MTXORB_NEW_KEYMAP
// Also don't forget to define key mappings in LCDd.conf: KeyMap_A=Enter, ...
// Use the new key mapping code
#define MTXORB_NEW_KEYMAP
// Don't forget to define key mappings in LCDd.conf: KeyMap_A=Enter, ...
// otherwise you will not get your keypad working.
#ifdef MTXORB_NEW_KEYMAP
/* MO displays allow 25 keys that map by default to 'A' - 'Y' */