Sophie

Sophie

distrib > * > 2009.0 > i586 > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 2408

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /home/gvatteka/dev/qt-4.3/doc/src/emb-charinput.qdoc -->
<head>
  <title>Qtopia Core Character Input</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1 align="center">Qtopia Core Character Input<br /><small></small></h1>
<p>When running a Qtopia Core</tt> application, it either runs as a server or connects to an existing server. The keyboard driver is loaded by the server application when it starts running, using Qt's <a href="plugins-howto.html">plugin system</tt></a>.</p>
<p>Internally in the client/server protocol, all system generated events, including key events, are passed to the server application which then propagates the event to the appropiate client. Note that key events do not always come from a keyboard device, they can can also be generated by the server process using input widgets.</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Input Widgets</th></tr></thead>
<tr valign="top" class="odd"><td>The server process may call the static QWSServer::sendKeyEvent() function at any time. Typically, this is done by popping up a widget that enables the user specify characters with the pointer device.<p>Note that the key input widget should not take focus since the server would then just send the key events back to the input widget. One way to make sure that the input widget never takes focus is to set the Qt::Tool widget flag in the <a href="gui/QWidget.html"><tt>QWidget</tt></a> constructor.</p>
<p>The Qtopia</tt> environment contains various input widgets such as Handwriting Recognition and Virtual Keyboard.</p>
</td></tr>
</table></p>
<ul><li><a href="#available-keyboard-drivers">Available Keyboard Drivers</a></li>
<li><a href="#specifying-a-keyboard-driver">Specifying a Keyboard Driver</a></li>
</ul>
<a name="available-keyboard-drivers"></a>
<h2>Available Keyboard Drivers</h2>
<p>Qtopia Core</tt> provides ready-made drivers for the SL5000, Yopy, Vr41XX, console (TTY) and USB protocols. Run the <tt>configure</tt> script to list the available drivers:</p>
<pre>    ./configure -help</pre>
<p>Note that the console keyboard driver also handles console switching (<b>Ctrl+Alt+F1</b>, ..&#x2e;, <b>Ctrl+Alt+F10</b>) and termination (<b>Ctrl+Alt+Backspace</b>).</p>
<p>In the default Qt configuration, only the &quot;TTY&quot; driver is enabled. The various drivers can be enabled and disabled using the <tt>configure</tt> script. For example:</p>
<pre>    configure -qt-kbd-s15000</pre>
<p>Custom keyboard drivers can be implemented by subclassing the QWSKeyboardHandler class and creating a keyboard driver plugin (derived from the QKbdDriverPlugin class). Qtopia Core</tt>'s implementation of the QKbdDriverFactory class will automatically detect the plugin, loading the driver into the server application at runtime.</p>
<a name="specifying-a-keyboard-driver"></a>
<h2>Specifying a Keyboard Driver</h2>
<p>To specify which driver to use, set the <a href="qtopiacore-envvars.html#qws-keyboard"><tt>QWS_KEYBOARD</tt></a> environment variable. For example (if the current shell is bash, ksh, zsh or sh):</p>
<pre>     export QWS_KEYBOARD=&lt;driver&gt;[:&lt;driver specific options&gt;]</pre>
<p>The <tt>&lt;driver&gt;</tt> argument are <tt>SL5000</tt>, <tt>Yopy</tt>, <tt>VR41xx</tt>, <tt>TTY</tt>, <tt>USB</tt> and keys</tt> identifying custom drivers, and the driver specific options are typically a device, e.g&#x2e;, <tt>/dev/tty0</tt>.</p>
<p>Multiple keyboard drivers can be specified in one go:</p>
<pre>     export QWS_KEYBOARD=&quot;&lt;driver&gt;[:&lt;driver specific options&gt;]
             &lt;driver&gt;[:&lt;driver specific options&gt;]
             &lt;driver&gt;[:&lt;driver specific options&gt;]&quot;</pre>
<p>Input will be read from all specified drivers.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2007 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt Jambi </div></td>
</tr></table></div></address></body>
</html>