![]() ![]() |
Jan 31 2007, 06:11 AM
Post
#1
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
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 QUOTE ... [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. QUOTE ... [Launch] ... F26 = Applications/zeditor ... Anyone have any idea what is wrong with my call? |
|
|
|
Jan 31 2007, 06:18 AM
Post
#2
|
|
|
Group: Members Posts: 105 Joined: 3-August 05 Member No.: 7,766 |
QUOTE(Snappy @ Jan 31 2007, 04:11 PM) F26 = @qcop QPE/System 'execute(QString)' ime.sh Make sure there is a tab after the @qcop (not a blank). |
|
|
|
Jan 31 2007, 06:52 AM
Post
#3
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
|
|
|
|
Jan 31 2007, 08:26 AM
Post
#4
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
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) CODE #!/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 |
|
|
|
Jan 31 2007, 11:37 AM
Post
#5
|
|
|
Group: Members Posts: 105 Joined: 3-August 05 Member No.: 7,766 |
QUOTE(Snappy @ Jan 31 2007, 06:26 PM) 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. |
|
|
|
Jan 31 2007, 11:48 AM
Post
#6
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
QUOTE(tml @ Feb 1 2007, 03:37 AM) QUOTE(Snappy @ Jan 31 2007, 06:26 PM) 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. I see ... hmmm ... is there maybe a way for keyhelper app to run a .sh script directly? |
|
|
|
Jan 31 2007, 07:49 PM
Post
#7
|
|
![]() Group: Members Posts: 2,808 Joined: 21-March 05 From: Sydney, Australia Member No.: 6,686 |
QUOTE(Snappy @ Feb 1 2007, 02:26 AM) 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) CODE #!/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 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()'" |
|
|
|
Jan 31 2007, 08:35 PM
Post
#8
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
QUOTE(Meanie @ Feb 1 2007, 11:49 AM) 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()'" 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. |
|
|
|
Jan 31 2007, 08:38 PM
Post
#9
|
|
|
Group: Members Posts: 1,213 Joined: 9-June 05 From: Gobi Desert, Mongolia Member No.: 7,306 |
try creating an icon that calls the script then call the icon of the script via qcop channel
|
|
|
|
Jan 31 2007, 09:15 PM
Post
#10
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
|
|
|
|
Jan 31 2007, 09:30 PM
Post
#11
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
ok, so far seems to work ...
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? |
|
|
|
Jan 31 2007, 09:34 PM
Post
#12
|
|
![]() Group: Members Posts: 2,808 Joined: 21-March 05 From: Sydney, Australia Member No.: 6,686 |
QUOTE(Snappy @ Feb 1 2007, 03:30 PM) ok, so far seems to work ... 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? of course you can. my zgcc image supports both qte and xqt |
|
|
|
Feb 1 2007, 03:10 PM
Post
#13
|
|
|
Group: Members Posts: 793 Joined: 28-November 04 From: NM, US, sometimes Asia Member No.: 5,633 |
QUOTE(Meanie @ Feb 1 2007, 01:34 PM) QUOTE(Snappy @ Feb 1 2007, 03:30 PM) ok, so far seems to work ... 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? of course you can. my zgcc image supports both qte and xqt Roger that, thanks! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 08:33 AM |