Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-22-2015, 05:44 PM   #1
boriar
Evangelist
boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.
 
boriar's Avatar
 
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
Coordinates on touchscreen

How can I know the coordinates where I touch on screen?
boriar is offline   Reply With Quote
Old 09-25-2015, 02:51 PM   #2
boriar
Evangelist
boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.
 
boriar's Avatar
 
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
Come on!
Can anyone give me a guidance?
boriar is offline   Reply With Quote
Advert
Old 09-25-2015, 07:15 PM   #3
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Maybe this can help you. I did some experiments on a Touch.
First I give you the fbset output as reference.
Code:
[root@(none) ~]# fbset

mode "800x600-0"
        # D: 0.033 MHz, H: 0.034 kHz, V: 0.055 Hz
        geometry 800 600 800 1280 16
        timings 30000000 8 164 4 18 4 1
        accel false
        rgba 5/11,6/5,5/0,0/0
endmode
Now comes the reading of the touch coordinates:

Code:
[root@(none) ~]# result=`od -i -N 128 /dev/input/event1`; echo "$result"
// At this point I touched the top right corner of the screen (device held as usual). The coordinates are in the lines that start with 0000120 and 0000140, they are 41x40.
0000000 -12329  22021 -15044      4      3      0    549      0
0000020 -12329  22021 -15017      4      3      1    776      0
0000040 -12329  22021 -15007      4      3     24      0      0
0000060 -12329  22021 -14999      4      1    330      0      0
0000100 -12329  22021 -14992      4      0      0      0      0
0000120 -12314  22021  -5950     13      3      1     41      0
0000140 -12314  22021  -5922     13      3      0     40      0
0000160 -12314  22021  -5911     13      3     24    101      0
0000200
And a further example:

Code:
[root@(none) ~]# result=`od -i -N 128 /dev/input/event1`; echo "$result"
// At this point I touched the bottom left corner. The coordinates are in the lines that start with 0000120 and 0000140, they are 560x781.
// As you see the coordinates of the previous touch event are repeated in the lines that start with 0000020 and 0000040.

0000000 -12214  22021     15     15      3      0     41      0
0000020 -12214  22021     42     15      3      1     40      0
0000040 -12214  22021     53     15      3     24      0      0
0000060 -12214  22021     60     15      1    330      0      0
0000100 -12214  22021     66     15      0      0      0      0
0000120 -12207  22021  11228      5      3      1    560      0
0000140 -12207  22021  11259      5      3      0    781      0
0000160 -12207  22021  11270      5      3     24    100      0
0000200
So you could call in a script od -i -N 128 /dev/input/event1, and parse the result.

Last edited by tshering; 09-25-2015 at 07:26 PM.
tshering is offline   Reply With Quote
Old 09-25-2015, 11:05 PM   #4
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
pickel has a mode that makes it print out touch coordinates, if you need it in a shell script

otherwise read from the input, it's fairly standard, google any touchscreen howto
frostschutz is offline   Reply With Quote
Old 09-26-2015, 04:39 AM   #5
boriar
Evangelist
boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.
 
boriar's Avatar
 
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
frostschutz, I need only the numbers but yes, I try to put it in a shell script. If pickel can print then may be it also can be used on a variable. I will try.

tshering, thank you so much for your comments. I look into it.
boriar is offline   Reply With Quote
Advert
Old 09-26-2015, 07:10 AM   #6
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by boriar View Post
If pickel can print then may be it also can be used on a variable. I will try.
There was already a little discussion on the use of pickel for this purpose.

It seems that you have to call pickel wait-for-hit always twice (if you want to use it more than once). After the first call pickel waits that you touch the screen, and then outputs the coordinates. After the second call pickel does not wait and outputs immediately the coordinates, but now with the values for x and y exchanged.

Last edited by tshering; 09-26-2015 at 07:18 AM.
tshering is offline   Reply With Quote
Old 09-26-2015, 12:06 PM   #7
boriar
Evangelist
boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.boriar ought to be getting tired of karma fortunes by now.
 
boriar's Avatar
 
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
You are right. I forgot that.
Thanks again
boriar is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New M96C available with touchscreen EldRick Onyx Boox 5 02-01-2015 05:22 AM
touchscreen is unresponsive pikewolfgard enTourage Archive 2 01-06-2011 06:03 PM
PRS-600 Touchscreen problems omk3 Sony Reader 3 08-23-2010 10:15 AM
Android Touchscreen calendar Kuggie enTourage Archive 5 06-02-2010 10:40 PM
Touchscreen Sensitivity D4N14L enTourage Archive 2 04-02-2010 05:01 PM


All times are GMT -4. The time now is 09:20 PM.


MobileRead.com is a privately owned, operated and funded community.