View Single Post
Posts: 49 | Thanked: 23 times | Joined on Oct 2009 @ Oulu, Finland
#240
Originally Posted by shadow52 View Post
Cheers mate, that's great! Could you let me know if I'm using your script the right/best way... I'm doing the following:

1) Boot device, connect keyboard.
2) Open X Terminal, run setxkbmap manually.
3) Slide open built-in keyboard, press key.
4) In X Terminal, run 'nohup python keys.py &' (keys.py is your script). Close terminal.
5) Thereafter, whenever keyboard dis/reconnects, press a key on the built-in keyboard and the map will be reset.

Do you normally have to run setxkbmap manually? Are you placing your script in with the system init scripts or running as user?

Many thanks again
You don't have to run setxkbmap manually. The idea of the script is that it will execute the setxkbmap command every time your keyboard is connected.

It works with the Nokia SU-8W keyboard very well.

With SU-8W you don't need to press any keys from internal keyboard.

PC105 keyboards doesn't work at the moment. I wasn't able to get mine Microsoft mobile keyboard 6000.

Originally Posted by dcarter View Post
OK, I apologize in advance,
but to run this script (after entering my own personal variables corresponding to my keyboard) should I create a text file with Leafpad?

If so, then how do I run it and make it always run?

dcarter
Yes you should create a text file using ex. leafpad and then save it to N900 (this is the same as /home/user/MyDocs from terminal) with name keys.py.

I haven't been able to get it start on startup so I have created a desktop icon for it using this guide: http://www.themaemo.com/howto-launch...om-a-shortcut/
(To get icon use this guide also: http://www.themaemo.com/howto-launch...ortcut-part-2/)

[Desktop Entry]
Encoding=UTF-8
Version=0.1
Type=Application
Terminal=false
Name=Nokia SU-8W
Exec=nohup python /home/user/MyDocs/keys.py
Icon=connect

It would be better if it would start on startup, but at least following tip didn't work (http://talk.maemo.org/showpost.php?p...8&postcount=11)