htcpen: HTC Shift Touchscreen Driver for Linux

Here’s my first attempt to make the HTC Shift touchscreen working under Linux 😀

Feel free to send me patches and ideas to improve the driver :)

Update: htcpen submitted to review for inclusion into Linux kernel.
Update2: htcpen has been included into the git input tree, it will be merged when 2.6.27 opens up.

Download

htcpen version 1.6 (2008-05-28)
htcpen-1.6.tar.gz
eGalax Xorg driver + TouchKit version 2.03
TouchKit-2.03.172.tar.gz

Install instructions

Download the tarball, extract it to some temporary directory, compile and install it:

# tar zxvf htcpen-1.6.tar.gz
# cd htcpen-1.6
# make
# make install

X.org configuration:

   # tar zxvf TouchKit-2.03.172.tar.gz
   # cd TouchKit
   # cp egalax_drv.so /usr/lib/xorg/modules/input/

Edit /etc/X11/xorg.conf and configure the following:

   Section \"InputDevice\"
         Identifier \"htcpen\"
         Driver \"egalax\"
         Option \"Device\" \"/dev/input/event_htcpen\"
         Option \"Parameters\" \"/var/lib/egalax.cal\"
         Option \"ScreenNo\" \"0\"
   Endsection

Into your “ServerLayout” section, add the following line:

    InputDevice \"htcpen\" \"CorePointer\"

After rebooting your system, udev should load the htcpen module automatically and create a symlink of the input device to /dev/input/event_htcpen.

To finish, run “TouchKit”, click on “Tool” tab and do the 25 point calibration.

htcpen demonstration video

This entry was posted in linux. Bookmark the permalink.

5 Responses to htcpen: HTC Shift Touchscreen Driver for Linux

  1. Roberto says:

    Hi POF, thank you for this beautiful blog!
    I have installed htcpen on my Shift with ubuntu but I noticed that the mouse is slow if I want for example to select a group of icons on the desktop..it’s like a delay of the cursor than the real position of the pen. How to obtain a real time effect? In Touchkit setting I’ve tried to rise the Frequency in hz but with no result.
    Thanks in advance

  2. Pingback: pofHQ » Blog Archive » Linux on HTC Shift

  3. Kirill says:

    hi, the help is necessary.
    ubuntu 8.10 2.6.27
    easy way not work!!

    root@ubuntu:/home/ubuntu/Documents/htcpen-1.6# make
    make -C /lib/modules/2.6.27-4-lpia/build M=/home/ubuntu/Documents/htcpen-1.6 modules
    make[1]: Entering directory `/lib/modules/2.6.27-4-lpia/build’
    make[1]: *** No rule to make target `modules’. Stop.
    make[1]: Leaving directory `/lib/modules/2.6.27-4-lpia/build’
    make: *** [all] Error 2
    thanks

  4. Anson says:

    I am waiting the solution for 9.10. Is there any one can help this?

  5. avdzm says:

    any luck with ubuntu 9.10?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>