Thread
:
How to build a harmattan pre-init runnable component?
View Single Post
juiceme
2012-11-02 , 07:55
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#
35
You propably are compiling it correctly, else it would not run at all in the target device.
What you need to note, is that because evtap needs to return 2 values at the same time, it is returning the character value as the "printout character" and the numeric value as the "return code".
Hence you need to call it like this in your script:
Code:
tap=$(evtap -t $touchdevice -m $mapfile -d $timeout -c) ret=$?
Now to get the character value in $tap and the numeric value in $ret and you can decide in your code which to use. If a timeout occurs then $ret equals 255 (that's in shell variables, it's -1 in code)
See the example script "sillykbd" in the repository. In that file you can see how two different keyboard layouts are used, changeable with the shift key. The return values are used to differentiate between "character printing keys" and control keys like shifts, backpace, OK, CANCEL etc...
Quote & Reply
|
juiceme
View Public Profile
Send a private message to juiceme
Visit juiceme's homepage!
Find all posts by juiceme