Reply
Thread Tools
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#11
I used to exchange shift and fn, so shift and ctrl were next to each other and could be pressed by a single finger. There is also the option dbus_shortcuts_use_fn (discussed above in this thread) which makes shortcuts use ctrl+fn, which are next to each other by default, so you get the same effect. It might conflict with fn+ctrl for opening special virtual keyboard, so you have to make sure you press ctrl first and fn second.
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 
Posts: 115 | Thanked: 12 times | Joined on Oct 2009
#12
I'm trying to change the keyboard shortcuts to launch different application with Ctrl + Shift + <Letter Key> combinations but as yet have not been successful. I'm editing the /usr/bin/keyboard-shortcut script in leafpad and I used the existing "FBReader" shortcut as a template to try to get it to work for other apps.

Under the section “# CTRL + SHIFT + KEY

I replaced the lines:

If key == ‘F’:
osso_exec(“FBReader”)


With:

If key == ‘F’:
osso_exec(“Media player”)


I then saved and rebooted but nothing happened when I pressed Ctrl + Shift + <F>

I tried to do the same but instead putting in the line:

If key == ‘F’:
osso_exec(“Firefox”)


but again nothing when pressing Ctrl + Shift + <F>. The original shortcuts from the script like Ctrl + Shift + <A> - Control panel work fine. Can anyone see what I am doing wrong here? Is the way in which app names are displayed in the launcher different to the app name that this script looks for?

Also, does it require a different command for native apps like Media player to installed apps like Firefox?
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#13
Originally Posted by Kamikaze View Post
[...]
If key == ‘F’:
osso_exec(“Media player”)

[...]
"Media player" and "Firefox" don't exist. You want "mediaplayer" and "browser" respectively.
 

The Following User Says Thank You to qwerty12 For This Useful Post:
Posts: 115 | Thanked: 12 times | Joined on Oct 2009
#14
Thanks, how do I find out the name of applications that the script looks for?
 
Posts: 115 | Thanked: 12 times | Joined on Oct 2009
#15
I've tried again using:

If key == ‘F’:
osso_exec(“mediaplayer”)


and then

If key == ‘F’:
osso_exec(“browser”)


and rebooting after each edit but still no luck. I can only assume I am either editing the section incorrectly or need to make edits somewhere else as well. Anyone have any ideas please?
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#16
Find the names by examining the files in /usr/share/dbus-1/services/. You need to look at the line Name= in each file and ignore the com.nokia at the start.

fennec is called mozilla.fennec, so it cannot be executed by the osso_exec function. You need to copy the four lines in osso_exec definition and replace com.nokia.+name and /com/nokia/name with mozilla.fennec.

mediaplayer is another issue, since executing it just runs the background process. You still need to find out how to make it open a window.

You don't need to reboot after editing the script, since it is executed at each key press.

Note that it is a python script, so white space is important, etc.

You can debug your changes by running from the command line

/usr/bin/keyboard-shortcuts a b c d 198

where a b c d are any four parameters (ignored by the script) and 198 is 192+ the letter you wish to emulate (198 being f).
__________________
My repository

"N900 community support for the MeeGo-Harmattan" Is the new "Mer is Fremantle for N810".

No more Nokia devices for me.
 

The Following 2 Users Say Thank You to Matan For This Useful Post:
Posts: 39 | Thanked: 12 times | Joined on Feb 2010 @ Russia, Moscow
#17
Hi, I have a little problem. I used Ctrl + Space to change hardware keyboard layout from Russian to English and back. Now after I installed the application this shortcut is replaced by
if (kn == 247) or (kn == 248) or (kn == 228):
import time
os.system("/usr/bin/dbus-hildon-desktop set_state 64")
time.sleep(0.4)
os.system("/usr/bin/dbus-hildon-desktop activate_window_time -2")
print "<ctrl>F7"
I commented that out but I still cannot switch layout by pressing Ctrl+Space. Uninstalling the application doesn't do the trick either.
Do you have any ideas how to fix this?
 
Posts: 38 | Thanked: 16 times | Joined on Dec 2009
#18
Thanks a lot for this, I've been using an older version for a while and now after upgrading to the newest one I'm loving the ctrl-backspace alt-tab functionality, along with network disconnect shortcut.. now I just need to remember to use them. Still using the hack you posted earlier to swap Fn and shift, I'm used to it but anyone else who tries the device seems to get slightly confused

Any idea if the default mail client can be launched using osso_exec (or some other way)? Also, finding a way to either a) reconnect to the last used connection or b) connect to a certain (3G) connection would be great.

edit:Found a way to launch default email:
Code:
if key == 'm':
        if os.fork() == 0:
                os.system("modest -s")
final edit: updated to much simpler form after finding os.fork() to allow further shortcuts after launching email

Last edited by low life; 2010-03-31 at 15:07.
 
Posts: 39 | Thanked: 12 times | Joined on Feb 2010 @ Russia, Moscow
#19
Ok, since there is no answer I guess I'll have to reflash the device
Maybe it's just not the right thread for reporting this?
 
Posts: 38 | Thanked: 16 times | Joined on Dec 2009
#20
Just throwing random thoughts around, but did you try changing the state of /apps/osso/hildon-desktop/key-actions/dbus_ctrl_shortcuts?

first do: gconftool-2 -g /apps/osso/hildon-desktop/key-actions/dbus_ctrl_shortcuts
then set it to the other one with:
gconftool-2 -s /apps/osso/hildon-desktop/key-actions/dbus_ctrl_shortcuts -t bool true/false
 

The Following User Says Thank You to low life For This Useful Post:
Reply

Tags
screenless, shortcuts

Thread Tools

 
Forum Jump


All times are GMT. The time now is 21:19.