Author Topic: touchscreen  (Read 2989 times)


  • New to the forum
  • *
  • Posts: 4
« on: May 31, 2017, 11:16:01 PM »

I'm developping for my 700D with this nice code and  after searching some features for my own module, I have found the touch screen that I want to share :

in surveying the event, I can find the X, Y position when you touch the screen with one or two fingers.

First the different event numbers for my 700D are in event->param with for example one function unsigned int f(struct event *event)

event-> param = 107 when you press and then touch with 1 finger,
108  when unpress 1 finger touch
109  if you shift the finger
114 when press the 2nd fingers touch
115 when unpress 2nd fingers touch
116 and 117 when shift altenartivly with two fingers

for the X,Y position and the fingerNmber, I made for example this code :
static void xlc_write_event(struct event *event)

   uint32_t* info = NULL;
   uint16_t* XY;
   uint16_t X, Y;
   uint32_t fingerNbr;
if (event->param > 100)   {   //700D  touchscreen events

      info  = (uint32_t*)(*(uint32_t*)(event->obj+4));
      switch (event->param) {
         case 107://single touch - one finger
         case 108:
         case 109 :
         case 114: // double touch - two fingers
         case 115:
         case 116:
         case 117:
      default :
      bmp_printf( FONT_MED, 200, 240,"ev=%d;Finger->%d;X=%d;Y=%d\n",  event->param, fingerNbr, X, Y);

      }else {
      bmp_printf(FONT_MED, 200, 240,"ev=%d;NoTouch\n", event->param);


enjoy with that


  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: touchscreen
« Reply #1 on: June 01, 2017, 12:58:05 AM »
Very similar to what I've found here:

Would be nice if you can continue the experiments from the linked thread, as I currently do not have access to a touch-screen camera (though I'd like to emulate these events in QEMU at some point).


  • New to the forum
  • *
  • Posts: 4
Re: touchscreen
« Reply #2 on: June 02, 2017, 07:01:46 PM »
And then there's also lua_touch which I got working on my 700D with some help. Although I think some changes afterwards broke it again.
See here:
It just has finger down, move and up, as far as I remember.

Not sure if this is helpful, this forum is so confusing…


  • New to the forum
  • *
  • Posts: 4
Re: touchscreen
« Reply #3 on: June 04, 2017, 07:50:56 PM »
@a1ex, OK I will switch on the linked thread.

@dnlit, I will have a look one time.

Thanks for your interest.