#55 Add option to ignore touchscreen when writing.

Rumen Zarev

On my tablet, and I believe all the new ones coming out, there's both a pen and a touchscreen. To avoid accidentally writing something while rest your hand on the screen you usually have disable touch completely in the OS. I wrote up some code that turns it off in Xournal, instead.

The effect is that it doesn't write anything if you touch somewhere on the canvas, but you can still press buttons and the like.

There are still some glitches, though. One is that it will occasionally still write, until you use the pen. That gets fixed by turning on discard_corepointer. The other is trickier. Occasionally you won't be able to select any UI element with the pen, until you touch somewhere with your finger. I haven't figured out what triggers it, yet.

That happens rarely though, so it's actually usable.

I've broken into 3 patches against CVS head---the first one adds the option, the second one adds a menu entry, and the third one adds a menu entry for discard_corepointer (since the two options are best used together).


  • Denis Auroux

    Denis Auroux - 2010-07-08

    Hi Rumen,

    Thanks a lot for the patch! Actually, there used to be a "discard core pointer" menu entry but it got removed due to requests for shortening the Options menu. When I get to it, I'll look into making things smarter (i.e., if the option to ignore touch is enabled, then the associated core events should also be discarded) -- should be just a tiny bit of black magic in on_canvas_button_press_event().


  • Jonathan R Young

    With the Wacom Bamboo Pen & Touch I use xsetwacom to turn off the touch input. I think you can also use xsetpointer to do the same. I expect the screen devices have similar settings, so you could just create a script and place it on a hot key or panel to switch it on/off (or even a gesture from the pen!)

  • Rumen Zarev

    Rumen Zarev - 2010-07-08

    That's what I had been using, but I found that solution unsatisfactory. Also this way you can use multi-touch gestures, for zooming and scrolling, although the gesture-detection in the driver seems pretty bad so far.

  • Jim

    Jim - 2011-08-28


    that's a great patch, thanks.

    What would be even nicer is to be able to set it so that when the pen tip gets near the screen, writing with your hand is automatically turned off.

    Given your knowledge from making this patch, do you think it would be a big effort to make the procedure automagic?



  • Daniel M. German

    Oh, I should mention that I use a wacom tablet (lenovo X201)

  • Nobody/Anonymous

    I tried your xournal fork, dmg, and unfortunately it didn't work for me as my pen input is Wacom, but my touch screen is an Atmel panel. Is there any way your patch can still work with it?

  • Nobody/Anonymous

    Nevermind, fixed the issue by changing the string "touch" to "Touch" (because my touch screen shows up as "Atmel Atmel maXTouch Digitizer"). With my touch screen though, the hand tool is far too sensitive. The patch makes my hand input to activate the hand tool, but I can no longer write. With my palm off I can write normally.

  • Denis Auroux

    Denis Auroux - 2014-04-11

    A slightly modified version of this feature (map touchscreen to hand tool) is now in the GIT and CVS repositories. The default touch device name is still "touch" (for linux systems) but the config file now contains a variable "touchscreen_device_name" that lets you change it (to "Touch" e.g.).

  • Denis Auroux

    Denis Auroux - 2014-06-30

    This is now in release 0.4.8. (also including more touchscreen patches and a dialog box to select the touch device name). See the Options -> Pen and Touch submenu for details.

  • Denis Auroux

    Denis Auroux - 2014-06-30
    • status: open --> closed
    • Group: --> Unstable_(example)

Log in to post a comment.