Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Odds and ends

    Reply
    Page 18 of 30 | Prev | 8   16     17   18   19     20   28 | Next | Last
    Addison | # 171 | 2011-10-29, 07:44 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    maacruz | # 172 | 2011-10-29, 11:52 | Report

    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'

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to maacruz For This Useful Post:
    Addison, lma

     
    Addison | # 173 | 2011-10-29, 23:11 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Addison | # 174 | 2011-10-30, 17:34 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    maacruz | # 175 | 2011-10-30, 20:43 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to maacruz For This Useful Post:
    Addison

     
    Addison | # 176 | 2011-10-30, 22:23 | Report

    Thank you Mac!

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

    if [ ! -e /tmp/xkbd2.pid ]; then

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Addison | # 177 | 2011-10-31, 06:41 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    lma | # 178 | 2011-10-31, 12:23 | Report

    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 :-(

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to lma For This Useful Post:
    Addison, maacruz

     
    Addison | # 179 | 2011-10-31, 22:34 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Addison | # 180 | 2011-11-01, 02:17 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 18 of 30 | Prev | 8   16     17   18   19     20   28 | Next | Last
vBulletin® Version 3.8.8
Normal Logout