Reply
Thread Tools
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#171
Okay, so going back on my previous question...

I can finally get an F3 signal sent 100% of the time now if I have this in my script.

xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'

I don't understand why I have to force this so many times.

Besides that, it's a little laggy doing it this way.

Any possible clues or a different direction I can take here?

Kind regards.
 
Posts: 1,101 | Thanked: 1,185 times | Joined on Aug 2008 @ Spain
#172
Originally Posted by Addison View Post
Okay, so going back on my previous question...

I can finally get an F3 signal sent 100% of the time now if I have this in my script.

xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'
xte 'keydown F3' 'keyup F3'

I don't understand why I have to force this so many times.

Besides that, it's a little laggy doing it this way.

Any possible clues or a different direction I can take here?

Kind regards.
Instead of sending a stream of fast key pressings, try to send the keydown event, wait a bit, and then the keyup event. May be that works
Code:
xte 'keydown F3'
/usr/share/snx/usleep 100000
xte 'keyup F3'
Since "sleep" in ash only accepts an integer number of seconds, I'm using here usleep (which I provide with snx and accepts a number of microseconds).
Unless you use bash to run your script, then you could use sleep
Code:
#!/bin/bash
#your script stuff...
xte 'keydown F3'
sleep 0.1
xte 'keyup F3'
 

The Following 2 Users Say Thank You to maacruz For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#173
xte 'keydown F3'
sleep 0.1
xte 'keyup F3'
xkbd -geometry +65509+140 -k /media/mmc2/N800/Keyboards/scumm.xkbd & echo $! >/tmp/xkbd2.pid

and

xte 'keydown F3'
/usr/share/snx/usleep 100000
xte 'keyup F3'
xkbd -geometry +65509+140 -k /media/mmc2/N800/Keyboards/scumm.xkbd & echo $! >/tmp/xkbd2.pid

both crashed my tablet.

The keyboard wouldn't display in the correct position for either one of these scripts, didn't function at all, major screen weirdness, couldn't even lock the tablet and had to yank the battery both times after 10 minutes each time.

It's not that important so I'm just going to give up on the whole F3 keypress.

It works perfectly without it.

I really need to stop being so greedy at times.
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#174
When I tap on either side of the screen, it will bring up the virtual keyboard.

How can I make it so that this only happens just once?

A double tap by accident will stack two of them on top of each other, still leaving one of them on the screen after the other one closes.

This is the script I'm using to launch it.

xkbd -geometry +65509+140 -k /media/mmc2/N800/Keyboards/scumm.xkbd & echo $! >/tmp/xkbd2.pid

Cheers.
 
Posts: 1,101 | Thanked: 1,185 times | Joined on Aug 2008 @ Spain
#175
Originally Posted by Addison View Post
When I tap on either side of the screen, it will bring up the virtual keyboard.

How can I make it so that this only happens just once?

A double tap by accident will stack two of them on top of each other, still leaving one of them on the screen after the other one closes.

This is the script I'm using to launch it.

xkbd -geometry +65509+140 -k /media/mmc2/N800/Keyboards/scumm.xkbd & echo $! >/tmp/xkbd2.pid

Cheers.
Test if the pid file exists to launch xkbd
Code:
if [ ! -e /tmp/xkbd2.pid]; then
xkbd....
fi
Make sure you delete the pid file in the kill script.
 

The Following User Says Thank You to maacruz For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#176
Thank you Mac!

That works perfectly after adding one space before the right bracket.

if [ ! -e /tmp/xkbd2.pid ]; then
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#177
Would anyone be willing to take a look at Necroplayer?

It's looks quite promising.

I believe it takes around 18 megs to install this.

http://talk.maemo.org/showthread.php?t=79384

Thanks guys.
 
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#178
Originally Posted by maacruz View Post
Instead of sending a stream of fast key pressings, try to send the keydown event, wait a bit, and then the keyup event. May be that works
Code:
xte 'keydown F3'
/usr/share/snx/usleep 100000
xte 'keyup F3'
xte actually contains sleep/usleep commands as well, so the above could be streamlined into one process:

Code:
xte  'keydown F3' 'usleep 100000' 'keyup F3'
No idea why something like that would crash the tablet though :-(
 

The Following 2 Users Say Thank You to lma For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#179
Code:
xte  'keydown F3' 'usleep 100000' 'keyup F3
That actually worked...

about 10% of the time. *lol*

I'm just giving up on this but thank you for the reply lma.
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#180
This is going to sound so stupid...

How can I uninstall what I did here?

apt-get install gstreamer0.10-plugins-good

and

dpkg -i gstreamer0.10-plugins-extra_0.10.6-0osso22-2_armel.deb


Neither of these show up in the App Manager.
 
Reply

Tags
nokia n800, volume


 
Forum Jump


All times are GMT. The time now is 15:03.