Fremantle Bluetooth Keyboard Layout
matthew_exon (Talk | contribs) |
(→Next steps) |
||
(23 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | Bluetooth keyboards are [[Fremantle_Unsupported_Bluetooth_profiles|not officially supported]] on the N900, | + | Bluetooth keyboards are [[Fremantle_Unsupported_Bluetooth_profiles|not officially supported]] on the [[Nokia N900|N900]], that is Maemo [[Open development/Maemo roadmap/Fremantle|Fremantle]], but it is possible to get them working with some hacking. |
== Devices == | == Devices == | ||
- | {| class="wikitable" | + | {| class="wikitable sortable" |
+ | |+ Bluetooth keyboards | ||
|- | |- | ||
! Device | ! Device | ||
- | ! Product Link | + | ! class="unsortable" | Product Link |
- | ! Success Reports | + | ! class="unsortable" | Success Reports |
|- | |- | ||
| iGo Stowaway Keyboard | | iGo Stowaway Keyboard | ||
- | | [http://www.amazon.com/dp/B0002OKCXE | + | | Amazon: [http://www.amazon.com/dp/B0002OKCXE] |
| [http://talk.maemo.org/showpost.php?p=490813&postcount=29] | | [http://talk.maemo.org/showpost.php?p=490813&postcount=29] | ||
|- | |- | ||
| Nokia SU-8W | | Nokia SU-8W | ||
- | | [http://www.nokia.co.uk/support/product-support/nokia-su-8w | + | | Nokia: [http://www.nokia.co.uk/support/product-support/nokia-su-8w] |
| [http://talk.maemo.org/showpost.php?p=490996&postcount=31] | | [http://talk.maemo.org/showpost.php?p=490996&postcount=31] | ||
+ | |- | ||
+ | | Neos BluSlim Bluetooth Compact Keyboard BTK-1 | ||
+ | | Neos: [http://www.neos-world.com/] | ||
+ | | [http://talk.maemo.org/showpost.php?p=613850&postcount=267] | ||
+ | |- | ||
+ | | Rocketfish RF-BTKB2 | ||
+ | | Rocketfish: [http://www.rocketfishproducts.com/pc-85-3-rocketfish-wireless-multimedia-bluetooth-keyboard-and-laser-mouse-blacksilverred.aspx] | ||
+ | | [http://talk.maemo.org/showpost.php?p=659720&postcount=273] | ||
+ | |- | ||
+ | | Apple Wireless Keyboard | ||
+ | | Amazon: [http://www.amazon.com/Apple-Wireless-Keyboard-Retail-Packaging/dp/B002TMRZOQ/ref=sr_1_1?ie=UTF8&s=electronics&qid=1277022601&sr=1-1] | ||
+ | | [http://talk.maemo.org/showthread.php?p=722367#post722367] | ||
+ | |- | ||
+ | | Leasun Electronic Technology MP-0118+ | ||
+ | | [http://www.made-in-china.com/showroom/darian88/product-detailuoEmwfydbkWn/China-Bluetooth-Keyboard-MP-0118-.html] (bought off eBay) | ||
+ | | [http://talk.maemo.org/showpost.php?p=730597&postcount=294] | ||
+ | |- | ||
+ | | Logitech Cordless MediaBoard Pro(TM) | ||
+ | | Logitech: [http://www.logitech.com/en-us/keyboards/keyboard/devices/3616] | ||
+ | | - | ||
+ | |- | ||
+ | | Freedom Universal Bluetooth Keyboard 2 (German layout) | ||
+ | | Amazon: [http://www.amazon.de/Freedom-Universal-Keyboard-Smartphone-BlackBerry/dp/B004480ILA/] | ||
+ | | [http://talk.maemo.org/showpost.php?p=905888&postcount=148] | ||
|} | |} | ||
Line 21: | Line 46: | ||
* Enable HID support as described [[Fremantle_Unsupported_Bluetooth_profiles|here]]. Note that the DisablePlugins line needs to be there, but it should not include the "input" keyword. | * Enable HID support as described [[Fremantle_Unsupported_Bluetooth_profiles|here]]. Note that the DisablePlugins line needs to be there, but it should not include the "input" keyword. | ||
- | * As root, download the tar file from [http://talk.maemo.org/showpost.php?p=441444&postcount=3 | + | * As root, download the tar file from [http://talk.maemo.org/showpost.php?p=441444&postcount=3 here] and extract it: |
sudo gainroot | sudo gainroot | ||
- | cd /usr/share/X11 | + | cd /usr/share/X11/ |
wget http://talk.maemo.org/attachment.php?attachmentid=5221 -O xkb-chinook.tar | wget http://talk.maemo.org/attachment.php?attachmentid=5221 -O xkb-chinook.tar | ||
tar xf xkb-chinook.tar | tar xf xkb-chinook.tar | ||
Line 30: | Line 55: | ||
cp -i xkb-chinook/symbols/us xkb/symbols/. | cp -i xkb-chinook/symbols/us xkb/symbols/. | ||
cp -i xkb-chinook/geometry/pc xkb/geometry/. | cp -i xkb-chinook/geometry/pc xkb/geometry/. | ||
+ | |||
+ | * You need to know your keyboard ID | ||
+ | hildon-im-xkbtool --list | ||
+ | will show the device # | ||
* Every time the keyboard connects, you need to run setxkbmap: | * Every time the keyboard connects, you need to run setxkbmap: | ||
Line 39: | Line 68: | ||
After running this command, press any key on the N900's internal keyboard, and you should be able to type numbers and symbols on the bluetooth keyboard. | After running this command, press any key on the N900's internal keyboard, and you should be able to type numbers and symbols on the bluetooth keyboard. | ||
- | + | The Freedom Universal Keyboard 2 runs with EXTKBD (see below) version 1.3 out of the box. Just install EXTKBD via program manager and you will find the setup in "personalise" of the "settings" tool. | |
+ | Other keyboards will run as well. | ||
- | + | == Setting Layout Automatically == | |
- | + | There is a python script written by jakoleh which seems to work. Copy it out of this post and save it as bluetooth-keyboard.py: | |
- | + | http://talk.maemo.org/showthread.php?p=525721 | |
+ | |||
+ | You need to set the KEYBOARDNAME, DEVICE, MODEL and LAYOUT parameters for your keyboard. To do this go to the /var/lib/bluetooth directory. There should be a directory there named after your device's bluetooth ID, such as "08:00:69:02:01:FC". Change into that directory and find your keyboard in the file called "names". For example: | ||
+ | |||
+ | 00:03:C9:3D:7D:B0 Think Outside Keyboard | ||
+ | |||
+ | In this case, you would set | ||
+ | |||
+ | KEYBOARDNAME = "Think Outside Keyboard" | ||
+ | DEVICE = "dev_00_03_C9_3D_7D_B0" | ||
+ | |||
+ | The MODEL and LAYOUT depend on your keyboard. For a standard 105-key layout, you might do: | ||
+ | |||
+ | MODEL = "pc105" | ||
+ | LAYOUT = "us" | ||
+ | |||
+ | Now open a terminal and run the command in the background like this: | ||
+ | |||
+ | python bluetooth-keyboard.py & | ||
+ | |||
+ | Now whenever you connect the keyboard it should automatically set the correct layout. It should also give you a helpful yellow notification message saying that the keyboard connected. | ||
+ | |||
+ | == Starting daemon script automatically == | ||
+ | |||
+ | Put this in /etc/init.d/bluetooth-keyboard. You need to replace bluetooth-keyboard.py with the absolute path. | ||
+ | |||
+ | <source lang="bash"> | ||
+ | #!/bin/sh | ||
+ | |||
+ | case "$1" in | ||
+ | start) | ||
+ | python bluetooth-keyboard.py & | ||
+ | ;; | ||
+ | stop) | ||
+ | kill $(ps ax | grep 'python bluetooth-keyboard.py' | grep -v grep | awk '{print $1}') | ||
+ | ;; | ||
+ | restart) | ||
+ | echo "$0: not implemented" | ||
+ | exit 1 | ||
+ | ;; | ||
+ | force-reload) | ||
+ | echo "$0: not implemented" | ||
+ | exit 1 | ||
+ | ;; | ||
+ | *) | ||
+ | echo "Usage: $0 {start|stop}" | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | </source> | ||
+ | Make it executable and hook into init system | ||
+ | |||
+ | chmod a+x /etc/init.d/bluetooth-keyboard | ||
+ | update-rc.d bluetooth-keyboard start 99 1 2 3 4 5 . stop 99 0 6 | ||
+ | |||
+ | == Next steps == | ||
+ | |||
+ | It would be nice to build a package to do all of this: | ||
+ | Here is first version of packaged version: [http://talk.maemo.org/showpost.php?p=794981&postcount=319 BlueKlase]. | ||
+ | |||
+ | Another approach is the package "[http://maemo.org/packages/view/extkbd/ extkbd]" (currently in [[Extras]]) which simplifies the usage of external keyboards. It has an UI to select keyboard layout and language. See [http://talk.maemo.org/showthread.php?t=65577 this post] for some usage instructions on extkbd. | ||
+ | |||
+ | == References == | ||
- | Special copy commands: [http://talk.maemo.org/showthread.php?p=490777#post490777] | + | * General procedure: [http://talk.maemo.org/showthread.php?p=490777#post490777] |
+ | * DisablePlugins is required: [http://talk.maemo.org/showpost.php?p=385463&postcount=3] | ||
+ | * Installing the tarball: [http://talk.maemo.org/showpost.php?p=441137&postcount=1] | ||
+ | * Special copy commands: [http://talk.maemo.org/showthread.php?p=490777#post490777] | ||
+ | * Script to automatically run the setxkbmap command: [http://talk.maemo.org/showthread.php?p=525721#post525721] | ||
- | + | [[Category:Bluetooth]] | |
+ | [[Category:Fremantle]] |
Latest revision as of 17:30, 9 February 2012
Bluetooth keyboards are not officially supported on the N900, that is Maemo Fremantle, but it is possible to get them working with some hacking.
Contents |
[edit] Devices
Device | Product Link | Success Reports |
---|---|---|
iGo Stowaway Keyboard | Amazon: [1] | [2] |
Nokia SU-8W | Nokia: [3] | [4] |
Neos BluSlim Bluetooth Compact Keyboard BTK-1 | Neos: [5] | [6] |
Rocketfish RF-BTKB2 | Rocketfish: [7] | [8] |
Apple Wireless Keyboard | Amazon: [9] | [10] |
Leasun Electronic Technology MP-0118+ | [11] (bought off eBay) | [12] |
Logitech Cordless MediaBoard Pro(TM) | Logitech: [13] | - |
Freedom Universal Bluetooth Keyboard 2 (German layout) | Amazon: [14] | [15] |
[edit] Procedure
- Enable HID support as described here. Note that the DisablePlugins line needs to be there, but it should not include the "input" keyword.
- As root, download the tar file from here and extract it:
sudo gainroot cd /usr/share/X11/ wget http://talk.maemo.org/attachment.php?attachmentid=5221 -O xkb-chinook.tar tar xf xkb-chinook.tar cp -i xkb-chinook/symbols/pc xkb/symbols/. cp -i xkb-chinook/symbols/us xkb/symbols/. cp -i xkb-chinook/geometry/pc xkb/geometry/.
- You need to know your keyboard ID
hildon-im-xkbtool --list
will show the device #
- Every time the keyboard connects, you need to run setxkbmap:
setxkbmap -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout us
For the Nokia SU-8W keyboard, use "nokiasu8w" instead of "pc105".
After running this command, press any key on the N900's internal keyboard, and you should be able to type numbers and symbols on the bluetooth keyboard.
The Freedom Universal Keyboard 2 runs with EXTKBD (see below) version 1.3 out of the box. Just install EXTKBD via program manager and you will find the setup in "personalise" of the "settings" tool. Other keyboards will run as well.
[edit] Setting Layout Automatically
There is a python script written by jakoleh which seems to work. Copy it out of this post and save it as bluetooth-keyboard.py:
http://talk.maemo.org/showthread.php?p=525721
You need to set the KEYBOARDNAME, DEVICE, MODEL and LAYOUT parameters for your keyboard. To do this go to the /var/lib/bluetooth directory. There should be a directory there named after your device's bluetooth ID, such as "08:00:69:02:01:FC". Change into that directory and find your keyboard in the file called "names". For example:
00:03:C9:3D:7D:B0 Think Outside Keyboard
In this case, you would set
KEYBOARDNAME = "Think Outside Keyboard" DEVICE = "dev_00_03_C9_3D_7D_B0"
The MODEL and LAYOUT depend on your keyboard. For a standard 105-key layout, you might do:
MODEL = "pc105" LAYOUT = "us"
Now open a terminal and run the command in the background like this:
python bluetooth-keyboard.py &
Now whenever you connect the keyboard it should automatically set the correct layout. It should also give you a helpful yellow notification message saying that the keyboard connected.
[edit] Starting daemon script automatically
Put this in /etc/init.d/bluetooth-keyboard. You need to replace bluetooth-keyboard.py with the absolute path.
#!/bin/sh case "$1" in start) python bluetooth-keyboard.py & ;; stop) kill $(ps ax | grep 'python bluetooth-keyboard.py' | grep -v grep | awk '{print $1}') ;; restart) echo "$0: not implemented" exit 1 ;; force-reload) echo "$0: not implemented" exit 1 ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac
Make it executable and hook into init system
chmod a+x /etc/init.d/bluetooth-keyboard update-rc.d bluetooth-keyboard start 99 1 2 3 4 5 . stop 99 0 6
[edit] Next steps
It would be nice to build a package to do all of this: Here is first version of packaged version: BlueKlase.
Another approach is the package "extkbd" (currently in Extras) which simplifies the usage of external keyboards. It has an UI to select keyboard layout and language. See this post for some usage instructions on extkbd.
[edit] References
- This page was last modified on 9 February 2012, at 17:30.
- This page has been accessed 38,236 times.