View Single Post
Posts: 52 | Thanked: 33 times | Joined on Oct 2011 @ Poland, Tricity
#36
No problem. Since then I brick my phone about once a day :-). BTW Debian with Gnome works quite good with N9 rescue image (it automatically mount rootfs and unmounts everything when you eject either).

Here is a version that on -c returns the character and on -a return ascii number:
http://m.enux.pl/_n9/boot/evtap.c
if you'd like to check md5 is: 14f5417981bb9e327a8d6a261c197284

Anyway I found out that I cannot use your script as I planned. I'm not even sure if it is doable just by reading from this touch device. As seems the touch device does not output anything if you just keep your finger on the screen (long tap). It only starts to output anything once there is some movement and only output a meaningful value for coordinates that change.

I've tested with a simple bash script (works when played e.g. from Putty after being logged in):
Code:
while [ true ]
do
	selection=$(/bin/evtap -t /dev/input/"$touch" -m /usr/share/multiboot/touch.map -d "$touchDelay" -xy)
	echo "xy: $selection"
done
So if you hold your phone in portrait view you get the following (with 0:0 in bottom right corner).

It outputs y:x on-touch (meaning once).
It outputs timeout if you will not move your finger.
it outputs y:0 if you move your finger up or down.
it outputs 0:x if you move your finger left or right.
it outputs y:x again if you move on both axis.

In landscape view x and y is exchanged with 0:0 in top left corner. It seems that on pre-init you are stuck in portrait view, but I guess you know that one already.
 

The Following User Says Thank You to eccenux For This Useful Post: