Modifications

Sauter à la navigation Sauter à la recherche
2 929 octets ajoutés ,  21 septembre 2014 à 09:30
aucun résumé de modification
Ligne 42 : Ligne 42 :     
== Utiliser ==
 
== Utiliser ==
To use xstroke I highly recommend using a plastic stylus instead of your finger. Also calibrate the touchscreen for X-Windows so you have the best control over the cursor possible.
+
To use xstroke I highly recommend using a plastic stylus instead of your finger. Also [[RASP-PiTFT-Touch|calibrate the touchscreen for X-Windows so you have the best control over the cursor possible]].
 +
 
 +
{{ambox-stop|text=Don't use a ballpoint pen or sharp metal stylus as it could scratch or damage the touchscreen!}}
 +
 
 +
Start X-Windows on the PiTFT and open the LXDE menu by clicking the icon in the lower left corner. Scroll up to the '''Accessories''' menu at the top and notice the new '''XStroke''' and '''XStroke Kill''' commands.
 +
 
 +
 
 +
Click the XStroke menu option to start xstroke. You should see a small pencil icon appear on the bottom right side of the screen. The pencil icon means xstroke is running, however by default it's not yet looking for gesture input.
 +
 
 +
 
 +
Open an application that takes text input, such as LXTerminal. To enable gesture input click the xstroke pencil icon. You should see the pencil turn green and the text 'abc' written over top of the icon. You might need to click the icon a few times to get the click to register in the right spot.
 +
 
 +
 
 +
When xstroke is looking for gesture input you can drag the mouse cursor in a gesture anywhere on the screen to send specific key strokes. Here's a picture of the possible gestures you can send:
 +
 
 +
[[Fichier:RASP-PiTFT-Gesture-00.png]]<small><br />Crédit: Carl Worth pour l'image ci-dessus</small>
 +
 
 +
To draw a gesture from the above image, press anywhere on the screen, start from the circle in the gesture, and follow the gesture pattern towards the arrow. As you draw a gesture you should see a blue line displayed that shows what you've drawn. Lift up the stylus when you get to the end of the gesture at the arrow. If xstroke recognizes the gesture it will send the appropriate key press to the active window. Try drawing a few characters from the image above to get the hang of writing gestures.
 +
 
 +
 
 +
A few very useful gestures are backspace (which deletes a character), return/enter, and space. To draw a backspace gesture just draw a line going from the right side of the screen to the left side. The gesture for return/enter is a diagonal line from the top right to bottom left. Finally a space is a straight line from the left to the right.
 +
 
 +
 
 +
Note that when xstroke is looking for gestures you might not be able to click or control the cursor as you normally would expect. To stop xstroke's gesture recognition carefully press the xstroke pencil icon again until the 'abc' text disappears. I've found this process can be a little finicky as the icon is very small and any movement will be interpreted as a gesture. Use a light touch and try a few times to click the icon.
 +
 
 +
 
 +
If you get stuck completely and can't disable xstroke by clicking the icon, connect to the Raspberry Pi in a terminal/SSH connection and run 'killall xstroke' (without quotes) to force xstroke to quit. The normal way to stop xstroke is to navigate to the '''Accessories -> XStroke Kill''' command, but you might not be able to do that if xstroke is listening for gesture input.
 +
 
 +
 
 +
Have fun using xstroke to control your Pi by writing gestures on the PiTFT screen!
    
{{RASP-PiTFT-TRAILER}}
 
{{RASP-PiTFT-TRAILER}}
29 917

modifications

Menu de navigation