Showing posts with label tablet. Show all posts
Showing posts with label tablet. Show all posts

Saturday, June 13, 2009

Some software for tablet PC

  • Stroke (gesture recognition)
    • I find easystroke is the best so far. To make it easier to enable/disable easytroke, (because several gesture recognition programs in system may conflict, for example, there is gesture recognition in firefox too.) I write a small patch to disable/enable easystroke with left button, which can be downloaded from here.
  • Note taking with pen
    • I think xournal is very good. It can be used to add annotations to PDF files.

Firefox addons for tablet PC

  • Grab and Drag

    Enables Adobe Acrobat-style grab and drag scrolling in Mozilla applications.

  • All-in-One Gestures

    This extension allows you to execute common commands using mouse (pen) gestures.

    Several mouse gestures programs may conflict each other, so I write a simple AIOGControl (All-in-One Gestures) control addon to enable/disable All-in-One Gestures via a Firefox toolbar button. This is easier for pen to operate.

Finger friendly scrollbar in GTK+

Standard GTK+ scrollbar is too small for finger, to make it bigger, you can put following code in your .gtkrc-2.0 or gtkrc file of theme.

style "big-scrolls" {
GtkRange::stepper-size = 50
GtkRange::slider-width = 50
}

class "GtkScrollbar" style "big-scrolls"

Please refer to http://www.roosmaa.net/index.php/2009/02/09/making-gtk-scrollbars-more-touchscreen-friendly/ too.

Sunday, April 26, 2009

On screen keyboard

On screen keyboard is necessary for a tablet PC. Have tried several on screen keyboard implementation under X window, no one is perfect. Currently using one is cellwriter. Hope the one developed for Moblin will be better.

Requirement for on screen keyboard:
  • Focus: the on screen keyboard should not be focused, and the faked key should be sent to the focused window.
  • Window placement: the on screen keyboard window should not be covered by other windows (for example to be the top-most window), and it should not cover other windows completely (semi-transparent or docked at the desktop side, but it seems docking is not supported well in my metacity 2.24.0).
  • Compatible with XIM. I am Chinese, I need use XIM to input Chinese.
  • Configurable layout (to keep only the needed keys).
  • Show/Hide can be controlled easily (via a panel button is preferable).
  • Support screen rotation. On screen keyboard should not outside the screen or bigger than screen after rotation.
Tried on screen keyboard software:
  • xvkbd: does not handle focus perfectly, the xvkbd itself seem be focused too (titlebar highlighted), so need two click for one key; need to specify which widget faked keys go, not very conveniently.
  • matchbox-keyboard: good support for rotation, configurable laout, XIM, focus. Docking support for matchbox-wm is good. Original version does not support docking for metacity. I have a hack to support docking for metacity, but the hack doesn't support metacity 2.24.0. Show/Hide control can be done with daemon mode (-d) + matchbox-keyboard-toggler utility.
  • gok (gnome on screen keyboard): recommended by many guys, but not good for me. Appears not works with XIM, and not works well without pointer in/out event.
  • onboard: not used too much, I think it is good and simple.
  • cellwriter: hand writing recoganizing program, but it is a good and simple on screen keyboard too. To use it as on screen keyboard add "--keyboard-only" to command line. Do no support configurable layout. Seems not support docking good.

Evtouch configuration

This article is mainly for Tablet Classmate PC.

Evtouch is a Xorg (X window system) input driver for touchscreen device with Linux kernel input/event driver. For example some USB touchscreen device with USBHID class.

To use evtouch Xorg driver, xorg should be setup as follow:


--------------------------------------------------------------------------------
Section "InputDevice"
Identifier "TOUCH"
Driver "evtouch"
Option "Device" "/dev/input/by-path/pci-0000:00:1d.3-usb-0:1:1.0-event-"

Option "DeviceName" "touchscreen"
Option "ReportingMode" "Raw"
Option "MoveLimit" "10"
Option "SendCoreEvents" "On"
# Option "Calibrate" "1"
Option "MinX" "1"
Option "MinY" "1"
Option "MaxX" "4090"
Option "MaxY" "4090"
Option "x0" "-6"
Option "y0" "8"
Option "x1" "1"
Option "y1" "2"
Option "x2" "12"
Option "y2" "2"
Option "x3" "5"
Option "y3" "3"
Option "x4" "-6"
Option "y4" "3"
Option "x5" "-4"
Option "y5" "3"
Option "x6" "0"
Option "y6" "5"
Option "x7" "1"
Option "y7" "5"
Option "x8" "1"
Option "y8" "5"
EndSection

Section "ServerLayout"
......
InputDevice "TOUCH"
EndSection
--------------------------------------------------------------------------------


Calibrate by hand


Evtouch comes with a calibration utility. It works, but I find the result is not very accurate. In fact it can be calibrated further by editing xorg.conf directly.

  • If you find when you touch the margin of the screen, the cursor is not at margin, you can change the "MinX", "MinY", "MaxX", "MaxY" in xorg.conf to calibrate.
  • The x0-y0 to x9-y9 corresponds to 9 regions on screen, with the x0-y0 at the left-bottom corner, x2-y0 at the right-bottom corner, x9-y9 at the right-top corner. To calibrate the touch screen in the region, just the values of corresponding options.

Rotate screen


To rotate screen:
xrandr --output LVDS --rotate left

evtouch should have supported rotation automatically. But the evtouch-0.8.7 in my debian does not work. I write a small patch 08__fix_rotate.patch to fix this issue.

Suspend and Resume


My touchscreen device is a usb device. This means it will be removed by Linux kernel before suspend and re-plugged after resume. Evtouch xorg driver has suspend and resume support mechansim, but it does not work sometimes. From the error message in /var/log/Xorg.0.log, it seems that the underlaying usb kernel device is not ready when evtouch xorg driver is being initialized. Fortunatally, it works sometimes. So if it your touchscreen does not work after resume, just go suspend again and hope it works after next resume.

Right Button


I am not successful in configuring right button. Maybe a kernel input driver issue, usbhid can not report BTN_TOUCHED for my device. But it seems that the following configuration should work for correct kernel input drivers.


--------------------------------------------------------------------------------
Section "InputDevice"
Identifier "TOUCH"
Driver "evtouch"
......
Option "longtouched_action" "down"
Option "longtouched_button" "3"
EndSection
--------------------------------------------------------------------------------