maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   N900 Bluetooth Keyboard + Mouse scripts (https://talk.maemo.org/showthread.php?t=58258)

maartenmk 2010-10-14 07:20

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by kureyon (Post 840287)
Let's try again:

It's not clear what is working/not working. If your keyboard is not fully functioning (ie all the keys does what they are supposed to) then you need to try each of:

pc101, pc102, pc104, (pc105) to see which works fully (preferably) or which gives the greatest number of functioning keys (consolation prize). When you have the above sussed out then you edit .btkeyboard and can use the Watcher script. If the above setxkbmap isn't able to configure your keyboard correctly then neither would the Watcher script.

Sorry, I formulated a bit clumsily. What I tried to say was:
- if I use the setxkbmap command, the keyboard does work, including the number keys.
- If I use the watcher script (v0.10), the number keys do not work.
Thanks for the patient answer though.

F2thaK 2010-10-14 07:27

Re: N900 Bluetooth Keyboard + Mouse scripts
 
my cheap generic chinese BT mouse used to work, no more........

kureyon 2010-10-14 18:38

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by maartenmk (Post 840649)
- if I use the setxkbmap command, the keyboard does work, including the number keys.

OK

Quote:

If I use the watcher script (v0.10), the number keys do not work.
When Watcher script is running, and then you connect the keyboard do you get a message saying that "keyboard connected"? If not, then Watcher is not detecting your keyboard and hence not running setxkbmap and hence doesn't work. Could it be similar to the problem snakekontrol had?:

Quote:

Also, I had an apple wireless keyboard, and I couldn't get bt-dbus-connect to work, so I examined the script, and saw that it searches for device names with "mouse" or "keyboard" in it, and my keyboard was named ikey, so I changed that to iKeyboard, and worked flawlessly.

WhiteWolf 2010-10-15 06:32

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 840441)
WhiteWolf: we need to diagnose a bit more. Your internal keyboard numbers aren't working, that means your internal keyboard is probably not being configured at all (the script must fail).

Please do not start the watcher, connect your BT keyboard, and then, from the terminal, run the following:

Code:

bt-kbd-remap
Please post the output from this script.

Code:

~ $ bt-kbd-remap
Int: (3) Ext: (4)
---
Setting ext keyboard layout:
setxkbmap -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout us -print | xkbcomp - :0.0
---
setxkbmap -device 3
Trying to build keymap using the following components:
keycodes:  evdev+aliases(qwerty)
types:      complete+nokia
compat:    complete
symbols:    nokia_vndr/rx-51(common)+nokia_vndr/rx-51(us)+inet(evdev)
geometry:  nokia(nokiarx51)

Change language to "us", the integrated keyboard on the N900.

splandorf 2010-10-15 20:37

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by Netweaver (Post 836560)
I have the same but I lost my driver/manual CD. I don't even know how to put it in pairing mode. Idiot me :(

And because there is no manufacturer anywhere on the thing, I have no clue where to start looking for a copy.

Care to share how you got them talking together and configured with the correct layout ?
Thanks !


Heyo!
Sorry to hear you lost those bits!
You don't need the drivers for your N900 -- only if you plan on using this keyboard with other devices (palm, symbian?).

I did have to read the manual on the drivers CD to figure out how to put it into pairing mode, but it's simple: hold down:

"Cmd" + "Find" (the "Memo" key in the upper right corner)

then the red light should start blinking to indicate that it's in pairing mode.

What I did to get it working:

1) Paired the keyboard w/ N900 via regular N900 bluetooth settings panel
2) Turned off keyboard
3) Created a .btkeyboard file in my home directory w/ the appropriate entries (pc105, us, etc.) --> the defaults listed in this forum topic
4) Ran HID-Watcher script
5) Turned the keyboard back on, paired it up again
6) After doing this a few times, it started working

I'm not sure I ever got the HID-watcher working correctly... I ran it plenty of times but it didn't necessarily look like it was "doing" anything in particular. I ran through the sequence above a few times w/o (seeming) success, but at a certain point the keyboard starting supporting the special characters, numbers, etc. And now every time I pair it (normally), it continues to work.

hope this helps!

Sam

WhiteWolf 2010-10-17 10:02

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Has anyone gotten the pointer is visible and usable on the N900's browser?

If so how?

maartenmk 2010-10-21 17:30

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by kureyon (Post 841184)
OK

When Watcher script is running, and then you connect the keyboard do you get a message saying that "keyboard connected"? If not, then Watcher is not detecting your keyboard and hence not running setxkbmap and hence doesn't work. Could it be similar to the problem snakekontrol had?:

It does not, so I suppose the keyboard is not detected. I tried renaming it in the Bluetooth menu, that didn't help.
(I now made a QB widget with the setxkbmap command, that seems to work.)

qole 2010-10-21 21:38

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by maartenmk (Post 847300)
It does not, so I suppose the keyboard is not detected. I tried renaming it in the Bluetooth menu, that didn't help.

Make sure your name has "keyboard" in the name. That's what the watcher script is looking for.

Quote:

Originally Posted by maartenmk (Post 847300)
(I now made a QB widget with the setxkbmap command, that seems to work.)

You should be able to make a widget that runs /usr/bin/bt-kbd-remap for the same results.

maartenmk 2010-10-22 08:41

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 847466)
Make sure your name has "keyboard" in the name. That's what the watcher script is looking for.

I did, without result. But I also noticed that if I run BT HID Connect again, it reverts to the old name (Think Outside Keyboard), so maybe the name in the BT settings is ignored by the system?
Note that the original name does contain 'Keyboard', but with a capital letter. Would that matter?

Quote:

Originally Posted by qole (Post 847466)
You should be able to make a widget that runs /usr/bin/bt-kbd-remap for the same results.

Is the one better than the other?

qole 2010-10-22 14:12

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by maartenmk (Post 847784)
Note that the original name does contain 'Keyboard', but with a capital letter. Would that matter?

That should work... Not sure why it doesn't... maybe we need to do some command-line diagnostics here.

Quote:

Originally Posted by maartenmk (Post 847784)
Is the one better than the other?

Well the bt-kbd-remap script is the one that comes with these scripts. If you're only using a keyboard, you aren't using the watcher, and you're just putting the raw command in a widget, you really don't need this package at all.

maartenmk 2010-10-23 09:15

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 848012)
That should work... Not sure why it doesn't... maybe we need to do some command-line diagnostics here.

It does work with the widget, so I achieved what I wanted, but I spent so much time fiddling I would like to see it solved ;-)

So if you feel like looking at it, here's the output of bt-kbd-remap:

Code:

~ $ bt-kbd-remap
Int: (3) Ext: (4)
---
Setting ext keyboard layout:
setxkbmap -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model pc105 -layout us -print | xkbcomp - :0.0
---
setxkbmap -device 3
Trying to build keymap using the following components:
keycodes:  evdev+aliases(qwerty)
types:      complete+nokia
compat:    complete
symbols:    nokia_vndr/rx-51(common)+nokia_vndr/rx-51(us)+inet(evdev)
geometry:  nokia(nokiarx51)

The keyboard does work after that. Note that if I run the watcher script, the keyboard does not work at all, not even the letters.

doctor madness 2010-10-27 08:47

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 834345)
Ok so it looks like I need to modify the internal keyboard remap to go to the language of your choice...

Hi, any news for this issue ?

eagle_linux 2010-10-27 14:28

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Hi, first of all thanks for the great scripts :)
I have some problems with them, however. After I got my bt keyboard/mouse combo (keysonic ack-540bt (de), german qwertz-layout) to work by modifying your script to use the right device name (the device name doesn't include keyboard or mouse and thus is ignored by the script) I was able to type with all keys being recognized correctly (umlauts etc.), however there are some problems left for me:
- there is no key repeat for the external keyboard
- the shift (and possibly other modifier keys?) work the way they do with the internal keyboard, i.e. holding the modifier key and typing doesn't work (modifier key is ignored), only pressing the modifier key and then the key to be modified yields the expected result
- the internal keyboard layout is appearently not correctly restored after loading the external keyboard layout, resulting in a wrong layout for the internal keyboard

Any help on this would be very much appreciated, if I can provide any more information just ask! :)

WhiteWolf 2010-10-28 08:19

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Are working well in PR 1.3?

Fixed the problem with the physical keyboard on N900? Change language when I connect my external keyboard. Spanish need in the N900 and "US-variant intl" externally. With the external does not work to change the language to Spanish.

WhiteWolf 2010-10-28 15:38

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I installed. I still have problems in the N900 integrated keypad (I change the language to connect the external keyboard).

The driver is installed for the mouse does not work. I had to replace the file. Zip file from the forum (manually).

sm8ps 2010-10-31 14:24

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Hello all!
I would like to report success (finally!) in pairing a Trust Mi-5300m bluetooth mouse. The crux had been to guess what connection code might be used. Having lost the manual, it took me a while until I got a hint when pairing the mouse with my laptop running Ubuntu. They suggested to try '0000' which indeed worked and it also did on the N900.
I had reported success also with my keyboard earlier, so now I can join in the choir of happy tablet users on my "thick iPhone" as some ignorant called it. They simply don't know what a marvel of device the N900 always was and has become thanks to qole's work.
Cheers!
St. Mueller, Switzerland

sm8ps 2010-10-31 15:08

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Hello all!

Me again, this time with some questions or wishes, respectively:

1.) Is there a specific reason to not include the command 'bt-kbd-remap' into the BT HID Connect script? I have to run that command every time I connect my keyboard and would wish to have it included into the script. (BTW, how can I do so? I do not know much about Python so I hesitate trying.)

2.) What does the BT HID Watcher script do? I cannot tell any difference if it is running from when it is not.

3.) Could the connecting of keyboard and mouse separately with BT HID Connect be joined into one step? Typically, one connects always the same keyboard and mouse to the device. That would speed up the start-up procedure. (Possibly, one could hard-code this into the script, so in the light of my previous remark, I would be thankful for some hints on how to do that.)

Cheers!
St. Mueller, Switzerland

qole 2010-11-01 00:08

Re: N900 Bluetooth Keyboard + Mouse scripts
 
sm8ps: Run the BT HID Watcher script before connecting your keyboard and mouse, and it should automatically run the bt-kbd-remap script every time your keyboard is connected. It should also run the mouse pointer script when the mouse is connected.

sm8ps 2010-11-01 20:49

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 859092)
sm8ps: Run the BT HID Watcher script before connecting your keyboard and mouse, and it should automatically run the bt-kbd-remap script every time your keyboard is connected. It should also run the mouse pointer script when the mouse is connected.

Bl**dy amazing. What a great piece of software! Thanks a lot for explaining things!
The BT HID Watcher script does things just as you described with one notable exception. Mouse and keyboard are automatically detected, and the non-generic keys work in the Maemo terminal. However, they do not work under Debian. For that I still have to run the bt-kbd-remap script which seems a bit strange to me. Is that expected behavior?
Cheers!
St. Mueller, Switzerland

superbelow 2010-11-03 17:34

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Thanks a lot for the great scripts, works well with my apple keyboard.

However still looking for a germany layout for my external bluetooth keyboard. Has anyone here created a german layout, especially for apple bluetooth keyboard?

Would be awesome if someone did ... :D

Thank you very much!

doctor madness 2010-11-04 11:04

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by superbelow (Post 862421)
Thanks a lot for the great scripts, works well with my apple keyboard.

However still looking for a germany layout for my external bluetooth keyboard. Has anyone here created a german layout, especially for apple bluetooth keyboard?

Would be awesome if someone did ... :D

Thank you very much!


+1 (for french layout)

WhiteWolf 2010-11-04 13:03

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by superbelow (Post 862421)
Thanks a lot for the great scripts, works well with my apple keyboard.

However still looking for a germany layout for my external bluetooth keyboard. Has anyone here created a german layout, especially for apple bluetooth keyboard?

Would be awesome if someone did ... :D

Thank you very much!

Request, please try to fix the problem of different languages for external keyboards.

I need Spanish and fails to configure the keyboard.

macer 2010-11-04 18:50

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Sorry but I didn't read through the entire thread but I have had good success with this minus the following using my Nokia SU8W:

1. I have to keep the phone opened otherwise the Enter key is not mapped correctly. Is there a way to map it to ^M when the phone is closed?

2. As stated in the main posting... bt-kbd-remap needs to be run manually every time the keyboard connects. Has a solution been found to have this run automatically?

I know these are minor but I sure would like this to work perfectly. I appreciate the hard work and it is nice not to have to run this manually anymore and it auto-connects just fine.

kureyon 2010-11-05 03:19

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by macer (Post 863529)
Sorry but I didn't read through the entire thread ...

You really should go through the whole thread from top to bottom because this ...

Quote:

2. As stated in the main posting... bt-kbd-remap needs to be run manually every time the keyboard connects. Has a solution been found to have this run automatically?
Has been answered a few posts ago, plus at various other places earlier in the thread.

macer 2010-11-05 03:33

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Ah. Ok. Sorry. It was 23 pages so I just wanted to know if there was a solution. I will look around and hopefully find the solution so I can just get it to run auto. Was there also a solution for mapping the ecnter key while the phone is closed? Thanks.

222 2010-11-06 10:53

Re: N900 Bluetooth Keyboard + Mouse scripts
 
@qole
Hi,
could you please make Wiki page for this package and this thread ? with Working keyboards and mice list ? and if it's possible with a FAQ section ?
then , it's easier for someone like me to find out how to connect my mouse to N900.

thanks a lot.

I've a Apple Mighty mouse, and it isn't woking with these scrips.
1-I've paired my mouse in bluetooth devices.
2-I,ve run BT HID Connect and select my mouse(it was listed).
...nothing happens.(only my mouse led indicator shows it's connected to a device)


@doctor madness (answer to the next post)

yes, but no movement in cursor ! no movement in Browser mouse icon...

doctor madness 2010-11-08 10:41

Re: N900 Bluetooth Keyboard + Mouse scripts
 
222 : did you run "Mouse cursor" ?

kwurk 2010-11-10 07:02

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I've started trying out v0.11-1 of this package after trying v0.8, and I have to say these scripts are amazing. I've since gotten a new Microsoft Bluetooth mouse 5000 since my old Rapoo had a double-clicking problem. The Microsoft mouse works perfectly "out of the box" without requiring me to edit config files in Maemo. My Think Outside Keyboard (English) works well too, all numbers, and special keys work as well.

The only problem I seem to have is that I use the same mouse for my laptop. After pairing to my N900, the mouse doesn't automatically connect to the laptop (after disconnecting from N900). I have to re-pair it in order for it to work with the laptop. After re-pairing of course, the mouse doesn't automatically connect to the N900. It seems the mouse can only remember pairing for one device at a time. Is this normal behavior?

freemangordon 2010-11-10 10:19

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by WhiteWolf (Post 863209)
Request, please try to fix the problem of different languages for external keyboards.

I need Spanish and fails to configure the keyboard.

In a matter of days i will be ready with UI for selecting external keyboard layout and languages with whatever xkeyboard-config 1.8.2 supports as language/layout. Right now i am using alpha version on my n900 with two languages - USA and Bulgarian(phonetic). It will not require any scripts to be run to configure external keyboard (PNP hopefully). When I am ready I will open an anounce thread and will post here, just a little patience.

kureyon 2010-11-10 17:59

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by kwurk (Post 868827)
It seems the mouse can only remember pairing for one device at a time. Is this normal behavior?

That seems to be the case with my logitech mouse too :(

kwurk 2010-11-11 14:17

Re: N900 Bluetooth Keyboard + Mouse scripts
 
People use to say my phone is big, now I bet they will say "man, your computer is small!" HAHA! People are so fickle.

kwurk 2010-11-12 07:45

Re: N900 Bluetooth Keyboard + Mouse scripts
 
The latest package still has the kinetic scrolling issue, correct? I noticed it kinetic scrolling issue is not as big a problem as when I had 0.8. It only seems to affect microb now (finger swiping) instead of system wide. The mouse cursor sometimes gets stuck in top left corner but I touch the screen elsewhere with my finger and it's okay. I am using Opera mobile more now when connected with bt mouse. A very nice desktop-like experience. Keep up the excellent work qole!

lifenexus 2010-11-12 14:31

Re: N900 Bluetooth Keyboard + Mouse scripts
 
uninstalling the bt scripts doesnt slove my microb scrolling issue. any clues how to fix it?

t3h 2010-11-13 10:33

Re: N900 Bluetooth Keyboard + Mouse scripts
 
I've got it working in Dvorak:

Grab us_dvorak.txt from the attachment here:
http://talk.maemo.org/showpost.php?p=37757&postcount=5

It doesn't seem to behave installed as us_dvorak, so we will override the Danish keyboard because it's abbreviated as "dk" :)

sudo gainroot
cp us_dvorak.txt /usr/share/X11/xkb/symbols/dk
cp us_dvorak.txt /usr/share/X11/xkb-chinook/symbols/dk

vi ~/.btkeyboard
Change kbdlayout=us to kbdlayout=dk

then run bt-kbd-remap.

Optional:
cd /usr/bin
ln -s bt-kbd-remap ma
(dvorak users will probably see why :) )

qole 2010-11-13 18:44

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by lifenexus (Post 871539)
uninstalling the bt scripts doesnt slove my microb scrolling issue. any clues how to fix it?

You have to uninstall the xorg-evdev-mouse ("Patched x.org mouse driver") package to restore scrolling behaviour.

Installing and uninstalling this package causes the phone to reboot.

freemangordon 2010-11-13 18:44

Re: N900 Bluetooth Keyboard + Mouse scripts
 
ok, here is what i promised :D - support for external keyboard

http://talk.maemo.org/showpost.php?p=872548&postcount=1

number41 2010-11-15 00:45

Re: N900 Bluetooth Keyboard + Mouse scripts
 
He, ¨speaking¨ (so the speak) through an Su-8w, here. =)

Ok, I´ve had some trouble with libxmuu1, and with its supporting library, libc6, which I could solve with google; the first one wouldn´t install, neither through the app manager, nor through apt-get, and the secound one also required manual download, as well as overwriting the local llibcc6 version. I´m a bit worried about these errors, but oh well.

I´ve managed to get the keyboard layout to work through xterm, but I still dont know how to create or edit a textfile in xterm, so I´m still unable to set the script to automatically set up the keyboard layout...

...which brings me to the point of this post, the keyboard layout. I´m a native speaker of portuguese, and my language is filled with diacritics, which leaves me with a serious issue, as only the ´ diacritic corectly modifies letters, as of now. ^ ` won´t modify letters; ~ won´t even show up, instead being replaced with a * .

Any help with getting the keyboard properly setup? I´m not shy of researching it on my own, but honestly, considering this thread, the mouse thread, and the Keyboard thread, when put together ammount to a staggering number of about 50 pages, I Really wouldn´t mind being pointed in the right direction...

EDIT:

Ok, I seem to have managed to get it working. I found this page, http://labs.danilocesar.com/blog/200...cents-on-n800/ , while looking at the Maemo wiki, and overwrote as instructed the su-8w file located in /usr/share/X11/xkb/symbols/nokia_vndr/ , as well as the copy located in /usr/share/X11/xkb-chinook/symbols/nokia_vndr/ .

Diacritics work fine now, and, although I´m not sure this isn´t standard behaviour, my su-8w now pairs Automatically with the device, meaning all I have to do now is run setxkbmap -device 4 -I -I/usr/share/X11/xkb-chinook -rules base -model nokiasu8w -layout us in xterm and Voikà...! Diaçrìticãl heaven, baby.

Good work on the derivers, qole. =) .

Larswad 2010-11-15 12:44

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by qole (Post 872550)
You have to uninstall the xorg-evdev-mouse ("Patched x.org mouse driver") package to restore scrolling behaviour.

Installing and uninstalling this package causes the phone to reboot.

qole: Just to make sure what you're saying here so that I don't do anything dumb. I'd like to uninstall this bt hid package. Will that be harmful so that I would end up in an endless reboot loop?
I'd like to uninstall this until the kinetic scrolling works again.

What's the correct way to uninstall, do I need to reflash everything from scratch...or?

sophocha 2010-11-15 17:37

Re: N900 Bluetooth Keyboard + Mouse scripts
 
Quote:

Originally Posted by Larswad (Post 873984)
qole: Just to make sure what you're saying here so that I don't do anything dumb. I'd like to uninstall this bt hid package. Will that be harmful so that I would end up in an endless reboot loop?
I'd like to uninstall this until the kinetic scrolling works again.

What's the correct way to uninstall, do I need to reflash everything from scratch...or?

I would also like to know this.How to properly uninstall the BT HID package.I`m experimenting with HEN and usb keyboards and mices.So far keyboard numbers are not showing up and scrolling is affected in microb.Any updates on these?

Thanks

WhiteWolf 2010-11-15 20:15

Re: N900 Bluetooth Keyboard + Mouse scripts
 
After reflash and install "xorg-evdev-mouse" my N900 does not react when I connect my BT mouse.

The external keyboard works after installing extkbd Spanish with my Apple keyboard but "BT Watch" da poblem with this application and I change the keyboard of the N900 to English.


All times are GMT. The time now is 10:58.

vBulletin® Version 3.8.8