OESF Portables Forum
Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Qt/Qtopia => Topic started by: Snappy on January 31, 2007, 09:11:53 am
-
I've written a small script for toggling the input panel. (ime.sh)
It runs fine and now I'm trying to bind a keystroke to call it.
In keyhelper.conf, I added an additional line as follows
...
[Launch]
...
F26 = @qcop QPE/System 'execute(QString)' ime.sh
...
When I press Home+FirstJapKey (the one next to Ctrl), nothing happens. If I bind it as below, it calls up zeditor successfully.
...
[Launch]
...
F26 = Applications/zeditor
...
Anyone have any idea what is wrong with my call?
-
F26 = @qcop QPE/System 'execute(QString)' ime.sh
Make sure there is a tab after the @qcop (not a blank).
-
F26 = @qcop QPE/System 'execute(QString)' ime.sh
Make sure there is a tab after the @qcop (not a blank).
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153030\"][{POST_SNAPBACK}][/a][/div]
Gee, thanks! That works brilliantly! Who would have guessed that!!
-
hmmm ... strangely, it seem to work, as in it blanks the screen but does not do anything.
Occassionally, home+key do not work altogether.
btw, my script ime.sh is as below
(I created a empty file at /home/tmp/ime_off)
#!/bin/sh
if [ -f /home/tmp/ime_on ]; then
qcop QPE/TaskBar 'hideInputMethod()'
mv /home/tmp/ime_on /home/tmp/ime_off
else
qcop QPE/TaskBar 'showInputMethod()'
mv /home/tmp/ime_off /home/tmp/ime_on
fi
-
hmmm ... strangely, it seem to work, as in it blanks the screen but does not do anything.
[/code]
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153039\"][{POST_SNAPBACK}][/a][/div]
It probably tries to change resolution or so. The execute command tries to start a qpe qpe application which a sh script is not, I think. I'd say you'd have to wrap the script into something qtopian but maybe there's a simpler solution.
-
hmmm ... strangely, it seem to work, as in it blanks the screen but does not do anything.
[/code]
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153039\"][{POST_SNAPBACK}][/a][/div]
It probably tries to change resolution or so. The execute command tries to start a qpe qpe application which a sh script is not, I think. I'd say you'd have to wrap the script into something qtopian but maybe there's a simpler solution.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153065\"][{POST_SNAPBACK}][/a][/div]
I see ... hmmm ... is there maybe a way for keyhelper app to run a .sh script directly?
-
hmmm ... strangely, it seem to work, as in it blanks the screen but does not do anything.
Occassionally, home+key do not work altogether.
btw, my script ime.sh is as below
(I created a empty file at /home/tmp/ime_off)
#!/bin/sh
if [ -f /home/tmp/ime_on ]; then
qcop QPE/TaskBar 'hideInputMethod()'
mv /home/tmp/ime_on /home/tmp/ime_off
else
qcop QPE/TaskBar 'showInputMethod()'
mv /home/tmp/ime_off /home/tmp/ime_on
fi
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153039\"][{POST_SNAPBACK}][/a][/div]
your qcop commands need to run as the zaurus user. maybe your script is called as root user.
try something like
su zaurus -c "qcop QPE/TaskBar 'hideInputMethod()'"
-
your qcop commands need to run as the zaurus user. maybe your script is called as root user.
try something like
su zaurus -c "qcop QPE/TaskBar 'hideInputMethod()'"
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153134\"][{POST_SNAPBACK}][/a][/div]
ok, modified as per above, still shows a black blank screen and returns after awhile without toggling input panel.
Further, running the script from konsole causing the script to ask for password.
-
try creating an icon that calls the script then call the icon of the script via qcop channel
-
try creating an icon that calls the script then call the icon of the script via qcop channel
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153140\"][{POST_SNAPBACK}][/a][/div]
hmmm ... sounds like a plan!
-
ok, so far seems to work ... ... but takes like 3 seconds to do it!
Thanks all for the input and suggestions!
Once I get to my notebook, I'll write a C app to do it properly. My only hurdle is compiling for Z ... something I haven't come up to speed.
btw, meanie, can I gcc natively using gcc from pdaXqtrom?
-
ok, so far seems to work ... ... but takes like 3 seconds to do it!
Thanks all for the input and suggestions!
Once I get to my notebook, I'll write a C app to do it properly. My only hurdle is compiling for Z ... something I haven't come up to speed.
btw, meanie, can I gcc natively using gcc from pdaXqtrom?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153153\"][{POST_SNAPBACK}][/a][/div]
of course you can. my zgcc image supports both qte and xqt
-
ok, so far seems to work ... ... but takes like 3 seconds to do it!
Thanks all for the input and suggestions!
Once I get to my notebook, I'll write a C app to do it properly. My only hurdle is compiling for Z ... something I haven't come up to speed.
btw, meanie, can I gcc natively using gcc from pdaXqtrom?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153153\"][{POST_SNAPBACK}][/a][/div]
of course you can. my zgcc image supports both qte and xqt
[div align=\"right\"][a href=\"index.php?act=findpost&pid=153154\"][{POST_SNAPBACK}][/a][/div]
Roger that, thanks!