Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Input Methods Documentation

Introduction

Qt Extended provides two input channels to address the issue of text input, given the lack of both screen real-estate and convenient keyboards typical of mobile devices. The Phone Keys input method is intended for phones with the common 0-9, # and * buttons. The Full Screen Handwriting input method is intended primarily for touch screen devices, but can be used with any sort of pointing device, including a mouse. These input methods are not mutually exclusive, and a device equipped with both phone keys and a pointing device can take advantage of both.

Additionally, Qt Extended offers virtual keyboards for devices with touch screens. These input methods offer a widget displaying the characters that can be touched or clicked on to input text. The precitive keyboard adds dictionary look-up capabilities, allowing it to be used with fingers instead of a stylus.

Phone Keys

Given the standard 0-9, * and # keys, Qt Extended uses a dictionary to determine the most likely intended input. For example, the '6' key on most phones translates to 'm', 'n', or 'o'. Simply pressing the key twice will result in a best guess of "no". The '*' key is used to select between different options. In this example , pressing the '*' key will toggle between "no" and "on" - the two matches for the input "66".

Full Screen Handwriting

When a pointing device such as a mouse or touch screen is available, the user can enter text by drawing a character at a time. Qt Extended is capable of composing characters out of multiple strokes, for example in the case of 't' or '4', provided the additional strokes are entered quickly. A shadow of the original stroke is left onscreen to help guide the next stroke. Qt Extended uses input hints to guide the input guess, such as in the case of the letter 's' and the number '5', where the strokes may be difficult to differentiate.

Common Features for Phone Keys and Full Screen Handwriting

The user is able to change how the input method interprets input by switching between input modes. With Phone Keys this is accomplished by pressing and holding the '#' key. Using Full Screen Handwriting, the user enters the mode select stroke, which looks like a triangle pointing upwards, and is drawn from the bottom left counter-clockwise. Other commands to the input method are outlined in the table below:

EffectPhone KeysFull ScreenStroke DirectionsStroke Diagram
Space/Accept WordPress '#'Draw a horizontal line, left-to-right.Right
Mode SelectHold '*' to change modesDraw an upward-pointing triangle counter clockwise, starting in the bottom-left cornerRight, Up-Left, Down-Left.
Next GuessPress '*'Draw a diagonal line from bottom-left to top-right and back againUp-Right, Down-Left
Word PickerStroke Only2 clock-wise circles on top of each other, starting from the topDown-Right, Down-Left, Up-Left, Up-Right, Down-Right, Down-Left, Up-Left, Up-Right
Symbol PickerPress and Hold '#'2 counter-clock-wise circles on top of each other, starting from the topDown-Left, Down-Right, Up-Right, Up-Left, Down-Left, Down-Right, Up-Right, Up-Left
Shift (next character capital)Press '0'Draw a vertical line from bottom to topUp

Virtual Keyboards

Qt Extended currently offers 2 virtual keyboards.

The Qt Extended Keyboard

The first, The Qt Extended Keyboard, is a straightforward virtual keyboard. It shows a qwerty keyboard, and pressing a key on the keyboard creates a key event for that key and passes it on to the focus widget. Holding down a key will create autorepeats, just like a normal keyboard. There is a small arrow on the far right-hand side (next to the '' key) that will show and hide the insert, home, delete, end, page up, and page down keys.

The Caps Lock, Shift, Control, and Alt keys are "sticky", meaning that clicking on them toggles them on and off. This allows for complicated key-combinations to be performed with a single pointing device.

The keyboard also uses the dictionary to suggest words based on the current input. These suggestions are displayed in the bar at the top of the keyboard, and clicking one of these suggestions enters the rest of that word followed by a space.

The keyboard is packaged in two different ways. Normally, the keyboard widget "floats" over the text, and jumps to the top or bottom of the screen in order to not cover the cursor. In this mode, the keyboard widget can be hidden and shown from the context menu. As the DockedKeyboard, the keyboard is docked to the bottom of the screen, resizing the space available for applications.

The Predictive Keyboard

The second keyboard is the predicitve keyboard. This keyboard is designed for use with fingers, which are significantly less accurate than a pointing device. The predictive keyboard analyses uses a dictionary and analysis of the input to resolve ambiguities.

The keyboard presents a familiar Qwerty keyboard. To use the keyboard, just press each letter in order, and then press your word on the bar above the keyboard to accept the word. If the word you intended is not the central word, pressing on it will bring it to the center, and a second press on it in the central position will accept it.

If the word is not in the dictionary, the keyboard can also be used in a letter-at-a-time mode. Keep pressing on your letter until a small viewing bubble appears, and move your finger slightly to focus it on your letter and release to enter that character.

Predictive Keyboard Strokes

The predictive keyboard recognizes several strokes. To stroke, press somewhere on the keyboard and, keeping your finger pressed, move sharply in the appropriate direction.

Stroking up and down changes "board". For example, stroking up from the lowercase board will bring up the uppercase board. Stroking up again will bring up the symbols board, which contains punctuation, symbols, and the carriage return. Note that you must select symbols one at a time by holding down your finger, because the dictionary cannot be used to differentiate symbols.

Stroking down from the lowercase board brings up the number board. The boards are cyclic, so stroking up from the symbol board will also get to the numbers board.

Stroking to the right accepts words and enters spaces. Stroking to the left or pressing the backspace key will cancel a word. Stroking to the left while not entering the word will backspace.

The predictive keyboard supports input hints, and will automatically switch to the most appropriate board for the input field. It also supports autocapitalisation, and on fields where this is hinted will automatically switch from upper to lowercase after the first letter.

Input Hinting

An input widget may hint that it would prefer int or phone to indicate that numbers are more likely, or text or words that it would prefer letters. The words hint also suggests that a dictionary can be used to make better guesses at whole words, and allows the user to select from likely interpretations of a series of strokes. The text hint accepts characters one at a time, and is useful when unusual words are being entered, such as names or passwords.

The following table describes the four modes used by input methods to enable or disable capitalization and guide input guessing:

Mode NameMode TypeDescription
aaword recognitionthe input method uses a dictionary to find likely matches to the input a word at a time (the aa indicates that two key-presses will result in input of two characters).
Aaword recognitionas for aa however the first letter of the word is capitalized
abccharacter recognitionthe input method allows the user to confirm each letter as it is entered.
Abccharacter recognitionas for abc mode however the first letter of the word is capitalized

These modes are handled differently depending on the input method used:

  • Phone keys: consecutive key presses will cycle through the available characters on that key. For example, pressing the 'a' key 3 times will result in an 'a', changed to a 'b', and finally a 'c' (hence the "abc" symbol for this mode).
  • Full Screen Handwriting: the user uses the '*' key or the "Next Guess" stroke to cycle through the guesses for that stroke. For example a 's' might cycle through '5', or even an '8' or a 'g', depending on the user's handwriting.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 7
Page suivante

Le Qt Quarterly au hasard

Logo

Un plugin pour QImage

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web