📄 devices.html
字号:
</h4><a name="4-4-1"></a><p> Some keys are always intercepted before they reach an application. If a pointer device isavailable an application can do a keyboard grab to get these keys.<p> <ul><li>Key_F30</li><li>Key_F31</li><li>Key_F32</li><li>Key_F33</li><li>Key_F34</li><li>Key_F35</li><li>Key_NumLock</li><li>Key_CapsLock</li><li>Key_Menu</li><li>Key_Call</li><li>Key_Hangup</li></ul><p> <h4> Keys that are sometimes intercepted</h4><a name="4-4-2"></a><p> <ul><li><em>Key_Escape</em> Rejects active dialog</li><li><em>Key_F33</em> Accepts active dialog</li><li><em>Key_Back</em> Accepts active dialog</li><li><em>Key_Context1</em> When behaving as Key_Menu</li></ul><p> While the screen lock is active (sim card pin required for example) the applications will only be allowed keys such as Key_Back and Key_No. This is to reduce the chance of anyone accessing the phone's data while the sim-card pin is still required.<p> <h2> Configuration of Hardware Buttons</h2><a name="5"></a><p> The configuration of hardware buttons for a device is definedby the etc/defaultbuttons-<platform-spec>.conf files.<p> The file is divided into sections.<p> See the existing files, especially the generic file, for guidance.<p> <h4> User Defineable Button Mappings</h4><a name="5-1"></a><p> The format of the button-mapping section of the file is as follows:<p> <pre>[Button]Count=<number of button records below>[Button<button number counting from 0>]Name=<name of the button (in english)>Name[ja]=<japanese translations of the button name>Name[<lang>]=<other lang translations of the button name etc>Key=<associated key code emitted by the button eg. F9>PressedActionService=<name of default service associated with press>PressedActionMessage=<message to send to service (refer to services for details)>HeldActionService=<name of default service associated with press>HeldActionMessage=<message to send to service (refer to services for details)></pre> <p> An example of what this may look like in a real example is:<p> <pre>[Button]Count=2[Button0]Name=Calendar ButtonName[ja]=???Key=F9PressedActionService=CalendarPressedActionMessage=raiseToday()HeldActionService=CalendarHeldActionMessage=raise()[Button1]Name=Contacts ButtonName[ja]=???Key=F10PressedActionService=ContactsPressedActionMessage=raise()HeldActionService=ContactsHeldActionMessage=beamBusinessCard()</pre> <p> Images of the buttons, which should correspondto the appearance of the device hardware, are in pics/Button/<i>n</i>.png, with<i>n</i> corresponding to the button number in the configuration file.<p> <h3> Phone Launcher Menu</h3><a name="5-2"></a><p> The launcher menu on a phone is often a 3 by 4 grid, correspondingto the positioning of the keys 1 to 9, *, 0, and #.<p> The format of the launcher menu section of the file is as follows:<p> <pre>[Menu]Rows=<rows of icons>Columns=<columns of icons>Map=<one character for each icon, left to right, top to bottom>Default=<character of initially focussed icon><character>=<desktop file or directory>... for each character in Map.</pre> <p> An example of what this may look like in a real example is:<p> <pre>[Menu]Rows=3Columns=3Map=123456789Default=51=2=Applications/datebook.desktop3=Games4=5=Applications/addressbook.desktop6=Settings7=8=Applications9=Documents</pre> <p> <h3> Phone Buttons</h3><a name="5-3"></a><p> The dialing and other buttons of a phone are configured by the "SystemButtons","TextButtons", "PhoneTextButtons", and "LocaleTextButtons" sectionsof the defaultbuttons.conf file.<p> The format of the SystemButtons section of the file is as follows:<p> <pre>[SystemButtons]Count=nKey0=Name of Qt key code, e.g. Menu, Select, Context1... for each system button on the device 0 to n</pre> <p> An example of what this may look like in a real example is:<p> <pre>[SystemButtons]Count=5Key0=MenuKey1=SelectKey2=BackKey3=CallKey4=Hangup</pre> <p> The TextButtons section defines all text and actionsassociated with each button. Forexample, the "2" key is associated with "2", as well as the letters"a", "b", "c", and all variants of those letters.<p> The LocaleTextButtons section is like the TextButtons section, except itonly defines the text associated with the current language. The texts inthese sections are translated in the standard way for <a href="config.html">Config</a> files.<p> The PhoneTextButtons section defines all phone number text and actionsassociated with each button.For example, the "*" key might choose between any of the characters "*", "+", and "p"(for pause).<p> The format of the TextButtons, PhoneTextButtons, and LocaleTextButtonssections of the file are similar, as follows:<p> <pre>[TextButtons]Buttons=0123456789*#Tap0= ...Hold0= ......</pre> <p> For each button listed in "Buttons", define:<p> <ul><li> Tap<em>X</em> - the action to do when key <em>X</em> is pressed and released.This is either:<ul><li> '<em>text</em> - insert character from <em>text</em>.<li> "<em>text</em> - insert character from <em>text</em>, while showing all options.<li> space - insert a space.<li> symbol - popup symbol selector.<li> modify - choose between alternatives.<li> mode - change mode or language.<li> shift - toggle upper/lowercase.</ul><li> Hold<em>X</em> - the action to do when key <em>X</em> is held down. This is thesame as for Tap, except "<em>text</em> is not supported.</ul><p> Character insertions where the first character is punctuation are treated specially.The details of the special treatment are internal.<p> <h3> Phone SoftKey Positioning</h3><a name="5-4"></a><p> The format of the soft-key positioning section of the file is as follows:<p> <pre>[SoftKeys]Count=nKey0=Name of Qt key code, e.g. Menu, Select, Context1Indent0=Left or Right indent of softkey labelAlign0=Alignment of softkey label (1=Left, 2=Right, 4=HCenter, 8=Top, 16=Bottom 32=VCenter)... for each soft key 0 to n</pre> <p> An example of what this may look like in a real example is:<p> <pre>[SoftKeys]Key0=MenuIndent0=4Align0=33Key1=SelectIndent1=0Align1=36Key2=BackIndent2=4Align2=34</pre> <p> <h2> Non-installed Components</h2><a name="6"></a><p> There are a number of applications/features supplied with Qtopia that arenot intended to be shipped with production devices:<p> <ul><li> Rotation Setting - This is provided to test and demonstrate Qtopia's abilityto display in different orientations. This may be helpful during developmentif the device uses the transformation display driver.<li> Shutdown Setting - This is provided as a development tool. It shouldnot be necessary on a production device. It can be removed by deletingapps/Settings/quit.desktop, on most devices it is expected that there isa physical power button, therefore the user is not expected to ever manuallyrun or shutdown Qtopia.<li> screensize applet - allows changing the maximum window size for testingdifferent screensizes quickly during development. This is adevelopment tool only which is also not intended for end users. <li> Terminal - This is provided as a development tool. It may be reasonable toprovide this as a seperate installable package for advanced users who arefamiliar with Linux however it is not expected that the majority of users willfind this tool at all useful, only confusing. Therefore it is recommended thisprogram is not included.<li> File Manager - Provided as a development tool. Qtopia is functional withoutit using just Qtopia's document model.Addingthe File Browser can make it possible for users to add and remove files from thedevice in a way which does not correspond to Qtopia's document model which can break theinterface. We therefore do not recommend this program should be included on a deviceto ensure a consistent document model in addition to protecting critical user and systemfiles and settings.</ul><p> <h2> Unsupported Components</h2><a name="7"></a><p> The following applications are unsupported 3rd party applications/portsintended purely to demonstrate the flexibility of Qtopia:<p> <ul><li> VNC Viewer</ul><p> <h2> Required Plugins</h2><a name="8"></a><p> If Qtopia crashes twice in quick succession "Safe Mode" will be entered andno plugins will be loaded in case the crash was caused by a misbehavingplugin. In some cases there are plugins that are required for correctoperation of the device. These plugins can be specified in the .directoryfile in $QPEDIR/plugins/<type>/.directory. For example, if the simple8text codec is always required:<p> <pre>[Desktop Entry]Name=Text CodecsComment=Provides support for various international languages.Required=simple8Apply=QPE/System restart()</pre> <p> <h2> Power Management</h2><a name="9"></a><p> A number of points should be considered when integrating Qtopia with adevice that has power management.<p> <ul><li> Qtopia controls the power state (using pen and keyinput to restart timeouts), not the kernel.<li> The system's "Power" key just sends a key to Qtopia, whichthen does the actual suspend.<li> Qtopia supports multiple shutdown levels. By default theseare On, Light Dim, LightOff, and Suspend. Additional levelscan be added with a small amount of coding.<li> Qtopia calls platform-specific functions to set lighting levelfor 'dimming' and turning off the light.<li> Qtopia runs the 'apm' command to suspend.<li> The system's <tt>at</tt> daemon is used to unsuspend upon RTC alarms.<li> The system's <tt>at</tt> daemon is used to write the RTC clock(because on some systems only one process can manipulate the RTC).</ul><p> <h2> Removable Storage Cards</h2><a name="10"></a><p> Files from external devices such as SD and CF cardsare automatically scanned on insertion and supported documents are mapped in to Qtopia'sdocument view. <p> The insertion will be triggered when the Qtopia library receives one of the following messages via the QPE/Card QCOP channel:<p> <ul><li> mtabChanged() - Sent when /etc/mtab have changed. <li> stabChanged() - Sent when /var/run/stab, /var/state/pcmcia/stab, or /var/lib/pcmcia/stab have changed.</ul><p> If the automatic detection is inadequate due to the specifics of yourdevice, you may <em>alternatively</em> provide file/opt/Qtopia/etc/default/Storage.conf, with a group for eachrelevant device in /etc/mtab, with settingsof this form:<p> <pre>[/dev/hda1]Name = Internal StorageRemovable = 0[/dev/sda1]Name = CardRemovable = 1</pre> <p> With the above, /dev/hda1 will be internal storage, andwhen /dev/sda1 is mounted (eg. by Linux Hotplug system),a storage location named "Card" will be available to the user: anydocuments there will appear on the Documents page. This file canbe translated as with any Qtopia <a href="config.html">Config</a> file.<p> <!-- eof --><p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright © 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -