Finger Scrolling

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(New page: = Finger-scrolling = 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 dr...)
 
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
 
= Finger-scrolling =
 
= 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.
 
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.
  
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.
  
xglamo patch:
+
The driver:
[[Media:tslib_scrolling.patch]]
+
[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]
 +
 
 +
If using SHR, just "opkg install" the package and you're ready to go.
 +
 
 +
===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
 +
 
 +
=Application-level support=
 +
== Illume keyboard ==
 +
The Illume keyboard doesn't natively support the mouse wheel and contains its own scrolling code.
 +
 
 +
[http://secretsauce.net:5050/scrolling_patches/e-wm/illume-kbd-scroll.patch patch]
 +
[http://secretsauce.net:5050/scrolling_patches/e-wm/e-wm_svn.bb recipe]
 +
[http://secretsauce.net:5050/scrolling_patches/e-wm/e-wm_0.16.999.050+svnr41040-r5.5_armv4t.ipk 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.
  
bitbake recipe including the patch:
+
[http://secretsauce.net:5050/scrolling_patches/tangogps/tangogps_noscroll.patch patch]
[[Media:xserver-kdrive-glamo_1.3.0.0+git.bb]]
+
[http://secretsauce.net:5050/scrolling_patches/tangogps/tangogps.inc inc used in recipe]
 +
[http://secretsauce.net:5050/scrolling_patches/tangogps/tangogps_0.9.6-r1_armv4t.ipk ipk]
  
precompiled package (works with SHR):
+
== FLTK ==
[[Media:xserver-kdrive-glamo_1.3.0.0+gitr9b28d998424c77fbc057dd3a022ccbb122793a52-r4_armv4t.ipk]]
+
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 ([http://www.mail-archive.com/fltk-bugs@easysw.com/msg02260.html bug report]).
  
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.
+
[http://secretsauce.net:5050/scrolling_patches/fltk2/xmousewheel-x11.fltk2.patch Horizontal scrolling patch]
 +
[http://secretsauce.net:5050/scrolling_patches/fltk2/fltk_keyrepeat.patch Keyboard patch]
 +
[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]
  
I have patched the Xglamo touchscreen mouse driver, and the most important SHR app that requires dragging: the Illume keyboard. Let me know if these patches work for you.
+
[[Category:Software]]

Latest revision as of 14: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

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.

xglamo patch: Media:tslib_scrolling.patch

bitbake recipe including the patch: Media:xserver-kdrive-glamo_1.3.0.0+git.bb

precompiled package (works with SHR): Media:xserver-kdrive-glamo_1.3.0.0+gitr9b28d998424c77fbc057dd3a022ccbb122793a52-r4_armv4t.ipk

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.

I have patched the Xglamo touchscreen mouse driver, and the most important SHR app that requires dragging: the Illume keyboard. Let me know if these patches work for you.