tucked away into a tiny corner

Friday, December 14, 2007

Touch Me, I'm Sick

Thanks to a reader out there in the blogosphere, Dean, I was pointed to a very handy forum page. The result of following these directions, I now have touchscreen support. After some hacking on a train, I got the stylus to be fairly accurate. SO here's the scoop:
  1. Make certain that the BIOS is selected to "touch panel" not "tablet"
  2. installe the evtouch driver, which is as simple as "sudo apt-get install evtouch"
  3. Then here is my xorg.conf
  4. # xorg.conf (xorg X Window System server configuration file)
    #
    # This file was generated by dexconf, the Debian X Configuration tool, using
    # values from the debconf database.
    #
    # Edit this file with caution, and see the xorg.conf manual page.
    # (Type "man xorg.conf" at the shell prompt.)
    #
    # This file is automatically updated on xserver-xorg package upgrades *only*
    # if it has not been modified since the last upgrade of the xserver-xorg
    # package.
    #
    # If you have edited this file but would like it to be automatically updated
    # again, run the following command:
    # sudo dpkg-reconfigure -phigh xserver-xorg

    Section "Files"
    EndSection

    Section "InputDevice"
    Identifier "Generic Keyboard"
    Driver "kbd"
    Option "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "us"
    EndSection

    Section "InputDevice"
    Identifier "Configured Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Device" "/dev/input/mice"
    Option "Protocol" "ImPS/2"
    Option "ZAxisMapping" "4 5"
    Option "Emulate3Buttons" "true"
    EndSection

    Section "InputDevice"
    Identifier "Synaptics Touchpad"
    Driver "synaptics"
    Option "SendCoreEvents" "true"
    Option "Device" "/dev/psaux"
    Option "Protocol" "auto-dev"
    Option "HorizEdgeScroll" "0"
    EndSection

    Section "InputDevice"
    Driver "wacom"
    Identifier "stylus"
    Option "Device" "/dev/input/wacom"
    Option "Type" "stylus"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "InputDevice"
    Driver "wacom"
    Identifier "eraser"
    Option "Device" "/dev/input/wacom"
    Option "Type" "eraser"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "InputDevice"
    Driver "wacom"
    Identifier "cursor"
    Option "Device" "/dev/input/wacom"
    Option "Type" "cursor"
    Option "ForceDevice" "ISDV4" # Tablet PC ONLY
    EndSection

    Section "InputDevice"
    Identifier "Touchscreen"
    Driver "evtouch"
    Option "Device" "/dev/input/by-id/usb-Fujitsu_Component_USB_Touch_Panel-event-joystick"
    Option "DeviceName" "Touchscreen"
    Option "MinX" "570"
    Option "MinY" "745"
    Option "MaxX" "15250"
    Option "MaxY" "15575"
    # Option "SwapX" "1"
    # Option "SwapXY" "1"
    # Option "ReportingMode" "Raw"
    # Option "Emulate3Buttons"
    # Option "Emulate3Timeout" "50"
    # Option "TapTimer" "0"
    # Option "LongTouchTimer" "250"
    Option "SendCoreEvents"
    EndSection

    Section "Device"
    Identifier "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
    Driver "intel"
    BusID "PCI:0:2:0"
    EndSection

    Section "Monitor"
    Identifier "Generic Monitor"
    Option "DPMS"
    EndSection

    Section "Screen"
    Identifier "Default Screen"
    Device "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
    Monitor "Generic Monitor"
    DefaultDepth 24
    SubSection "Display"
    Modes "640x480"
    EndSubSection
    EndSection

    Section "ServerLayout"
    Identifier "Default Layout"
    Screen "Default Screen"
    InputDevice "Generic Keyboard"
    InputDevice "Configured Mouse"

    # Uncomment if you have a wacom tablet
    # InputDevice "stylus" "SendCoreEvents"
    # InputDevice "cursor" "SendCoreEvents"
    # InputDevice "eraser" "SendCoreEvents"

    InputDevice "Touchscreen" "SendCoreEvents"
    # InputDevice "Synaptics Touchpad"
    EndSection

There is more work that needs to be done to make the stylus pixel perfect accurate, as it stands now there is about five or six pixels of difference, but it does work.

Technorati Tags: , , , , ,

blog comments powered by Disqus