Finger Scrolling

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Application-level support)
 
(One intermediate revision by one user not shown)
Line 6: Line 6:
 
pressing the touchscreen, and not moving the finger for a short time (200ms currently). This is useful for selecting text, for example.
 
pressing the touchscreen, and not moving the finger for a short time (200ms currently). This is useful for selecting text, for example.
  
This makes applications not specifically designed for touchscreen devices work much better, since scrolling can happen by touching the screen anywhere, not just on the scrollbars at the edges of the windows. Apps designed for touchscreen devices (like illume and anything built with elementary) don't work as well, since some of the scrolling functionality is implemented at a higher level, and potentially conflicts with the new code.
+
The driver:
 +
[http://secretsauce.net:5050/scrolling_patches/x/tslib_scrolling.patch patch]
 +
[http://secretsauce.net:5050/scrolling_patches/x/xserver-kdrive-glamo_1.3.0.0+git.bb recipe]
 +
[http://secretsauce.net:5050/scrolling_patches/x/xserver-kdrive-glamo_1.3.0.0+gitr9b28d998424c77fbc057dd3a022ccbb122793a52-r4_armv4t.ipk ipk]
  
dual behavior
+
If using SHR, just "opkg install" the package and you're ready to go.
  
not in xorg
+
===Downsides===
 
+
1. Right now you can scroll and drag with a similar motion (pause before moving finger to drag). This is not intuitive to new users.
doesn't work when screen tilted
+
2. The Kdrive X driver has been patched, not yet the Xorg driver.
 
+
3. The driver assumes the screen is oriented vertically. If X is rotated, the orientations become wrong
xglamo patch:
+
[http://secretsauce.net:5050/scrolling_patches/x/tslib_scrolling.patch]
+
 
+
bitbake recipe including the patch:
+
[http://secretsauce.net:5050/scrolling_patches/x/xserver-kdrive-glamo_1.3.0.0+git.bb]
+
 
+
precompiled package (works with SHR):
+
[http://secretsauce.net:5050/scrolling_patches/x/xserver-kdrive-glamo_1.3.0.0+gitr9b28d998424c77fbc057dd3a022ccbb122793a52-r4_armv4t.ipk]
+
  
 
=Application-level support=
 
=Application-level support=
Line 45: Line 40:
 
[http://secretsauce.net:5050/scrolling_patches/fltk2/fltk2_svn.bb recipe]
 
[http://secretsauce.net:5050/scrolling_patches/fltk2/fltk2_svn.bb recipe]
 
[http://secretsauce.net:5050/scrolling_patches/fltk2/libfltk2-2.0_1.9.9+svnr6834-r0_armv4t.ipk ipk]
 
[http://secretsauce.net:5050/scrolling_patches/fltk2/libfltk2-2.0_1.9.9+svnr6834-r0_armv4t.ipk ipk]
 +
 +
[[Category:Software]]

Latest revision as of 13:19, 19 September 2009

Contents

[edit] Finger-scrolling

[edit] Driver

I've implemented drag-scrolling on my Freerunner (drag on the touchscreen to generate scrolling, instead of dragging events). By placing this code into the X mouse driver, all applications that support the mouse wheel (the vast majority do) automatically become finger-scrolling enabled.

With this patch, scroll events are generated by pressing on the touchscreen, and dragging in the desired scroll direction. Dragging can still happen, by pressing the touchscreen, and not moving the finger for a short time (200ms currently). This is useful for selecting text, for example.

The driver: patch recipe ipk

If using SHR, just "opkg install" the package and you're ready to go.

[edit] Downsides

1. Right now you can scroll and drag with a similar motion (pause before moving finger to drag). This is not intuitive to new users. 2. The Kdrive X driver has been patched, not yet the Xorg driver. 3. The driver assumes the screen is oriented vertically. If X is rotated, the orientations become wrong

[edit] Application-level support

[edit] Illume keyboard

The Illume keyboard doesn't natively support the mouse wheel and contains its own scrolling code.

patch recipe ipk

[edit] Tangogps

By default Tangogps zooms in/out in response to the mouse wheel. I feel this is inappropriate, so I disabled it. With the patch below, the mouse wheel does nothing; I haven't connected panning to the wheel. With the patch below, you have to hold your finger for a bit before moving it for the panning to happen. This isn't ideal yet.

patch inc used in recipe ipk

[edit] FLTK

I use Dillo as my browser. Dillo uses the FLTK2 toolkit, which supports vertical scrolling by default, but not horizontal scrolling. Here're are FLTK patches to fix this. Also, a fix for an FLTK keyboard bug triggered by the Illume keyboard is included (bug report).

Horizontal scrolling patch Keyboard patch recipe ipk

Personal tools

Finger-scrolling

Driver

I've implemented drag-scrolling on my Freerunner (drag on the touchscreen to generate scrolling, instead of dragging events). By placing this code into the X mouse driver, all applications that support the mouse wheel (the vast majority do) automatically become finger-scrolling enabled.

With this patch, scroll events are generated by pressing on the touchscreen, and dragging in the desired scroll direction. Dragging can still happen, by pressing the touchscreen, and not moving the finger for a short time (200ms currently). This is useful for selecting text, for example.

This makes applications not specifically designed for touchscreen devices work much better, since scrolling can happen by touching the screen anywhere, not just on the scrollbars at the edges of the windows. Apps designed for touchscreen devices (like illume and anything built with elementary) don't work as well, since some of the scrolling functionality is implemented at a higher level, and potentially conflicts with the new code.

dual behavior

not in xorg

doesn't work when screen tilted

xglamo patch: [1]

bitbake recipe including the patch: [2]

precompiled package (works with SHR): [3]

Application-level support

Illume keyboard

The Illume keyboard doesn't natively support the mouse wheel and contains its own scrolling code.

patch recipe ipk

Tangogps

By default Tangogps zooms in/out in response to the mouse wheel. I feel this is inappropriate, so I disabled it. With the patch below, the mouse wheel does nothing; I haven't connected panning to the wheel. With the patch below, you have to hold your finger for a bit before moving it for the panning to happen. This isn't ideal yet.

patch inc used in recipe ipk

FLTK

I use Dillo as my browser. Dillo uses the FLTK2 toolkit, which supports vertical scrolling by default, but not horizontal scrolling. Here're are FLTK patches to fix this. Also, a fix for an FLTK keyboard bug triggered by the Illume keyboard is included (bug report).

Horizontal scrolling patch Keyboard patch recipe ipk