From: Olivier Bornet <Olivier.Bornet@smartdata.ch>
To: "Michal Semler (volny.cz)" <cijoml@volny.cz>
Cc: bluez-users@lists.sourceforge.net
Subject: Re: [Bluez-users] MS Wireless keyboard scans remapping
Date: Tue, 28 Oct 2003 09:40:18 +0100 [thread overview]
Message-ID: <20031028084018.GA1875@smartdata.ch> (raw)
In-Reply-To: <200310280847.39317.cijoml@volny.cz>
[-- Attachment #1.1: Type: text/plain, Size: 985 bytes --]
Hello,
> my keyboard works now fine, but I found keys which doesn't. Looks like MS
> changed scan codes for them.
I have had this kind of problem with a Logitech diNovo Media Desktop
(http://www.logitech.com/bluetooth/). My main problems where that some
keys are not mapped correctly in the bthid-0.6 of Peter, and the code
for the mouse buttons is not OK. (at least with my Logitech Bluetooth
mouse).
The problem with the keys is that my keyboard is a swiss french one, and
the code of Peter has some keys missing. I have take the mapping from
the USB driver, and it is now working great. :-)
I have send my patches to Peter, but I have receive no answer. So, I
have attached my previous email to him. Try the patches to see if this
correct also your problem.
Good day.
Olivier
--
Olivier Bornet http://www.smartdata.ch/
Olivier.Bornet@smartdata.ch SMARTDATA SA
GPG key ID: C53D9218 CH Martigny/Lausanne
[-- Attachment #1.2: Type: message/rfc822, Size: 6276 bytes --]
[-- Attachment #1.2.1.1: Type: text/plain, Size: 3548 bytes --]
Hi Peter,
first, thanks for your bthid software. I'm trying to use it with a
Logitech bluetooth keyboard. (see http://www.logitech.com/bluetooth for
more information on it). but don't search it on the market at this
time, it is not available now. I have one sample because we work with
Logitech on it.
I have try to use bthid-0.6 today with my Debian 2.4.21-mh2 system.
Connecting the keyboard/mouse is sometime ok, sometime not. But this is
not a problem at this time, and I will search the reason why the
connection is not always ok later.
The first "major" problem I was having is with the button 1 of the
mouse. It doesn't work. I see the bluetooth packets, but nothing in X. I
have do some debuging, and all is ok now. :-) The problem was with the
number of buttons of the Logitech mouse : 8 buttons:
- 1: left
- 2: right
- 3: middle
- 4: side 1 (SIDE)
- 5: side 2 (EXTRA)
- 6: top (don't know the function, maybe "new window")
- 7: forward
- 8: backward
and the wheel.
Your code was mapping unknown button (in this case top, forward and
backward) to "primary" button left. And, as when I use the mouse all the
"buttons events" are sent to bthid whith theyre state, the buttons 6, 7
and 8 cleared the 1, event if the 1 is setted.
The attached patch correct this. Note I'm not sure this will be
necessary with the public product, as mine are alpha release product
with alpha firmeware. But if the mouse send all the buttons when one has
is state changed, this patch is necessary.
Another problem I have is the key < and > are not working. The layout of
my keyboard is fr_CH (Swiss French), and the key with < and > is on the
bottom line. Here is the bottom line:
lowercase:
SHIFT < y x c v b n m , . - SHIFT
uppercase:
SHIFT > Y X C V B N M ; : _ SHIFT
The key with the < and > has also the \ with the Alt Gr mode.
Here is the hcidump when I press and release the < key:
> ACL data: handle 0x002e flags 0x02 dlen 14
L2CAP(d): cid 0x41 len 10 [psm 19]
A1 01 00 00 64 00 00 00 00 00
> ACL data: handle 0x002e flags 0x02 dlen 14
L2CAP(d): cid 0x41 len 10 [psm 19]
A1 01 00 00 00 00 00 00 00 00
I suspect I must put something in the array hid_to_linux[], position
0x64, but I don't have search what to put at this time. (maybe next
patch ;-), but another day: I must go to sleep now. )
Other normal keys seems to work ok.
Last point. I will be happy if I can try to use the "hotkeys". I have
see this must be supported, but I don't known how. I have installed the
hotkeys package, but as I have no experience with hotkeys, I don't know
how to use it. I have try to start with:
hotkeys --type=logitech-cfo --osd=on -b --loglevel=7
but I see only the splash screen, and nothing else. The keys are routed
on the bluetooth layer, here is the hcidump -x of the "home" key:
> ACL data: handle 0x002e flags 0x02 dlen 10
L2CAP(d): cid 0x41 len 6 [psm 19]
A1 03 23 02 00 00
> ACL data: handle 0x002e flags 0x02 dlen 10
L2CAP(d): cid 0x41 len 6 [psm 19]
A1 03 00 00 00 00
Can you help me with this feature ?
Thanks in advance for your help. And thanks for bthid.
Olivier
--
Olivier Bornet | français : http://puck.ch/f
Swiss Ice Hockey Results | english : http://puck.ch/e
http://puck.ch/ | deutsch : http://puck.ch/g
Olivier.Bornet@puck.ch | italiano : http://puck.ch/i
Get my PGP-key at http://puck.ch/pgp or at http://wwwkeys.pgp.net
[-- Attachment #1.2.1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #1.3: Type: message/rfc822, Size: 4558 bytes --]
[-- Attachment #1.3.1.1.1: Type: text/plain, Size: 451 bytes --]
Hello again,
> The attached patch correct this.
Forgot the patch. Here is it.
Good day.
Olivier
--
Olivier Bornet | français : http://puck.ch/f
Swiss Ice Hockey Results | english : http://puck.ch/e
http://puck.ch/ | deutsch : http://puck.ch/g
Olivier.Bornet@puck.ch | italiano : http://puck.ch/i
Get my PGP-key at http://puck.ch/pgp or at http://wwwkeys.pgp.net
[-- Attachment #1.3.1.1.2: patch-bthid-0.6-for-lt.txt --]
[-- Type: text/plain, Size: 861 bytes --]
--- bthid-0.6-orig/hid.c 2003-04-29 22:00:53.000000000 +0200
+++ bthid-0.6/hid.c 2003-10-13 00:03:03.000000000 +0200
@@ -527,9 +527,12 @@
return;
case 0x0009: /* Buttons */
+
+ /* init */
+ butt = BTN_LEFT;
+
switch (usage & 0xffff) {
case 0: return;
- default:
case 1: butt = BTN_LEFT; break;
case 2: butt = BTN_RIGHT; break;
case 3: if (swap_buttons_2_5) return;
@@ -537,6 +540,12 @@
case 4: butt = BTN_SIDE; break;
case 5: butt = swap_buttons_2_5 ? BTN_MIDDLE : BTN_EXTRA;
break;
+ case 6: return; /* no definition in input.h ... */
+ case 7: butt = BTN_FORWARD; break;
+ case 8: butt = BTN_BACK; break;
+ default:
+ printf ("Pb. handling 0x%04lx", usage & 0xffff);
+ break;
}
buttmask = 1 << butt - BTN_MOUSE;
if (val && !(mouse_butt & buttmask)) {
[-- Attachment #1.3.1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #1.4: Type: message/rfc822, Size: 7924 bytes --]
[-- Attachment #1.4.1.1.1: Type: text/plain, Size: 877 bytes --]
Hello,
On Mon, Oct 13, 2003 at 01:27:55AM +0200, Olivier Bornet wrote:
> Another problem I have is the key < and > are not working. The layout of
> my keyboard is fr_CH (Swiss French), and the key with < and > is on the
> bottom line.
I have find a solution for this problem: use the same array as the usb
one (hid_keyboard from /usr/src/linux/drivers/usb/hid-input.c). This is
working great for me will all the "normal" keys. (don't know how to
enable hotkeys).
The patch for this is attached.
Good day.
Olivier
--
Olivier Bornet | français : http://puck.ch/f
Swiss Ice Hockey Results | english : http://puck.ch/e
http://puck.ch/ | deutsch : http://puck.ch/g
Olivier.Bornet@puck.ch | italiano : http://puck.ch/i
Get my PGP-key at http://puck.ch/pgp or at http://wwwkeys.pgp.net
[-- Attachment #1.4.1.1.2: patch-bthid-0.6-for-lt-kbd-sf.txt --]
[-- Type: text/plain, Size: 3600 bytes --]
--- bthid-0.6-orig/hid.c 2003-04-29 22:00:53.000000000 +0200
+++ bthid-0.6/hid.c 2003-10-14 08:58:25.000000000 +0200
@@ -369,46 +369,26 @@
static int any_keyboard;
-static int hid_to_linux [256] = {
-
-/* 0x00 */ 0 /* no event */, 0 /* rollover error */, 0 /* POST fail */,
- 0 /* undefined error */, KEY_A, KEY_B, KEY_C, KEY_D,
-/* 0x08 */ KEY_E, KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, KEY_K, KEY_L,
-/* 0x10 */ KEY_M, KEY_N, KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T,
-/* 0x18 */ KEY_U, KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_1, KEY_2,
-/* 0x20 */ KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0,
-/* 0x28 */ KEY_ENTER, KEY_ESC, KEY_BACKSPACE, KEY_TAB,
- KEY_SPACE, KEY_MINUS, KEY_EQUAL, KEY_LEFTBRACE,
-/* 0x30 */ KEY_RIGHTBRACE, KEY_BACKSLASH, 0, KEY_SEMICOLON,
- KEY_APOSTROPHE, KEY_GRAVE, KEY_COMMA, KEY_DOT,
-/* 0x38 */ KEY_SLASH, KEY_CAPSLOCK, KEY_F1, KEY_F2,
- KEY_F3, KEY_F4, KEY_F5, KEY_F6,
-/* 0x40 */ KEY_F7, KEY_F8, KEY_F9, KEY_F10,
- KEY_F11, KEY_F12, KEY_SYSRQ, KEY_SCROLLLOCK,
-/* 0x48 */ KEY_PAUSE, KEY_INSERT, KEY_HOME, KEY_PAGEUP,
- KEY_DELETE, KEY_END, KEY_PAGEDOWN, KEY_RIGHT,
-/* 0x50 */ KEY_LEFT, KEY_DOWN, KEY_UP, KEY_NUMLOCK,
- KEY_KPSLASH, KEY_KPASTERISK, KEY_KPMINUS, KEY_KPPLUS,
-/* 0x58 */ KEY_KPENTER, KEY_KP1, KEY_KP2, KEY_KP3,
- KEY_KP4, KEY_KP5, KEY_KP6, KEY_KP7,
-/* 0x60 */ KEY_KP8, KEY_KP9, KEY_KP0, KEY_KPDOT, 0, 0, 0, 0,
-/* pmk!! fill these in, even though my keyboard doesn't use them... */
-/* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0xe0 */ KEY_LEFTCTRL, KEY_LEFTSHIFT, KEY_LEFTALT,
- KEY_LEFTMETA, /* Would COMPOSE be better? */
- KEY_RIGHTCTRL, KEY_RIGHTSHIFT, KEY_RIGHTALT, 0,
-/* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0,
-/* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+#define unk KEY_UNKNOWN
+static unsigned char hid_to_linux [256] = {
+ 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
+ 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26,
+ 27, 43, 84, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 87, 88, 99, 70,119,110,102,104,111,107,109,106,
+ 105,108,103, 69, 98, 55, 74, 78, 96, 79, 80, 81, 75, 76, 77, 71,
+ 72, 73, 82, 83, 86,127,116,117, 85, 89, 90, 91, 92, 93, 94, 95,
+ 120,121,122,123,134,138,130,132,128,129,131,137,133,135,136,113,
+ 115,114,unk,unk,unk,124,unk,181,182,183,184,185,186,187,188,189,
+ 190,191,192,193,194,195,196,197,198,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
+ 29, 42, 56,125, 97, 54,100,126,164,166,165,163,161,115,114,113,
+ 150,158,159,128,136,177,178,176,142,152,173,140,unk,unk,unk,unk
};
-
static int hid_dvorak_to_linux [256] = {
/* 0x00 */ 0 /* no event */, 0 /* rollover error */, 0 /* POST fail */,
[-- Attachment #1.4.1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-10-28 8:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-28 7:47 [Bluez-users] MS Wireless keyboard scans remapping Michal Semler (volny.cz)
2003-10-28 8:40 ` Olivier Bornet [this message]
2003-10-28 18:34 ` Marcel Holtmann
2003-10-28 20:05 ` Michal Semler (volny.cz)
2003-10-28 20:14 ` Marcel Holtmann
2003-10-28 23:23 ` Olivier Bornet
2003-10-29 0:16 ` Marcel Holtmann
2003-10-29 9:24 ` diNovo LT information Olivier Bornet
2003-10-29 11:56 ` [Bluez-users] " Marcel Holtmann
2003-10-29 14:45 ` Olivier Bornet
2003-10-28 10:39 ` [Bluez-users] MS Wireless keyboard scans remapping Gareth Reakes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031028084018.GA1875@smartdata.ch \
--to=olivier.bornet@smartdata.ch \
--cc=bluez-users@lists.sourceforge.net \
--cc=cijoml@volny.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.