To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
or, via email, send a message with subject or body 'help' to
freebsd-u...@freebsd.org
You can reach the person managing the list at
freebsd-...@freebsd.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-usb digest..."
Today's Topics:
1. Re: usb/144414: Apple "Fn" key doesn't work properly
(Hans Petter Selasky)
2. Re: usb/144414: Apple "Fn" key doesn't work properly
(Steven Noonan)
3. Re: usb/144414: Apple "Fn" key doesn't work properly
(Steven Noonan)
4. Re: usb/144414: Apple "Fn" key doesn't work properly
(Hans Petter Selasky)
5. Re: usb/144414: Apple "Fn" key doesn't work properly
(Hans Petter Selasky)
6. Re: usb/144414: Apple "Fn" key doesn't work properly
(Steven Noonan)
7. Re: usb/144414: Apple "Fn" key doesn't work properly
(Steven Noonan)
8. Re: usb/144414: Apple "Fn" key doesn't work properly
(Hans Petter Selasky)
9. Re: usb/144414: Apple "Fn" key doesn't work properly (Kai Wang)
10. Re: usb/144414: Apple "Fn" key doesn't work properly
(Steven Noonan)
11. Re: usb/144414: Apple "Fn" key doesn't work properly
(Hans Petter Selasky)
12. Re: usb/144414: Apple "Fn" key doesn't work properly (Kai Wang)
13. Re: usb/144414: Apple "Fn" key doesn't work properly
(Steven Noonan)
14. [current] could not attach n900 (mass storage mode) at high
speed (Andrey Kosachenko)
15. Re: usb/144414: Apple "Fn" key doesn't work properly
(Hans Petter Selasky)
16. Re: usb/144414: Apple "Fn" key doesn't work properly
(Steven Noonan)
----------------------------------------------------------------------
Message: 1
Date: Sun, 14 Mar 2010 14:00:18 GMT
From: Hans Petter Selasky <hsel...@c2i.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: freeb...@FreeBSD.org
Message-ID: <201003141400....@freefall.freebsd.org>
The following reply was made to PR usb/144414; it has been noted by GNATS.
From: Hans Petter Selasky <hsel...@c2i.net>
To: Steven Noonan <ste...@uplinklabs.net>
Cc: freeb...@freebsd.org,
freebsd-gn...@freebsd.org,
Christoph Langguth <chri...@rosenkeller.org>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
Date: Sun, 14 Mar 2010 14:48:30 +0100
On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
wrote:
> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> The following reply was made to PR usb/144414; it has been noted by
> >> GNATS.
> >>
> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> To: per...@pluto.rain.com
> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >>
> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan <ste...@uplinklabs.net>
> >> wrot=
> >>
> >> e:
> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> <ste...@uplinklabs.net> > wr=
> >>
> >> ote:
> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
> >> >>>> Interestingly, my tilde key doesn't work either (though the key
> >> >>>> press is detected, no character shows when the key is pressed).
> >> >>>
> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
> >> >>> tilde followed by n do you get an n with a tilde over it?
> >> >>
> >> >> Nope. It simply does nothing in the console.
> >> >>
> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
> >> don't >> even know what action. It's grabbing some arbitrary command in
> >> my >> .bash_history. It gave me the first item in my .bash_history the
> >> first >> time I tried it. Then I tried an arbitrary command ("echo"),
> >> and then >> Alt+Tilde gave me the second command in my .bash_history.
> >> Whaa?
> >>
> >> Any more ideas/news on this from anyone?
> >>
> >> The tilde key thing is especially irritating.
> >
> > static uint8_t
> > ukbd_apple_swap(uint8_t keycode) {
> > switch (keycode) {
> > case 0x35: return 0x64;
> > case 0x64: return 0x35;
> > default: return keycode;
> > }
> > }
> >
> > Can you try to change the function above in ukbd.c to only return
> > keycode? Any difference?
>
> Yep, commenting the two case lines brought my tilde key back. Any idea
> what the ukbd_apple_swap() function was _supposed_ to be doing?
>
> Also, there's only one thing left (input-wise) that I can't get to
> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
> that it's not a problem with Fn+Backspace failing to map to Delete,
> because my non-Mac i386 box has the same problem.
>
> Everything I read online keeps saying to muck with an .inputrc file
> (for bash, anyway), but I haven't been able to get it to work. Places
> I've looked have said to add this to .inputrc:
>
> "\e[3~": delete-char
>
> But this seems to have no effect (and I tried bind -f .inputrc in case
> my INPUTRC environment variable wasn't working). Is there something
> FreeBSD-specific I'm not seeing, or what?
>
> - Steven
>
Hi Steven,
Can you talk this over with Christoph and send me a patch when you agreed?
He's the one that made the Apple-SWAP key patch. Meanwhile I suggest the
following patch:
==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
src/sys/dev/usb/input/ukbd.c ====
@@ -896,8 +896,7 @@
hid_input, 0, &sc->sc_loc_apple_fn, &flags,
&temp_id)) {
if (flags & HIO_VARIABLE)
- sc->sc_flags |= UKBD_FLAG_APPLE_FN |
- UKBD_FLAG_APPLE_SWAP;
+ sc->sc_flags |= UKBD_FLAG_APPLE_FN;
DPRINTFN(1, "Found Apple FN-key\n");
apple_keys = 1;
sc->sc_kbd_id = temp_id;
The hardware that Christoph was using had an Eject-key, while yours didn't. I
think the patch above will make both cases work.
Christoph, do you have any comments?
http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/dev/usb/input/ukbd.c&REV=47
--HPS
------------------------------
Message: 2
Date: Sun, 14 Mar 2010 06:01:39 -0800
From: Steven Noonan <ste...@uplinklabs.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Hans Petter Selasky <hsel...@c2i.net>
Cc: Christoph Langguth <chri...@rosenkeller.org>,
freebsd-gn...@freebsd.org, freeb...@freebsd.org
Message-ID:
<f488382f1003140701s7fd...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net> wrote:
> On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
>> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
> wrote:
>> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
>> >> The following reply was made to PR usb/144414; it has been noted by
>> >> GNATS.
>> >>
>> >> From: Steven Noonan <ste...@uplinklabs.net>
>> >> To: per...@pluto.rain.com
>> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
>> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
>> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
>> >>
>> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan <ste...@uplinklabs.net>
>> >> wrot=
>> >>
>> >> e:
>> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
>> >> <ste...@uplinklabs.net> > wr=
>> >>
>> >> ote:
>> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
>> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
>> >> >>>> Interestingly, my tilde key doesn't work either (though the key
>> >> >>>> press is detected, no character shows when the key is pressed).
>> >> >>>
>> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
>> >> >>> tilde followed by n do you get an n with a tilde over it?
>> >> >>
>> >> >> Nope. It simply does nothing in the console.
>> >> >>
>> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
>> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
>> >> don't >> even know what action. It's grabbing some arbitrary command in
>> >> my >> .bash_history. It gave me the first item in my .bash_history the
>> >> first >> time I tried it. Then I tried an arbitrary command ("echo"),
>> >> and then >> Alt+Tilde gave me the second command in my .bash_history.
>> >> Whaa?
>> >>
>> >> Any more ideas/news on this from anyone?
>> >>
>> >> The tilde key thing is especially irritating.
>> >
>> > static uint8_t
>> > ukbd_apple_swap(uint8_t keycode) {
>> > switch (keycode) {
>> > case 0x35: return 0x64;
>> > case 0x64: return 0x35;
>> > default: return keycode;
>> > }
>> > }
>> >
>> > Can you try to change the function above in ukbd.c to only return
>> > keycode? Any difference?
>>
>> Yep, commenting the two case lines brought my tilde key back. Any idea
>> what the ukbd_apple_swap() function was _supposed_ to be doing?
>>
>> Also, there's only one thing left (input-wise) that I can't get to
>> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
>> that it's not a problem with Fn+Backspace failing to map to Delete,
>> because my non-Mac i386 box has the same problem.
>>
>> Everything I read online keeps saying to muck with an .inputrc file
>> (for bash, anyway), but I haven't been able to get it to work. Places
>> I've looked have said to add this to .inputrc:
>>
>> "\e[3~": delete-char
>>
>> But this seems to have no effect (and I tried bind -f .inputrc in case
>> my INPUTRC environment variable wasn't working). Is there something
>> FreeBSD-specific I'm not seeing, or what?
>>
>> - Steven
>>
>
> Hi Steven,
>
> Can you talk this over with Christoph and send me a patch when you agreed?
> He's the one that made the Apple-SWAP key patch. Meanwhile I suggest the
> following patch:
>
> ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> src/sys/dev/usb/input/ukbd.c ====
> @@ -896,8 +896,7 @@
> hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> &temp_id)) {
> if (flags & HIO_VARIABLE)
> - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
> - UKBD_FLAG_APPLE_SWAP;
> + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> DPRINTFN(1, "Found Apple FN-key\n");
> apple_keys = 1;
> sc->sc_kbd_id = temp_id;
>
>
> The hardware that Christoph was using had an Eject-key, while yours didn't. I
> think the patch above will make both cases work.
>
> Christoph, do you have any comments?
>
> http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/dev/usb/input/ukbd.c&REV=47
>
Not quite true, my keyboard _does_ have an Eject key. The code doesn't
detect it though.
- Steven
------------------------------
Message: 3
Date: Sun, 14 Mar 2010 14:10:04 GMT
From: Steven Noonan <ste...@uplinklabs.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: freeb...@FreeBSD.org
Message-ID: <201003141410....@freefall.freebsd.org>
The following reply was made to PR usb/144414; it has been noted by GNATS.
From: Steven Noonan <ste...@uplinklabs.net>
To: Hans Petter Selasky <hsel...@c2i.net>
Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org,
Christoph Langguth <chri...@rosenkeller.org>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
Date: Sun, 14 Mar 2010 06:01:39 -0800
On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net> wro=
te:
> On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
>> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
> wrote:
>> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
>> >> The following reply was made to PR usb/144414; it has been noted by
>> >> GNATS.
>> >>
>> >> From: Steven Noonan <ste...@uplinklabs.net>
>> >> To: per...@pluto.rain.com
>> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
>> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
>> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
>> >>
>> >> =C2=A0On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan <steven@uplinkla=
bs.net>
>> >> =C2=A0wrot=3D
>> >>
>> >> =C2=A0e:
>> >> =C2=A0> On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
>> >> <ste...@uplinklabs.net> > wr=3D
>> >>
>> >> =C2=A0ote:
>> >> =C2=A0>> On Wed, Mar 3, 2010 at 10:36 PM, =3DC2=3DA0<per...@pluto.rai=
n.com>
>> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
>> >> =C2=A0>>>> Interestingly, my tilde key doesn't work either (though th=
e key
>> >> =C2=A0>>>> press is detected, no character shows when the key is pres=
sed).
>> >> =C2=A0>>>
>> >> =C2=A0>>> Any chance it is configured as a "dead" key? =3DC2=3DA0If y=
ou press
>> >> =C2=A0>>> tilde followed by n do you get an n with a tilde over it?
>> >> =C2=A0>>
>> >> =C2=A0>> Nope. It simply does nothing in the console.
>> >> =C2=A0>>
>> >> =C2=A0>> But in X11, it does something very odd. Shift+Tilde Key give=
s me
>> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
>> >> don't >> even know what action. It's grabbing some arbitrary command =
in
>> >> my >> .bash_history. It gave me the first item in my .bash_history th=
e
>> >> first >> time I tried it. Then I tried an arbitrary command ("echo"),
>> >> and then >> Alt+Tilde gave me the second command in my .bash_history.
>> >> Whaa?
>> >>
>> >> =C2=A0Any more ideas/news on this from anyone?
>> >>
>> >> =C2=A0The tilde key thing is especially irritating.
>> >
>> > static uint8_t
>> > ukbd_apple_swap(uint8_t keycode) {
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (keycode) {
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x35: return 0x64;
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x64: return 0x35;
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0default: return keycode;
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>> > }
>> >
>> > Can you try to change the function above in ukbd.c to only return
>> > keycode? Any difference?
>>
>> Yep, commenting the two case lines brought my tilde key back. Any idea
>> what the ukbd_apple_swap() function was _supposed_ to be doing?
>>
>> Also, there's only one thing left (input-wise) that I can't get to
>> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
>> that it's not a problem with Fn+Backspace failing to map to Delete,
>> because my non-Mac i386 box has the same problem.
>>
>> Everything I read online keeps saying to muck with an .inputrc file
>> (for bash, anyway), but I haven't been able to get it to work. Places
>> I've looked have said to add this to .inputrc:
>>
>> "\e[3~": delete-char
>>
>> But this seems to have no effect (and I tried bind -f .inputrc in case
>> my INPUTRC environment variable wasn't working). Is there something
>> FreeBSD-specific I'm not seeing, or what?
>>
>> - Steven
>>
>
> Hi Steven,
>
> Can you talk this over with Christoph and send me a patch when you agreed=
?
> He's the one that made the Apple-SWAP key patch. Meanwhile I suggest the
> following patch:
>
> =3D=3D=3D=3D //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> src/sys/dev/usb/input/ukbd.c =3D=3D=3D=3D
> @@ -896,8 +896,7 @@
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hid_=
input, 0, &sc->sc_loc_apple_fn, &flags,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&tem=
p_id)) {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0if (flags & HIO_VARIABLE)
> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sc->sc_flags |=3D UKBD_FLAG_APPLE_FN |
> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 UKBD_FLAG_APPLE_SWAP;
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sc->sc_flags |=3D UKBD_FLAG_APPLE_FN;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0DPRINTFN(1, "Found Apple FN-key\n");
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0apple_keys =3D 1;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0sc->sc_kbd_id =3D temp_id;
>
>
> The hardware that Christoph was using had an Eject-key, while yours didn'=
t. I
> think the patch above will make both cases work.
>
> Christoph, do you have any comments?
>
> http://p4db.freebsd.org/fileViewer.cgi?FSPC=3D//depot/projects/usb/src/sy=
s/dev/usb/input/ukbd.c&REV=3D47
>
Not quite true, my keyboard _does_ have an Eject key. The code doesn't
detect it though.
- Steven
------------------------------
Message: 4
Date: Sun, 14 Mar 2010 15:27:37 +0100
From: Hans Petter Selasky <hsel...@c2i.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Steven Noonan <ste...@uplinklabs.net>
Cc: Christoph Langguth <chri...@rosenkeller.org>,
freebsd-gn...@freebsd.org, freeb...@freebsd.org
Message-ID: <201003141527....@c2i.net>
Content-Type: Text/Plain; charset="utf-8"
On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
wrote:
> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
> >
> > wrote:
> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> >> The following reply was made to PR usb/144414; it has been noted by
> >> >> GNATS.
> >> >>
> >> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> >> To: per...@pluto.rain.com
> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >> >>
> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
> >> >> <ste...@uplinklabs.net> wrot=
> >> >>
> >> >> e:
> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> >> <ste...@uplinklabs.net> > wr=
> >> >>
> >> >> ote:
> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
> >> >> >>>> Interestingly, my tilde key doesn't work either (though the key
> >> >> >>>> press is detected, no character shows when the key is pressed).
> >> >> >>>
> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
> >> >> >>> tilde followed by n do you get an n with a tilde over it?
> >> >> >>
> >> >> >> Nope. It simply does nothing in the console.
> >> >> >>
> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
> >> >> don't >> even know what action. It's grabbing some arbitrary command
> >> >> in my >> .bash_history. It gave me the first item in my .bash_history
> >> >> the first >> time I tried it. Then I tried an arbitrary command
> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in my
> >> >> .bash_history. Whaa?
> >> >>
> >> >> Any more ideas/news on this from anyone?
> >> >>
> >> >> The tilde key thing is especially irritating.
> >> >
> >> > static uint8_t
> >> > ukbd_apple_swap(uint8_t keycode) {
> >> > switch (keycode) {
> >> > case 0x35: return 0x64;
> >> > case 0x64: return 0x35;
> >> > default: return keycode;
> >> > }
> >> > }
> >> >
> >> > Can you try to change the function above in ukbd.c to only return
> >> > keycode? Any difference?
> >>
> >> Yep, commenting the two case lines brought my tilde key back. Any idea
> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
> >>
> >> Also, there's only one thing left (input-wise) that I can't get to
> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
> >> that it's not a problem with Fn+Backspace failing to map to Delete,
> >> because my non-Mac i386 box has the same problem.
> >>
> >> Everything I read online keeps saying to muck with an .inputrc file
> >> (for bash, anyway), but I haven't been able to get it to work. Places
> >> I've looked have said to add this to .inputrc:
> >>
> >> "\e[3~": delete-char
> >>
> >> But this seems to have no effect (and I tried bind -f .inputrc in case
> >> my INPUTRC environment variable wasn't working). Is there something
> >> FreeBSD-specific I'm not seeing, or what?
> >>
> >> - Steven
> >
> > Hi Steven,
> >
> > Can you talk this over with Christoph and send me a patch when you
> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
> > suggest the following patch:
> >
> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> > src/sys/dev/usb/input/ukbd.c ====
> > @@ -896,8 +896,7 @@
> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> > &temp_id)) {
> > if (flags & HIO_VARIABLE)
> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
> > - UKBD_FLAG_APPLE_SWAP;
> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> > DPRINTFN(1, "Found Apple FN-key\n");
> > apple_keys = 1;
> > sc->sc_kbd_id = temp_id;
> >
> >
> > The hardware that Christoph was using had an Eject-key, while yours
> > didn't. I think the patch above will make both cases work.
> >
> > Christoph, do you have any comments?
> >
> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/
> >dev/usb/input/ukbd.c&REV=47
>
> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
> detect it though.
>
> - Steven
>
Could you try to figure out what key-press number corresponds to the eject
key?
--HPS
------------------------------
Message: 5
Date: Sun, 14 Mar 2010 14:30:12 GMT
From: Hans Petter Selasky <hsel...@c2i.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: freeb...@FreeBSD.org
Message-ID: <201003141430....@freefall.freebsd.org>
The following reply was made to PR usb/144414; it has been noted by GNATS.
From: Hans Petter Selasky <hsel...@c2i.net>
To: Steven Noonan <ste...@uplinklabs.net>
Cc: freeb...@freebsd.org,
freebsd-gn...@freebsd.org,
Christoph Langguth <chri...@rosenkeller.org>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
Date: Sun, 14 Mar 2010 15:27:37 +0100
On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
wrote:
> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
> >
> > wrote:
> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> >> The following reply was made to PR usb/144414; it has been noted by
> >> >> GNATS.
> >> >>
> >> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> >> To: per...@pluto.rain.com
> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >> >>
> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
> >> >> <ste...@uplinklabs.net> wrot=
> >> >>
> >> >> e:
> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> >> <ste...@uplinklabs.net> > wr=
> >> >>
> >> >> ote:
> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
> >> >> >>>> Interestingly, my tilde key doesn't work either (though the key
> >> >> >>>> press is detected, no character shows when the key is pressed).
> >> >> >>>
> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
> >> >> >>> tilde followed by n do you get an n with a tilde over it?
> >> >> >>
> >> >> >> Nope. It simply does nothing in the console.
> >> >> >>
> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
> >> >> don't >> even know what action. It's grabbing some arbitrary command
> >> >> in my >> .bash_history. It gave me the first item in my .bash_history
> >> >> the first >> time I tried it. Then I tried an arbitrary command
> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in my
> >> >> .bash_history. Whaa?
> >> >>
> >> >> Any more ideas/news on this from anyone?
> >> >>
> >> >> The tilde key thing is especially irritating.
> >> >
> >> > static uint8_t
> >> > ukbd_apple_swap(uint8_t keycode) {
> >> > switch (keycode) {
> >> > case 0x35: return 0x64;
> >> > case 0x64: return 0x35;
> >> > default: return keycode;
> >> > }
> >> > }
> >> >
> >> > Can you try to change the function above in ukbd.c to only return
> >> > keycode? Any difference?
> >>
> >> Yep, commenting the two case lines brought my tilde key back. Any idea
> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
> >>
> >> Also, there's only one thing left (input-wise) that I can't get to
> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
> >> that it's not a problem with Fn+Backspace failing to map to Delete,
> >> because my non-Mac i386 box has the same problem.
> >>
> >> Everything I read online keeps saying to muck with an .inputrc file
> >> (for bash, anyway), but I haven't been able to get it to work. Places
> >> I've looked have said to add this to .inputrc:
> >>
> >> "\e[3~": delete-char
> >>
> >> But this seems to have no effect (and I tried bind -f .inputrc in case
> >> my INPUTRC environment variable wasn't working). Is there something
> >> FreeBSD-specific I'm not seeing, or what?
> >>
> >> - Steven
> >
> > Hi Steven,
> >
> > Can you talk this over with Christoph and send me a patch when you
> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
> > suggest the following patch:
> >
> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> > src/sys/dev/usb/input/ukbd.c ====
> > @@ -896,8 +896,7 @@
> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> > &temp_id)) {
> > if (flags & HIO_VARIABLE)
> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
> > - UKBD_FLAG_APPLE_SWAP;
> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> > DPRINTFN(1, "Found Apple FN-key\n");
> > apple_keys = 1;
> > sc->sc_kbd_id = temp_id;
> >
> >
> > The hardware that Christoph was using had an Eject-key, while yours
> > didn't. I think the patch above will make both cases work.
> >
> > Christoph, do you have any comments?
> >
> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/
> >dev/usb/input/ukbd.c&REV=47
>
> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
> detect it though.
>
> - Steven
>
Could you try to figure out what key-press number corresponds to the eject
key?
--HPS
------------------------------
Message: 6
Date: Sun, 14 Mar 2010 06:37:04 -0800
From: Steven Noonan <ste...@uplinklabs.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Hans Petter Selasky <hsel...@c2i.net>
Cc: Christoph Langguth <chri...@rosenkeller.org>,
freebsd-gn...@freebsd.org, freeb...@freebsd.org
Message-ID:
<f488382f1003140737v2de...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net> wrote:
> On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
>> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
> wrote:
>> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
>> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
>> >
>> > wrote:
>> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
>> >> >> The following reply was made to PR usb/144414; it has been noted by
>> >> >> GNATS.
>> >> >>
>> >> >> From: Steven Noonan <ste...@uplinklabs.net>
>> >> >> To: per...@pluto.rain.com
>> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
>> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
>> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
>> >> >>
>> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
>> >> >> <ste...@uplinklabs.net> wrot=
>> >> >>
>> >> >> e:
>> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
>> >> >> <ste...@uplinklabs.net> > wr=
>> >> >>
>> >> >> ote:
>> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
>> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
>> >> >> >>>> Interestingly, my tilde key doesn't work either (though the key
>> >> >> >>>> press is detected, no character shows when the key is pressed).
>> >> >> >>>
>> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
>> >> >> >>> tilde followed by n do you get an n with a tilde over it?
>> >> >> >>
>> >> >> >> Nope. It simply does nothing in the console.
>> >> >> >>
>> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
>> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
>> >> >> don't >> even know what action. It's grabbing some arbitrary command
>> >> >> in my >> .bash_history. It gave me the first item in my .bash_history
>> >> >> the first >> time I tried it. Then I tried an arbitrary command
>> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in my
>> >> >> .bash_history. Whaa?
>> >> >>
>> >> >> Any more ideas/news on this from anyone?
>> >> >>
>> >> >> The tilde key thing is especially irritating.
>> >> >
>> >> > static uint8_t
>> >> > ukbd_apple_swap(uint8_t keycode) {
>> >> > switch (keycode) {
>> >> > case 0x35: return 0x64;
>> >> > case 0x64: return 0x35;
>> >> > default: return keycode;
>> >> > }
>> >> > }
>> >> >
>> >> > Can you try to change the function above in ukbd.c to only return
>> >> > keycode? Any difference?
>> >>
>> >> Yep, commenting the two case lines brought my tilde key back. Any idea
>> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
>> >>
>> >> Also, there's only one thing left (input-wise) that I can't get to
>> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
>> >> that it's not a problem with Fn+Backspace failing to map to Delete,
>> >> because my non-Mac i386 box has the same problem.
>> >>
>> >> Everything I read online keeps saying to muck with an .inputrc file
>> >> (for bash, anyway), but I haven't been able to get it to work. Places
>> >> I've looked have said to add this to .inputrc:
>> >>
>> >> "\e[3~": delete-char
>> >>
>> >> But this seems to have no effect (and I tried bind -f .inputrc in case
>> >> my INPUTRC environment variable wasn't working). Is there something
>> >> FreeBSD-specific I'm not seeing, or what?
>> >>
>> >> - Steven
>> >
>> > Hi Steven,
>> >
>> > Can you talk this over with Christoph and send me a patch when you
>> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
>> > suggest the following patch:
>> >
>> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
>> > src/sys/dev/usb/input/ukbd.c ====
>> > @@ -896,8 +896,7 @@
>> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
>> > &temp_id)) {
>> > if (flags & HIO_VARIABLE)
>> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
>> > - UKBD_FLAG_APPLE_SWAP;
>> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
>> > DPRINTFN(1, "Found Apple FN-key\n");
>> > apple_keys = 1;
>> > sc->sc_kbd_id = temp_id;
>> >
>> >
>> > The hardware that Christoph was using had an Eject-key, while yours
>> > didn't. I think the patch above will make both cases work.
>> >
>> > Christoph, do you have any comments?
>> >
>> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/
>> >dev/usb/input/ukbd.c&REV=47
>>
>> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
>> detect it though.
>>
>> - Steven
>>
>
> Could you try to figure out what key-press number corresponds to the eject
> key?
>
> --HPS
>
I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
problem: unless it detects that the key is there, I can't find it.
Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
pressed.
- Steven
------------------------------
Message: 7
Date: Sun, 14 Mar 2010 14:40:03 GMT
From: Steven Noonan <ste...@uplinklabs.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: freeb...@FreeBSD.org
Message-ID: <201003141440....@freefall.freebsd.org>
The following reply was made to PR usb/144414; it has been noted by GNATS.
From: Steven Noonan <ste...@uplinklabs.net>
To: Hans Petter Selasky <hsel...@c2i.net>
Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org,
Christoph Langguth <chri...@rosenkeller.org>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
Date: Sun, 14 Mar 2010 06:37:04 -0800
On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net> wro=
te:
> On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
>> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
> wrote:
>> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
>> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.ne=
t>
>> >
>> > wrote:
>> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
>> >> >> The following reply was made to PR usb/144414; it has been noted b=
y
>> >> >> GNATS.
>> >> >>
>> >> >> From: Steven Noonan <ste...@uplinklabs.net>
>> >> >> To: per...@pluto.rain.com
>> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
>> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
>> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
>> >> >>
>> >> >> =C2=A0On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
>> >> >> <ste...@uplinklabs.net> wrot=3D
>> >> >>
>> >> >> =C2=A0e:
>> >> >> =C2=A0> On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
>> >> >> <ste...@uplinklabs.net> > wr=3D
>> >> >>
>> >> >> =C2=A0ote:
>> >> >> =C2=A0>> On Wed, Mar 3, 2010 at 10:36 PM, =3DC2=3DA0<perryh@pluto.=
rain.com>
>> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
>> >> >> =C2=A0>>>> Interestingly, my tilde key doesn't work either (though=
the key
>> >> >> =C2=A0>>>> press is detected, no character shows when the key is p=
ressed).
>> >> >> =C2=A0>>>
>> >> >> =C2=A0>>> Any chance it is configured as a "dead" key? =3DC2=3DA0I=
f you press
>> >> >> =C2=A0>>> tilde followed by n do you get an n with a tilde over it=
?
>> >> >> =C2=A0>>
>> >> >> =C2=A0>> Nope. It simply does nothing in the console.
>> >> >> =C2=A0>>
>> >> >> =C2=A0>> But in X11, it does something very odd. Shift+Tilde Key g=
ives me
>> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What=
? I
>> >> >> don't >> even know what action. It's grabbing some arbitrary comma=
nd
>> >> >> in my >> .bash_history. It gave me the first item in my .bash_hist=
ory
>> >> >> the first >> time I tried it. Then I tried an arbitrary command
>> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in my
>> >> >> .bash_history. Whaa?
>> >> >>
>> >> >> =C2=A0Any more ideas/news on this from anyone?
>> >> >>
>> >> >> =C2=A0The tilde key thing is especially irritating.
>> >> >
>> >> > static uint8_t
>> >> > ukbd_apple_swap(uint8_t keycode) {
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (keycode) {
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x35: return 0x64;
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x64: return 0x35;
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0default: return keycode;
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>> >> > }
>> >> >
>> >> > Can you try to change the function above in ukbd.c to only return
>> >> > keycode? Any difference?
>> >>
>> >> Yep, commenting the two case lines brought my tilde key back. Any ide=
a
>> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
>> >>
>> >> Also, there's only one thing left (input-wise) that I can't get to
>> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
>> >> that it's not a problem with Fn+Backspace failing to map to Delete,
>> >> because my non-Mac i386 box has the same problem.
>> >>
>> >> Everything I read online keeps saying to muck with an .inputrc file
>> >> (for bash, anyway), but I haven't been able to get it to work. Places
>> >> I've looked have said to add this to .inputrc:
>> >>
>> >> "\e[3~": delete-char
>> >>
>> >> But this seems to have no effect (and I tried bind -f .inputrc in cas=
e
>> >> my INPUTRC environment variable wasn't working). Is there something
>> >> FreeBSD-specific I'm not seeing, or what?
>> >>
>> >> - Steven
>> >
>> > Hi Steven,
>> >
>> > Can you talk this over with Christoph and send me a patch when you
>> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
>> > suggest the following patch:
>> >
>> > =3D=3D=3D=3D //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
>> > src/sys/dev/usb/input/ukbd.c =3D=3D=3D=3D
>> > @@ -896,8 +896,7 @@
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0h=
id_input, 0, &sc->sc_loc_apple_fn, &flags,
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&=
temp_id)) {
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0if (flags & HIO_VARIABLE)
>> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sc->sc_flags |=3D UKBD_FLAG_APPLE_FN=
|
>> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 UKBD_FLAG_APPLE_SWAP;
>> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sc->sc_flags |=3D UKBD_FLAG_APPLE_FN=
;
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0DPRINTFN(1, "Found Apple FN-key\n");
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0apple_keys =3D 1;
>> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0sc->sc_kbd_id =3D temp_id;
>> >
>> >
>> > The hardware that Christoph was using had an Eject-key, while yours
>> > didn't. I think the patch above will make both cases work.
>> >
>> > Christoph, do you have any comments?
>> >
>> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=3D//depot/projects/usb/src=
/sys/
>> >dev/usb/input/ukbd.c&REV=3D47
>>
>> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
>> detect it though.
>>
>> - Steven
>>
>
> Could you try to figure out what key-press number corresponds to the ejec=
t
> key?
>
> --HPS
>
I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
problem: unless it detects that the key is there, I can't find it.
Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
pressed.
- Steven
------------------------------
Message: 8
Date: Sun, 14 Mar 2010 15:43:19 +0100
From: Hans Petter Selasky <hsel...@c2i.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Steven Noonan <ste...@uplinklabs.net>
Cc: Christoph Langguth <chri...@rosenkeller.org>,
freebsd-gn...@freebsd.org, freeb...@freebsd.org
Message-ID: <201003141543....@c2i.net>
Content-Type: Text/Plain; charset="utf-8"
On Sunday 14 March 2010 15:37:04 Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net>
wrote:
> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
> >
> > wrote:
> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky
> >> >> <hsel...@c2i.net>
> >> >
> >> > wrote:
> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> >> >> The following reply was made to PR usb/144414; it has been noted
> >> >> >> by GNATS.
> >> >> >>
> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> >> >> To: per...@pluto.rain.com
> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >> >> >>
> >> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> wrot=
> >> >> >>
> >> >> >> e:
> >> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> > wr=
> >> >> >>
> >> >> >> ote:
> >> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
> >> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
> >> >> >> >>>> Interestingly, my tilde key doesn't work either (though the
> >> >> >> key >>>> press is detected, no character shows when the key is
> >> >> >> pressed). >>>
> >> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you
> >> >> >> press >>> tilde followed by n do you get an n with a tilde over
> >> >> >> it? >>
> >> >> >> >> Nope. It simply does nothing in the console.
> >> >> >> >>
> >> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives
> >> >> >> me '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me...
> >> >> >> What? I don't >> even know what action. It's grabbing some
> >> >> >> arbitrary command in my >> .bash_history. It gave me the first
> >> >> >> item in my .bash_history the first >> time I tried it. Then I
> >> >> >> tried an arbitrary command ("echo"), and then >> Alt+Tilde gave me
> >> >> >> the second command in my .bash_history. Whaa?
> >> >> >>
> >> >> >> Any more ideas/news on this from anyone?
> >> >> >>
> >> >> >> The tilde key thing is especially irritating.
> >> >> >
> >> >> > static uint8_t
> >> >> > ukbd_apple_swap(uint8_t keycode) {
> >> >> > switch (keycode) {
> >> >> > case 0x35: return 0x64;
> >> >> > case 0x64: return 0x35;
> >> >> > default: return keycode;
> >> >> > }
> >> >> > }
> >> >> >
> >> >> > Can you try to change the function above in ukbd.c to only return
> >> >> > keycode? Any difference?
> >> >>
> >> >> Yep, commenting the two case lines brought my tilde key back. Any
> >> >> idea what the ukbd_apple_swap() function was _supposed_ to be doing?
> >> >>
> >> >> Also, there's only one thing left (input-wise) that I can't get to
> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
> >> >> that it's not a problem with Fn+Backspace failing to map to Delete,
> >> >> because my non-Mac i386 box has the same problem.
> >> >>
> >> >> Everything I read online keeps saying to muck with an .inputrc file
> >> >> (for bash, anyway), but I haven't been able to get it to work. Places
> >> >> I've looked have said to add this to .inputrc:
> >> >>
> >> >> "\e[3~": delete-char
> >> >>
> >> >> But this seems to have no effect (and I tried bind -f .inputrc in
> >> >> case my INPUTRC environment variable wasn't working). Is there
> >> >> something FreeBSD-specific I'm not seeing, or what?
> >> >>
> >> >> - Steven
> >> >
> >> > Hi Steven,
> >> >
> >> > Can you talk this over with Christoph and send me a patch when you
> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
> >> > suggest the following patch:
> >> >
> >> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> >> > src/sys/dev/usb/input/ukbd.c ====
> >> > @@ -896,8 +896,7 @@
> >> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> >> > &temp_id)) {
> >> > if (flags & HIO_VARIABLE)
> >> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
> >> > - UKBD_FLAG_APPLE_SWAP;
> >> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> >> > DPRINTFN(1, "Found Apple FN-key\n");
> >> > apple_keys = 1;
> >> > sc->sc_kbd_id = temp_id;
> >> >
> >> >
> >> > The hardware that Christoph was using had an Eject-key, while yours
> >> > didn't. I think the patch above will make both cases work.
> >> >
> >> > Christoph, do you have any comments?
> >> >
> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/s
> >> >ys/ dev/usb/input/ukbd.c&REV=47
> >>
> >> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
> >> detect it though.
> >>
> >> - Steven
> >
> > Could you try to figure out what key-press number corresponds to the
> > eject key?
> >
> > --HPS
>
> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
> problem: unless it detects that the key is there, I can't find it.
> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
> pressed.
Then maybe we have to do some additional requests towards the hardware to
"switch on" sending of those keys ....
--HPS
------------------------------
Message: 9
Date: Sun, 14 Mar 2010 15:46:01 +0100
From: Kai Wang <kaiw...@gmail.com>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Steven Noonan <ste...@uplinklabs.net>
Cc: freebsd-gn...@freebsd.org, Christoph Langguth
<chri...@rosenkeller.org>, freeb...@freebsd.org
Message-ID: <20100314144601.GA2534@viskning>
Content-Type: text/plain; charset=utf-8
On Sun, Mar 14, 2010 at 06:37:04AM -0800, Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net> wrote:
> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
> > wrote:
> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
> >> >
> >> > wrote:
> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> >> >> The following reply was made to PR usb/144414; it has been noted by
> >> >> >> GNATS.
> >> >> >>
> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> >> >> To: per...@pluto.rain.com
> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >> >> >>
> >> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> wrot=
> >> >> >>
> >> >> >> e:
> >> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> > wr=
> >> >> >>
> >> >> >> ote:
> >> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
> >> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
> >> >> >> >>>> Interestingly, my tilde key doesn't work either (though the key
> >> >> >> >>>> press is detected, no character shows when the key is pressed).
> >> >> >> >>>
> >> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
> >> >> >> >>> tilde followed by n do you get an n with a tilde over it?
> >> >> >> >>
> >> >> >> >> Nope. It simply does nothing in the console.
> >> >> >> >>
> >> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
> >> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
> >> >> >> don't >> even know what action. It's grabbing some arbitrary command
> >> >> >> in my >> .bash_history. It gave me the first item in my .bash_history
> >> >> >> the first >> time I tried it. Then I tried an arbitrary command
> >> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in my
> >> >> >> .bash_history. Whaa?
> >> >> >>
> >> >> >> Any more ideas/news on this from anyone?
> >> >> >>
> >> >> >> The tilde key thing is especially irritating.
> >> >> >
> >> >> > static uint8_t
> >> >> > ukbd_apple_swap(uint8_t keycode) {
> >> >> > switch (keycode) {
> >> >> > case 0x35: return 0x64;
> >> >> > case 0x64: return 0x35;
> >> >> > default: return keycode;
> >> >> > }
> >> >> > }
> >> >> >
> >> >> > Can you try to change the function above in ukbd.c to only return
> >> >> > keycode? Any difference?
> >> >>
> >> >> Yep, commenting the two case lines brought my tilde key back. Any idea
> >> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
> >> >>
> >> >> Also, there's only one thing left (input-wise) that I can't get to
> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
> >> >> that it's not a problem with Fn+Backspace failing to map to Delete,
> >> >> because my non-Mac i386 box has the same problem.
> >> >>
> >> >> Everything I read online keeps saying to muck with an .inputrc file
> >> >> (for bash, anyway), but I haven't been able to get it to work. Places
> >> >> I've looked have said to add this to .inputrc:
> >> >>
> >> >> "\e[3~": delete-char
> >> >>
> >> >> But this seems to have no effect (and I tried bind -f .inputrc in case
> >> >> my INPUTRC environment variable wasn't working). Is there something
> >> >> FreeBSD-specific I'm not seeing, or what?
> >> >>
> >> >> - Steven
> >> >
> >> > Hi Steven,
> >> >
> >> > Can you talk this over with Christoph and send me a patch when you
> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
> >> > suggest the following patch:
> >> >
> >> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> >> > src/sys/dev/usb/input/ukbd.c ====
> >> > @@ -896,8 +896,7 @@
> >> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> >> > &temp_id)) {
> >> > if (flags & HIO_VARIABLE)
> >> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
> >> > - UKBD_FLAG_APPLE_SWAP;
> >> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> >> > DPRINTFN(1, "Found Apple FN-key\n");
> >> > apple_keys = 1;
> >> > sc->sc_kbd_id = temp_id;
> >> >
> >> >
> >> > The hardware that Christoph was using had an Eject-key, while yours
> >> > didn't. I think the patch above will make both cases work.
> >> >
> >> > Christoph, do you have any comments?
> >> >
> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/
> >> >dev/usb/input/ukbd.c&REV=47
> >>
> >> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
> >> detect it though.
> >>
> >> - Steven
> >>
> >
> > Could you try to figure out what key-press number corresponds to the eject
> > key?
> >
> > --HPS
> >
>
> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
> problem: unless it detects that the key is there, I can't find it.
> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
> pressed.
It's very possible that your Eject key is in a separate interface and
is handled by uhid(4) instead of ukbd(4).
/Kai
------------------------------
Message: 10
Date: Sun, 14 Mar 2010 06:49:37 -0800
From: Steven Noonan <ste...@uplinklabs.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Kai Wang <kaiw...@gmail.com>
Cc: freebsd-gn...@freebsd.org, Christoph Langguth
<chri...@rosenkeller.org>, freeb...@freebsd.org
Message-ID:
<f488382f1003140749n30...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Sun, Mar 14, 2010 at 6:46 AM, Kai Wang <kaiw...@gmail.com> wrote:
> On Sun, Mar 14, 2010 at 06:37:04AM -0800, Steven Noonan wrote:
>> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net> wrote:
>> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
>> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
>> > wrote:
>> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
>> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
>> >> >
>> >> > wrote:
>> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
>> >> >> >> The following reply was made to PR usb/144414; it has been noted by
>> >> >> >> GNATS.
>> >> >> >>
>> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
>> >> >> >> To: per...@pluto.rain.com
>> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
>> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
>> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
>> >> >> >>
>> >> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
>> >> >> >> <ste...@uplinklabs.net> wrot=
>> >> >> >>
>> >> >> >> e:
>> >> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
>> >> >> >> <ste...@uplinklabs.net> > wr=
>> >> >> >>
>> >> >> >> ote:
>> >> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
>> >> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
>> >> >> >> >>>> Interestingly, my tilde key doesn't work either (though the key
>> >> >> >> >>>> press is detected, no character shows when the key is pressed).
>> >> >> >> >>>
>> >> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
>> >> >> >> >>> tilde followed by n do you get an n with a tilde over it?
>> >> >> >> >>
>> >> >> >> >> Nope. It simply does nothing in the console.
>> >> >> >> >>
>> >> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
>> >> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
>> >> >> >> don't >> even know what action. It's grabbing some arbitrary command
>> >> >> >> in my >> .bash_history. It gave me the first item in my .bash_history
>> >> >> >> the first >> time I tried it. Then I tried an arbitrary command
>> >> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in my
>> >> >> >> .bash_history. Whaa?
>> >> >> >>
>> >> >> >> Any more ideas/news on this from anyone?
>> >> >> >>
>> >> >> >> The tilde key thing is especially irritating.
>> >> >> >
>> >> >> > static uint8_t
>> >> >> > ukbd_apple_swap(uint8_t keycode) {
>> >> >> > switch (keycode) {
>> >> >> > case 0x35: return 0x64;
>> >> >> > case 0x64: return 0x35;
>> >> >> > default: return keycode;
>> >> >> > }
>> >> >> > }
>> >> >> >
>> >> >> > Can you try to change the function above in ukbd.c to only return
>> >> >> > keycode? Any difference?
>> >> >>
>> >> >> Yep, commenting the two case lines brought my tilde key back. Any idea
>> >> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
>> >> >>
>> >> >> Also, there's only one thing left (input-wise) that I can't get to
>> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
>> >> >> that it's not a problem with Fn+Backspace failing to map to Delete,
>> >> >> because my non-Mac i386 box has the same problem.
>> >> >>
>> >> >> Everything I read online keeps saying to muck with an .inputrc file
>> >> >> (for bash, anyway), but I haven't been able to get it to work. Places
>> >> >> I've looked have said to add this to .inputrc:
>> >> >>
>> >> >> "\e[3~": delete-char
>> >> >>
>> >> >> But this seems to have no effect (and I tried bind -f .inputrc in case
>> >> >> my INPUTRC environment variable wasn't working). Is there something
>> >> >> FreeBSD-specific I'm not seeing, or what?
>> >> >>
>> >> >> - Steven
>> >> >
>> >> > Hi Steven,
>> >> >
>> >> > Can you talk this over with Christoph and send me a patch when you
>> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
>> >> > suggest the following patch:
>> >> >
>> >> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
>> >> > src/sys/dev/usb/input/ukbd.c ====
>> >> > @@ -896,8 +896,7 @@
>> >> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
>> >> > &temp_id)) {
>> >> > if (flags & HIO_VARIABLE)
>> >> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
>> >> > - UKBD_FLAG_APPLE_SWAP;
>> >> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
>> >> > DPRINTFN(1, "Found Apple FN-key\n");
>> >> > apple_keys = 1;
>> >> > sc->sc_kbd_id = temp_id;
>> >> >
>> >> >
>> >> > The hardware that Christoph was using had an Eject-key, while yours
>> >> > didn't. I think the patch above will make both cases work.
>> >> >
>> >> > Christoph, do you have any comments?
>> >> >
>> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/
>> >> >dev/usb/input/ukbd.c&REV=47
>> >>
>> >> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
>> >> detect it though.
>> >>
>> >> - Steven
>> >>
>> >
>> > Could you try to figure out what key-press number corresponds to the eject
>> > key?
>> >
>> > --HPS
>> >
>>
>> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
>> problem: unless it detects that the key is there, I can't find it.
>> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
>> pressed.
>
> It's very possible that your Eject key is in a separate interface and
> is handled by uhid(4) instead of ukbd(4).
>
> /Kai
>
Enabling 'hw.usb.uhid.debug' doesn't print anything on an Eject
keypress either, but that could just mean that uhid(4) doesn't have
necessary DPRINTFs to show it.
- Steven
------------------------------
Message: 11
Date: Sun, 14 Mar 2010 14:50:05 GMT
From: Hans Petter Selasky <hsel...@c2i.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: freeb...@FreeBSD.org
Message-ID: <201003141450....@freefall.freebsd.org>
The following reply was made to PR usb/144414; it has been noted by GNATS.
From: Hans Petter Selasky <hsel...@c2i.net>
To: Steven Noonan <ste...@uplinklabs.net>
Cc: freeb...@freebsd.org,
freebsd-gn...@freebsd.org,
Christoph Langguth <chri...@rosenkeller.org>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
Date: Sun, 14 Mar 2010 15:43:19 +0100
On Sunday 14 March 2010 15:37:04 Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net>
wrote:
> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
> >
> > wrote:
> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky
> >> >> <hsel...@c2i.net>
> >> >
> >> > wrote:
> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> >> >> The following reply was made to PR usb/144414; it has been noted
> >> >> >> by GNATS.
> >> >> >>
> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> >> >> To: per...@pluto.rain.com
> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >> >> >>
> >> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> wrot=
> >> >> >>
> >> >> >> e:
> >> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> > wr=
> >> >> >>
> >> >> >> ote:
> >> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
> >> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
> >> >> >> >>>> Interestingly, my tilde key doesn't work either (though the
> >> >> >> key >>>> press is detected, no character shows when the key is
> >> >> >> pressed). >>>
> >> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you
> >> >> >> press >>> tilde followed by n do you get an n with a tilde over
> >> >> >> it? >>
> >> >> >> >> Nope. It simply does nothing in the console.
> >> >> >> >>
> >> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives
> >> >> >> me '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me...
> >> >> >> What? I don't >> even know what action. It's grabbing some
> >> >> >> arbitrary command in my >> .bash_history. It gave me the first
> >> >> >> item in my .bash_history the first >> time I tried it. Then I
> >> >> >> tried an arbitrary command ("echo"), and then >> Alt+Tilde gave me
> >> >> >> the second command in my .bash_history. Whaa?
> >> >> >>
> >> >> >> Any more ideas/news on this from anyone?
> >> >> >>
> >> >> >> The tilde key thing is especially irritating.
> >> >> >
> >> >> > static uint8_t
> >> >> > ukbd_apple_swap(uint8_t keycode) {
> >> >> > switch (keycode) {
> >> >> > case 0x35: return 0x64;
> >> >> > case 0x64: return 0x35;
> >> >> > default: return keycode;
> >> >> > }
> >> >> > }
> >> >> >
> >> >> > Can you try to change the function above in ukbd.c to only return
> >> >> > keycode? Any difference?
> >> >>
> >> >> Yep, commenting the two case lines brought my tilde key back. Any
> >> >> idea what the ukbd_apple_swap() function was _supposed_ to be doing?
> >> >>
> >> >> Also, there's only one thing left (input-wise) that I can't get to
> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
> >> >> that it's not a problem with Fn+Backspace failing to map to Delete,
> >> >> because my non-Mac i386 box has the same problem.
> >> >>
> >> >> Everything I read online keeps saying to muck with an .inputrc file
> >> >> (for bash, anyway), but I haven't been able to get it to work. Places
> >> >> I've looked have said to add this to .inputrc:
> >> >>
> >> >> "\e[3~": delete-char
> >> >>
> >> >> But this seems to have no effect (and I tried bind -f .inputrc in
> >> >> case my INPUTRC environment variable wasn't working). Is there
> >> >> something FreeBSD-specific I'm not seeing, or what?
> >> >>
> >> >> - Steven
> >> >
> >> > Hi Steven,
> >> >
> >> > Can you talk this over with Christoph and send me a patch when you
> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
> >> > suggest the following patch:
> >> >
> >> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> >> > src/sys/dev/usb/input/ukbd.c ====
> >> > @@ -896,8 +896,7 @@
> >> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> >> > &temp_id)) {
> >> > if (flags & HIO_VARIABLE)
> >> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
> >> > - UKBD_FLAG_APPLE_SWAP;
> >> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> >> > DPRINTFN(1, "Found Apple FN-key\n");
> >> > apple_keys = 1;
> >> > sc->sc_kbd_id = temp_id;
> >> >
> >> >
> >> > The hardware that Christoph was using had an Eject-key, while yours
> >> > didn't. I think the patch above will make both cases work.
> >> >
> >> > Christoph, do you have any comments?
> >> >
> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/s
> >> >ys/ dev/usb/input/ukbd.c&REV=47
> >>
> >> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
> >> detect it though.
> >>
> >> - Steven
> >
> > Could you try to figure out what key-press number corresponds to the
> > eject key?
> >
> > --HPS
>
> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
> problem: unless it detects that the key is there, I can't find it.
> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
> pressed.
Then maybe we have to do some additional requests towards the hardware to
"switch on" sending of those keys ....
--HPS
------------------------------
Message: 12
Date: Sun, 14 Mar 2010 14:50:07 GMT
From: Kai Wang <kaiw...@gmail.com>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: freeb...@FreeBSD.org
Message-ID: <201003141450....@freefall.freebsd.org>
The following reply was made to PR usb/144414; it has been noted by GNATS.
From: Kai Wang <kaiw...@gmail.com>
To: Steven Noonan <ste...@uplinklabs.net>
Cc: Hans Petter Selasky <hsel...@c2i.net>,
Christoph Langguth <chri...@rosenkeller.org>,
freebsd-gn...@freebsd.org, freeb...@freebsd.org
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
Date: Sun, 14 Mar 2010 15:46:01 +0100
On Sun, Mar 14, 2010 at 06:37:04AM -0800, Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net> wrote:
> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.net>
> > wrote:
> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hsel...@c2i.net>
> >> >
> >> > wrote:
> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> >> >> The following reply was made to PR usb/144414; it has been noted by
> >> >> >> GNATS.
> >> >> >>
> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> >> >> To: per...@pluto.rain.com
> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >> >> >>
> >> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> wrot=
> >> >> >>
> >> >> >> e:
> >> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> >> >> <ste...@uplinklabs.net> > wr=
> >> >> >>
> >> >> >> ote:
> >> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM, =C2=A0<per...@pluto.rain.com>
> >> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
> >> >> >> >>>> Interestingly, my tilde key doesn't work either (though the key
> >> >> >> >>>> press is detected, no character shows when the key is pressed).
> >> >> >> >>>
> >> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you press
> >> >> >> >>> tilde followed by n do you get an n with a tilde over it?
> >> >> >> >>
> >> >> >> >> Nope. It simply does nothing in the console.
> >> >> >> >>
> >> >> >> >> But in X11, it does something very odd. Shift+Tilde Key gives me
> >> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... What? I
> >> >> >> don't >> even know what action. It's grabbing some arbitrary command
> >> >> >> in my >> .bash_history. It gave me the first item in my .bash_history
> >> >> >> the first >> time I tried it. Then I tried an arbitrary command
> >> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in my
> >> >> >> .bash_history. Whaa?
> >> >> >>
> >> >> >> Any more ideas/news on this from anyone?
> >> >> >>
> >> >> >> The tilde key thing is especially irritating.
> >> >> >
> >> >> > static uint8_t
> >> >> > ukbd_apple_swap(uint8_t keycode) {
> >> >> > switch (keycode) {
> >> >> > case 0x35: return 0x64;
> >> >> > case 0x64: return 0x35;
> >> >> > default: return keycode;
> >> >> > }
> >> >> > }
> >> >> >
> >> >> > Can you try to change the function above in ukbd.c to only return
> >> >> > keycode? Any difference?
> >> >>
> >> >> Yep, commenting the two case lines brought my tilde key back. Any idea
> >> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
> >> >>
> >> >> Also, there's only one thing left (input-wise) that I can't get to
> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certain
> >> >> that it's not a problem with Fn+Backspace failing to map to Delete,
> >> >> because my non-Mac i386 box has the same problem.
> >> >>
> >> >> Everything I read online keeps saying to muck with an .inputrc file
> >> >> (for bash, anyway), but I haven't been able to get it to work. Places
> >> >> I've looked have said to add this to .inputrc:
> >> >>
> >> >> "\e[3~": delete-char
> >> >>
> >> >> But this seems to have no effect (and I tried bind -f .inputrc in case
> >> >> my INPUTRC environment variable wasn't working). Is there something
> >> >> FreeBSD-specific I'm not seeing, or what?
> >> >>
> >> >> - Steven
> >> >
> >> > Hi Steven,
> >> >
> >> > Can you talk this over with Christoph and send me a patch when you
> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile I
> >> > suggest the following patch:
> >> >
> >> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> >> > src/sys/dev/usb/input/ukbd.c ====
> >> > @@ -896,8 +896,7 @@
> >> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> >> > &temp_id)) {
> >> > if (flags & HIO_VARIABLE)
> >> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN |
> >> > - UKBD_FLAG_APPLE_SWAP;
> >> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> >> > DPRINTFN(1, "Found Apple FN-key\n");
> >> > apple_keys = 1;
> >> > sc->sc_kbd_id = temp_id;
> >> >
> >> >
> >> > The hardware that Christoph was using had an Eject-key, while yours
> >> > didn't. I think the patch above will make both cases work.
> >> >
> >> > Christoph, do you have any comments?
> >> >
> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/src/sys/
> >> >dev/usb/input/ukbd.c&REV=47
> >>
> >> Not quite true, my keyboard _does_ have an Eject key. The code doesn't
> >> detect it though.
> >>
> >> - Steven
> >>
> >
> > Could you try to figure out what key-press number corresponds to the eject
> > key?
> >
> > --HPS
> >
>
> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
> problem: unless it detects that the key is there, I can't find it.
> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
> pressed.
It's very possible that your Eject key is in a separate interface and
is handled by uhid(4) instead of ukbd(4).
/Kai
------------------------------
Message: 13
Date: Sun, 14 Mar 2010 14:50:09 GMT
From: Steven Noonan <ste...@uplinklabs.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: freeb...@FreeBSD.org
Message-ID: <201003141450....@freefall.freebsd.org>
The following reply was made to PR usb/144414; it has been noted by GNATS.
From: Steven Noonan <ste...@uplinklabs.net>
To: Kai Wang <kaiw...@gmail.com>
Cc: Hans Petter Selasky <hsel...@c2i.net>, Christoph Langguth <chri...@rosenkeller.org>,
freebsd-gn...@freebsd.org, freeb...@freebsd.org
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
Date: Sun, 14 Mar 2010 06:49:37 -0800
On Sun, Mar 14, 2010 at 6:46 AM, Kai Wang <kaiw...@gmail.com> wrote:
> On Sun, Mar 14, 2010 at 06:37:04AM -0800, Steven Noonan wrote:
>> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net> =
wrote:
>> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
>> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky <hsel...@c2i.ne=
t>
>> > wrote:
>> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
>> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky <hselasky@c2i=
.net>
>> >> >
>> >> > wrote:
>> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
>> >> >> >> The following reply was made to PR usb/144414; it has been note=
d by
>> >> >> >> GNATS.
>> >> >> >>
>> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
>> >> >> >> To: per...@pluto.rain.com
>> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
>> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
>> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
>> >> >> >>
>> >> >> >> =C2=A0On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
>> >> >> >> <ste...@uplinklabs.net> wrot=3D
>> >> >> >>
>> >> >> >> =C2=A0e:
>> >> >> >> =C2=A0> On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
>> >> >> >> <ste...@uplinklabs.net> > wr=3D
>> >> >> >>
>> >> >> >> =C2=A0ote:
>> >> >> >> =C2=A0>> On Wed, Mar 3, 2010 at 10:36 PM, =3DC2=3DA0<perryh@plu=
to.rain.com>
>> >> >> >> wrote: >>> Steven Noonan <ste...@uplinklabs.net> wrote:
>> >> >> >> =C2=A0>>>> Interestingly, my tilde key doesn't work either (tho=
ugh the key
>> >> >> >> =C2=A0>>>> press is detected, no character shows when the key i=
s pressed).
>> >> >> >> =C2=A0>>>
>> >> >> >> =C2=A0>>> Any chance it is configured as a "dead" key? =3DC2=3D=
A0If you press
>> >> >> >> =C2=A0>>> tilde followed by n do you get an n with a tilde over=
it?
>> >> >> >> =C2=A0>>
>> >> >> >> =C2=A0>> Nope. It simply does nothing in the console.
>> >> >> >> =C2=A0>>
>> >> >> >> =C2=A0>> But in X11, it does something very odd. Shift+Tilde Ke=
y gives me
>> >> >> >> '>', >> and Tilde Key gives me '<'. And Alt+Tilde gives me... W=
hat? I
>> >> >> >> don't >> even know what action. It's grabbing some arbitrary co=
mmand
>> >> >> >> in my >> .bash_history. It gave me the first item in my .bash_h=
istory
>> >> >> >> the first >> time I tried it. Then I tried an arbitrary command
>> >> >> >> ("echo"), and then >> Alt+Tilde gave me the second command in m=
y
>> >> >> >> .bash_history. Whaa?
>> >> >> >>
>> >> >> >> =C2=A0Any more ideas/news on this from anyone?
>> >> >> >>
>> >> >> >> =C2=A0The tilde key thing is especially irritating.
>> >> >> >
>> >> >> > static uint8_t
>> >> >> > ukbd_apple_swap(uint8_t keycode) {
>> >> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0switch (keycode) {
>> >> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x35: return 0x64;
>> >> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0case 0x64: return 0x35;
>> >> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0default: return keycode;
>> >> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0}
>> >> >> > }
>> >> >> >
>> >> >> > Can you try to change the function above in ukbd.c to only retur=
n
>> >> >> > keycode? Any difference?
>> >> >>
>> >> >> Yep, commenting the two case lines brought my tilde key back. Any =
idea
>> >> >> what the ukbd_apple_swap() function was _supposed_ to be doing?
>> >> >>
>> >> >> Also, there's only one thing left (input-wise) that I can't get to
>> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty certa=
in
>> >> >> that it's not a problem with Fn+Backspace failing to map to Delete=
,
>> >> >> because my non-Mac i386 box has the same problem.
>> >> >>
>> >> >> Everything I read online keeps saying to muck with an .inputrc fil=
e
>> >> >> (for bash, anyway), but I haven't been able to get it to work. Pla=
ces
>> >> >> I've looked have said to add this to .inputrc:
>> >> >>
>> >> >> "\e[3~": delete-char
>> >> >>
>> >> >> But this seems to have no effect (and I tried bind -f .inputrc in =
case
>> >> >> my INPUTRC environment variable wasn't working). Is there somethin=
g
>> >> >> FreeBSD-specific I'm not seeing, or what?
>> >> >>
>> >> >> - Steven
>> >> >
>> >> > Hi Steven,
>> >> >
>> >> > Can you talk this over with Christoph and send me a patch when you
>> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile =
I
>> >> > suggest the following patch:
>> >> >
>> >> > =3D=3D=3D=3D //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
>> >> > src/sys/dev/usb/input/ukbd.c =3D=3D=3D=3D
>> >> > @@ -896,8 +896,7 @@
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0hid_input, 0, &sc->sc_loc_apple_fn, &flags,
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0&temp_id)) {
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0if (flags & HIO_VARIABLE)
>> >> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sc->sc_flags |=3D UKBD_FLAG_APPLE=
_FN |
>> >> > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 UKBD_FLAG_APPLE_SWA=
P;
>> >> > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sc->sc_flags |=3D UKBD_FLAG_APPLE=
_FN;
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0DPRINTFN(1, "Found Apple FN-key\n");
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0apple_keys =3D 1;
>> >> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0sc->sc_kbd_id =3D temp_id;
>> >> >
>> >> >
>> >> > The hardware that Christoph was using had an Eject-key, while yours
>> >> > didn't. I think the patch above will make both cases work.
>> >> >
>> >> > Christoph, do you have any comments?
>> >> >
>> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=3D//depot/projects/usb/=
src/sys/
>> >> >dev/usb/input/ukbd.c&REV=3D47
>> >>
>> >> Not quite true, my keyboard _does_ have an Eject key. The code doesn'=
t
>> >> detect it though.
>> >>
>> >> - Steven
>> >>
>> >
>> > Could you try to figure out what key-press number corresponds to the e=
ject
>> > key?
>> >
>> > --HPS
>> >
>>
>> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
>> problem: unless it detects that the key is there, I can't find it.
>> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
>> pressed.
>
> It's very possible that your Eject key is in a separate interface and
> is handled by uhid(4) instead of ukbd(4).
>
> /Kai
>
Enabling 'hw.usb.uhid.debug' doesn't print anything on an Eject
keypress either, but that could just mean that uhid(4) doesn't have
necessary DPRINTFs to show it.
- Steven
------------------------------
Message: 14
Date: Sun, 14 Mar 2010 16:39:20 +0200
From: Andrey Kosachenko <andrey.k...@gmail.com>
Subject: [current] could not attach n900 (mass storage mode) at high
speed
To: freeb...@freebsd.org
Message-ID: <4B9CF518...@gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Hi,
There is a laptop carrying FreeBSD (9.0-current, built from fresh sources).
Device (Nokia N900) is attached via USB interface. However the speed of
data transfer is too low (~1.0 MB/s). I tried to attached it to Linux
box and data was transferred at full speed (~ 25 MB/s)
Some relevant info (please, let me know if it's not sufficient):
uhci/ehci are compiled in.
# uname -a
FreeBSD beastie.lan 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sun Mar 14
12:55:29 EET 2010
ro...@beastie.lan:/usr/obj/usr/src/sys/BEASTIE-SMP-ULE-20100314 amd64
# dmesg
... <skipped>
ugen3.2: <Nokia> at usbus3
umass0: <Mass Storage> on usbus3
umass0: SCSI over Bulk-Only; quirks = 0x0001
umass0:1:0:-1: Attached to scbus1
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power
on, reset, or bus device reset occurred)
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not
present)
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <Nokia N900 031> Removable Direct Access SCSI-2 device
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
(probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0
(probe0:umass-sim0:0:0:1): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:1): SCSI status: Check Condition
(probe0:umass-sim0:0:0:1): SCSI sense: UNIT ATTENTION asc:29,0 (Power
on, reset, or bus device reset occurred)
(probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0
(probe0:umass-sim0:0:0:1): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:1): SCSI status: Check Condition
(probe0:umass-sim0:0:0:1): SCSI sense: NOT READY asc:3a,0 (Medium not
present)
da1 at umass-sim0 bus 0 scbus1 target 0 lun 1
da1: <Nokia N900 031> Removable Direct Access SCSI-2 device
da1: 1.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
# usbconfig
ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON
ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON
ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON
ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON
ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON
ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON
ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON
ugen4.2: <Navigator 335 Genius> at usbus4, cfg=0 md=HOST spd=LOW
(1.5Mbps) pwr=ON
ugen3.2: <N900 (Storage Mode) Nokia> at usbus3, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON
All available USB interfaces were tried: no luck. Also looked at quirks
mechanism, but found nothing relevant to the issue (or, I guess, didn't
recognize). For instance, I tried to remove UQ_MSC_FLOPPY_SPEED, nothing
changed. Though when the quirk UQ_MSC_NO_TEST_UNIT_READY was removed,
seems storage size was detected properly, i.e:
umass0: <Mass Storage> on usbus3
umass0: SCSI over Bulk-Only; quirks = 0x0001
umass0:1:0:-1: Attached to scbus1
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:29,0 (Power
on, reset, or bus device reset occurred)
da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
da0: <Nokia N900 031> Removable Direct Access SCSI-2 device
da0: 1.000MB/s transfers
da0: 27652MB (56631296 512 byte sectors: 255H 63S/T 3525C)
but transfer speed remained the same.
Could you, please, suggest what should I look at in order to get it
working properly.
Thanks in advance!
--
WBR,
Andrey Kosachenko
------------------------------
Message: 15
Date: Sun, 14 Mar 2010 16:23:25 +0100
From: Hans Petter Selasky <hsel...@c2i.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Steven Noonan <ste...@uplinklabs.net>
Cc: freebsd-gn...@freebsd.org, Christoph Langguth
<chri...@rosenkeller.org>, freeb...@freebsd.org
Message-ID: <201003141623....@c2i.net>
Content-Type: Text/Plain; charset="utf-8"
On Sunday 14 March 2010 15:49:37 Steven Noonan wrote:
> On Sun, Mar 14, 2010 at 6:46 AM, Kai Wang <kaiw...@gmail.com> wrote:
> > On Sun, Mar 14, 2010 at 06:37:04AM -0800, Steven Noonan wrote:
> >> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net>
wrote:
> >> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
> >> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky
> >> >> <hsel...@c2i.net>
> >> >
> >> > wrote:
> >> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
> >> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky
> >> >> >> <hsel...@c2i.net>
> >> >> >
> >> >> > wrote:
> >> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
> >> >> >> >> The following reply was made to PR usb/144414; it has been
> >> >> >> >> noted by GNATS.
> >> >> >> >>
> >> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
> >> >> >> >> To: per...@pluto.rain.com
> >> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
> >> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
> >> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
> >> >> >> >>
> >> >> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
> >> >> >> >> <ste...@uplinklabs.net> wrot=
> >> >> >> >>
> >> >> >> >> e:
> >> >> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
> >> >> >> >> <ste...@uplinklabs.net> > wr=
> >> >> >> >>
> >> >> >> >> ote:
> >> >> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM,
> >> >> >> >> =C2=A0<per...@pluto.rain.com> wrote: >>> Steven Noonan
> >> >> >> >> <ste...@uplinklabs.net> wrote: >>>> Interestingly, my tilde key
> >> >> >> >> doesn't work either (though the key >>>> press is detected, no
> >> >> >> >> character shows when the key is pressed). >>>
> >> >> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you
> >> >> >> >> press >>> tilde followed by n do you get an n with a tilde over
> >> >> >> >> it? >>
> >> >> >> >> >> Nope. It simply does nothing in the console.
> >> >> >> >> >>
> >> >> >> >> >> But in X11, it does something very odd. Shift+Tilde Key
> >> >> >> >> gives me '>', >> and Tilde Key gives me '<'. And Alt+Tilde
> >> >> >> >> gives me... What? I don't >> even know what action. It's
> >> >> >> >> grabbing some arbitrary command in my >> .bash_history. It gave
> >> >> >> >> me the first item in my .bash_history the first >> time I tried
> >> >> >> >> it. Then I tried an arbitrary command ("echo"), and then >>
> >> >> >> >> Alt+Tilde gave me the second command in my .bash_history. Whaa?
> >> >> >> >>
> >> >> >> >> Any more ideas/news on this from anyone?
> >> >> >> >>
> >> >> >> >> The tilde key thing is especially irritating.
> >> >> >> >
> >> >> >> > static uint8_t
> >> >> >> > ukbd_apple_swap(uint8_t keycode) {
> >> >> >> > switch (keycode) {
> >> >> >> > case 0x35: return 0x64;
> >> >> >> > case 0x64: return 0x35;
> >> >> >> > default: return keycode;
> >> >> >> > }
> >> >> >> > }
> >> >> >> >
> >> >> >> > Can you try to change the function above in ukbd.c to only
> >> >> >> > return keycode? Any difference?
> >> >> >>
> >> >> >> Yep, commenting the two case lines brought my tilde key back. Any
> >> >> >> idea what the ukbd_apple_swap() function was _supposed_ to be
> >> >> >> doing?
> >> >> >>
> >> >> >> Also, there's only one thing left (input-wise) that I can't get to
> >> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty
> >> >> >> certain that it's not a problem with Fn+Backspace failing to map
> >> >> >> to Delete, because my non-Mac i386 box has the same problem.
> >> >> >>
> >> >> >> Everything I read online keeps saying to muck with an .inputrc
> >> >> >> file (for bash, anyway), but I haven't been able to get it to
> >> >> >> work. Places I've looked have said to add this to .inputrc:
> >> >> >>
> >> >> >> "\e[3~": delete-char
> >> >> >>
> >> >> >> But this seems to have no effect (and I tried bind -f .inputrc in
> >> >> >> case my INPUTRC environment variable wasn't working). Is there
> >> >> >> something FreeBSD-specific I'm not seeing, or what?
> >> >> >>
> >> >> >> - Steven
> >> >> >
> >> >> > Hi Steven,
> >> >> >
> >> >> > Can you talk this over with Christoph and send me a patch when you
> >> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile
> >> >> > I suggest the following patch:
> >> >> >
> >> >> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
> >> >> > src/sys/dev/usb/input/ukbd.c ====
> >> >> > @@ -896,8 +896,7 @@
> >> >> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
> >> >> > &temp_id)) {
> >> >> > if (flags & HIO_VARIABLE)
> >> >> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN
> >> >> > | - UKBD_FLAG_APPLE_SWAP;
> >> >> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
> >> >> > DPRINTFN(1, "Found Apple FN-key\n");
> >> >> > apple_keys = 1;
> >> >> > sc->sc_kbd_id = temp_id;
> >> >> >
> >> >> >
> >> >> > The hardware that Christoph was using had an Eject-key, while yours
> >> >> > didn't. I think the patch above will make both cases work.
> >> >> >
> >> >> > Christoph, do you have any comments?
> >> >> >
> >> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/sr
> >> >> >c/sys/ dev/usb/input/ukbd.c&REV=47
> >> >>
> >> >> Not quite true, my keyboard _does_ have an Eject key. The code
> >> >> doesn't detect it though.
> >> >>
> >> >> - Steven
> >> >
> >> > Could you try to figure out what key-press number corresponds to the
> >> > eject key?
> >> >
> >> > --HPS
> >>
> >> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
> >> problem: unless it detects that the key is there, I can't find it.
> >> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
> >> pressed.
> >
> > It's very possible that your Eject key is in a separate interface and
> > is handled by uhid(4) instead of ukbd(4).
> >
> > /Kai
>
> Enabling 'hw.usb.uhid.debug' doesn't print anything on an Eject
> keypress either, but that could just mean that uhid(4) doesn't have
> necessary DPRINTFs to show it.
>
> - Steven
>
You need to open /dev/uhidX before it will print anything.
--HPS
------------------------------
Message: 16
Date: Sun, 14 Mar 2010 07:28:16 -0800
From: Steven Noonan <ste...@uplinklabs.net>
Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
To: Hans Petter Selasky <hsel...@c2i.net>
Cc: freebsd-gn...@freebsd.org, Christoph Langguth
<chri...@rosenkeller.org>, freeb...@freebsd.org
Message-ID:
<f488382f1003140828k6c...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Sun, Mar 14, 2010 at 7:23 AM, Hans Petter Selasky <hsel...@c2i.net> wrote:
> On Sunday 14 March 2010 15:49:37 Steven Noonan wrote:
>> On Sun, Mar 14, 2010 at 6:46 AM, Kai Wang <kaiw...@gmail.com> wrote:
>> > On Sun, Mar 14, 2010 at 06:37:04AM -0800, Steven Noonan wrote:
>> >> On Sun, Mar 14, 2010 at 6:27 AM, Hans Petter Selasky <hsel...@c2i.net>
> wrote:
>> >> > On Sunday 14 March 2010 15:01:39 Steven Noonan wrote:
>> >> >> On Sun, Mar 14, 2010 at 5:48 AM, Hans Petter Selasky
>> >> >> <hsel...@c2i.net>
>> >> >
>> >> > wrote:
>> >> >> > On Sunday 14 March 2010 14:22:33 Steven Noonan wrote:
>> >> >> >> On Sun, Mar 14, 2010 at 3:01 AM, Hans Petter Selasky
>> >> >> >> <hsel...@c2i.net>
>> >> >> >
>> >> >> > wrote:
>> >> >> >> > On Sunday 14 March 2010 11:30:04 Steven Noonan wrote:
>> >> >> >> >> The following reply was made to PR usb/144414; it has been
>> >> >> >> >> noted by GNATS.
>> >> >> >> >>
>> >> >> >> >> From: Steven Noonan <ste...@uplinklabs.net>
>> >> >> >> >> To: per...@pluto.rain.com
>> >> >> >> >> Cc: freeb...@freebsd.org, freebsd-gn...@freebsd.org
>> >> >> >> >> Subject: Re: usb/144414: Apple "Fn" key doesn't work properly
>> >> >> >> >> Date: Sun, 14 Mar 2010 03:26:19 -0700
>> >> >> >> >>
>> >> >> >> >> On Thu, Mar 4, 2010 at 12:01 AM, Steven Noonan
>> >> >> >> >> <ste...@uplinklabs.net> wrot=
>> >> >> >> >>
>> >> >> >> >> e:
>> >> >> >> >> > On Wed, Mar 3, 2010 at 11:00 PM, Steven Noonan
>> >> >> >> >> <ste...@uplinklabs.net> > wr=
>> >> >> >> >>
>> >> >> >> >> ote:
>> >> >> >> >> >> On Wed, Mar 3, 2010 at 10:36 PM,
>> >> >> >> >> =C2=A0<per...@pluto.rain.com> wrote: >>> Steven Noonan
>> >> >> >> >> <ste...@uplinklabs.net> wrote: >>>> Interestingly, my tilde key
>> >> >> >> >> doesn't work either (though the key >>>> press is detected, no
>> >> >> >> >> character shows when the key is pressed). >>>
>> >> >> >> >> >>> Any chance it is configured as a "dead" key? =C2=A0If you
>> >> >> >> >> press >>> tilde followed by n do you get an n with a tilde over
>> >> >> >> >> it? >>
>> >> >> >> >> >> Nope. It simply does nothing in the console.
>> >> >> >> >> >>
>> >> >> >> >> >> But in X11, it does something very odd. Shift+Tilde Key
>> >> >> >> >> gives me '>', >> and Tilde Key gives me '<'. And Alt+Tilde
>> >> >> >> >> gives me... What? I don't >> even know what action. It's
>> >> >> >> >> grabbing some arbitrary command in my >> .bash_history. It gave
>> >> >> >> >> me the first item in my .bash_history the first >> time I tried
>> >> >> >> >> it. Then I tried an arbitrary command ("echo"), and then >>
>> >> >> >> >> Alt+Tilde gave me the second command in my .bash_history. Whaa?
>> >> >> >> >>
>> >> >> >> >> Any more ideas/news on this from anyone?
>> >> >> >> >>
>> >> >> >> >> The tilde key thing is especially irritating.
>> >> >> >> >
>> >> >> >> > static uint8_t
>> >> >> >> > ukbd_apple_swap(uint8_t keycode) {
>> >> >> >> > switch (keycode) {
>> >> >> >> > case 0x35: return 0x64;
>> >> >> >> > case 0x64: return 0x35;
>> >> >> >> > default: return keycode;
>> >> >> >> > }
>> >> >> >> > }
>> >> >> >> >
>> >> >> >> > Can you try to change the function above in ukbd.c to only
>> >> >> >> > return keycode? Any difference?
>> >> >> >>
>> >> >> >> Yep, commenting the two case lines brought my tilde key back. Any
>> >> >> >> idea what the ukbd_apple_swap() function was _supposed_ to be
>> >> >> >> doing?
>> >> >> >>
>> >> >> >> Also, there's only one thing left (input-wise) that I can't get to
>> >> >> >> work, and that's the 'delete' key (Fn+Backspace). I'm pretty
>> >> >> >> certain that it's not a problem with Fn+Backspace failing to map
>> >> >> >> to Delete, because my non-Mac i386 box has the same problem.
>> >> >> >>
>> >> >> >> Everything I read online keeps saying to muck with an .inputrc
>> >> >> >> file (for bash, anyway), but I haven't been able to get it to
>> >> >> >> work. Places I've looked have said to add this to .inputrc:
>> >> >> >>
>> >> >> >> "\e[3~": delete-char
>> >> >> >>
>> >> >> >> But this seems to have no effect (and I tried bind -f .inputrc in
>> >> >> >> case my INPUTRC environment variable wasn't working). Is there
>> >> >> >> something FreeBSD-specific I'm not seeing, or what?
>> >> >> >>
>> >> >> >> - Steven
>> >> >> >
>> >> >> > Hi Steven,
>> >> >> >
>> >> >> > Can you talk this over with Christoph and send me a patch when you
>> >> >> > agreed? He's the one that made the Apple-SWAP key patch. Meanwhile
>> >> >> > I suggest the following patch:
>> >> >> >
>> >> >> > ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#47 -
>> >> >> > src/sys/dev/usb/input/ukbd.c ====
>> >> >> > @@ -896,8 +896,7 @@
>> >> >> > hid_input, 0, &sc->sc_loc_apple_fn, &flags,
>> >> >> > &temp_id)) {
>> >> >> > if (flags & HIO_VARIABLE)
>> >> >> > - sc->sc_flags |= UKBD_FLAG_APPLE_FN
>> >> >> > | - UKBD_FLAG_APPLE_SWAP;
>> >> >> > + sc->sc_flags |= UKBD_FLAG_APPLE_FN;
>> >> >> > DPRINTFN(1, "Found Apple FN-key\n");
>> >> >> > apple_keys = 1;
>> >> >> > sc->sc_kbd_id = temp_id;
>> >> >> >
>> >> >> >
>> >> >> > The hardware that Christoph was using had an Eject-key, while yours
>> >> >> > didn't. I think the patch above will make both cases work.
>> >> >> >
>> >> >> > Christoph, do you have any comments?
>> >> >> >
>> >> >> > http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/usb/sr
>> >> >> >c/sys/ dev/usb/input/ukbd.c&REV=47
>> >> >>
>> >> >> Not quite true, my keyboard _does_ have an Eject key. The code
>> >> >> doesn't detect it though.
>> >> >>
>> >> >> - Steven
>> >> >
>> >> > Could you try to figure out what key-press number corresponds to the
>> >> > eject key?
>> >> >
>> >> > --HPS
>> >>
>> >> I'm not certain how to do so. It's somewhat of a chicken-and-the-egg
>> >> problem: unless it detects that the key is there, I can't find it.
>> >> Enabling 'hw.usb.ukbd.debug' doesn't print anything when Eject is
>> >> pressed.
>> >
>> > It's very possible that your Eject key is in a separate interface and
>> > is handled by uhid(4) instead of ukbd(4).
>> >
>> > /Kai
>>
>> Enabling 'hw.usb.uhid.debug' doesn't print anything on an Eject
>> keypress either, but that could just mean that uhid(4) doesn't have
>> necessary DPRINTFs to show it.
>>
>> - Steven
>>
>
> You need to open /dev/uhidX before it will print anything.
>
> --HPS
>
Aha. Doing 'cat /dev/uhid0 > /dev/null' and then hitting eject yielded:
"uhid_intr_callback: transferred!"
in dmesg.
- Steven
------------------------------
End of freebsd-usb Digest, Vol 279, Issue 3
*******************************************