Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

access to Apple new aluminium keyboard special keys on a PC throught raw input or will I need a filter or something else?

20 views
Skip to first unread message

John knipper

unread,
Sep 30, 2007, 7:01:54 PM9/30/07
to
Hi all,

Said in one line:
I would like to be able to access to all the keys of an Apple new
aluminium keyboard on my PC (windows XP and up)

Sorry If I ask dumb questions but I'm a total newbye in terms of
windows drivers :)

I bougth an Apple new aluminum keyboard to use on my PC. I'm not an
Apple fan but I have to admit that this keyboard is excellent.

The problem is the software. The software is not included in the box as
only OSX is supported out of the box. They are windows XP (no x64
support) but they work pretty badly on something else than an Apple
computer.

If you are interested in the details, see here:
http://www.happytocode.com/post/Can-I-use-the-new-Apple-USB-Aluminium-ke
yboard-on-Windows.aspx

I tried, the Apple forums. Got no help. Tried searching the web, found
a lot of samples but my knowledge is too limited ritgh know to exploit
them in the way I want.

The keyboard once plugged in is recognized as a standad HID device.
Most of the keys are working but some are not mapped correctly as they
are located elsewhere on the keyboard.

Then we have "special" keys. Especially two keys that I cannot manage
to get access to directly (meaning without using the Apple softawre).
It's an open/close CD tray and an Fn key that is used as a modifier for
half of the F-serie keys. For example, Fn+F10 is sound off, Fn+F11,
sound up etc.

So, the software provided comes in two parts.

The first part seems to be a simple usb filter that is re-mapping the
PC key layout to the Apple key layout.

The second part is a residant tool named as the Bott Camp control
panel. This one is totally buggy. More in this later. That tool seems
to provide the support for the special keys.

Here is a short list of the problems I have:
- the keyboard driver is missplacing a couple of keys.
- the boot camp tool does only work properly on Apple hardware. But
accepts to launch and provides me most of the features I can expect
from the keyboard except that it carshes often, freezes my PC, crashes
my PC, is poorly implemented: the Fn default key state is stored in the
registry and is polled from there by the tool.
- with all this installed, my second PC keyboard has it's keys switched
to the Apple layout ;)
- more...

To the point :-)
I would like to get rid of those tools and code my own solution.

Getting the correct layout is just a "MS keyboard layout creator" ahead.

But the biggets problem for me is to get access to those two special
keys.

I tried Emma burrom's rawinput approach:
http://www.codeproject.com/cs/system/rawinput.asp

But the two keys I cannot catch are the CD tray open/close key and make
the Fn combinaisons work. The only key that makes rawinput react with
the Fn key is F7, I'm getting the following message:
{msg=0xff hwnd=0xb09f8 wparam=0x0 lparam=0x6ab0211 result=0x0}

Anyway...

My question is simple... hum ;) how can I get access to the CD tray key
and to the Fn+key combinations?

The only working thing catching those keys is the UsbSnoop:
http://www.pcausa.com/Utilities/UsbSnoop/default.htm

I'm trying to code something in C# but I guess that a sample in any
language would be fine.

Any hints about where I should start? Is there some info I can provide
you to help you help me ? Any sample? something? Is the rawinput
approach a dead end?

Thanks a lot in advance for your help,
John.


--

John knipper

unread,
Oct 2, 2007, 12:51:01 PM10/2/07
to
Hello all, no idea or help about my problem? is my question too
generic? should I ask more specific questions? thanks :)


--

Don Burn

unread,
Oct 2, 2007, 1:05:09 PM10/2/07
to
Well it might help if you asked on a newgroup that answered hardware support
questions, you are asking on one for people who write device drivers in
C/C++ for the Windows kernel.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply


"John knipper" <john...@happytocode.com> wrote in message
news:470276f5$0$7329$426a...@news.free.fr...

J de Boyne Pollard

unread,
Oct 2, 2007, 2:26:12 PM10/2/07
to
DB> Well it might help if you asked on a newgroup that answered
hardware
DB> support questions, you are asking on one for people who write
device
DB> drivers in C/C++ for the Windows kernel.

You missed the "I would like to get rid of those tools and code my own
solution." part of xyr message.

To which the response is the standard one: "The WDK documentation is
your friend.".

<URL:http://msdn2.microsoft.com./en-us/library/ms790176.aspx>

Doron Holan [MSFT]

unread,
Oct 2, 2007, 4:39:45 PM10/2/07
to
access to HID data is pretty straightforward from user mode, look at the
documentation for hid.dll and the hclient sample in the WDK.

d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"J de Boyne Pollard" <j.deboyn...@tesco.net> wrote in message
news:1191349572....@g4g2000hsf.googlegroups.com...

John knipper

unread,
Oct 3, 2007, 3:34:15 PM10/3/07
to
Don Burn wrote:

> Well it might help if you asked on a newgroup that answered hardware
> support questions, you are asking on one for people who write device
> drivers in C/C++ for the Windows kernel.

Hello Don, I'm sorry, my message was a bit too long. I'll try to be
more specific in the future. Thanks.

--

John knipper

unread,
Oct 3, 2007, 4:52:48 PM10/3/07
to
Doron Holan [MSFT] wrote:

> access to HID data is pretty straightforward from user mode, look at
> the documentation for hid.dll and the hclient sample in the WDK.
>
> d

You are both right. The documentation is my friend but I did read many
things about all this and I can say it is not trivial. But I guess you
already know that ;)

My biggest problem is probably that English is not my native language
and that the documentation talks about many different type of "things"
that often look alike to me. For example, maybe the best hint you could
give me is what is the "thing" that will help me solve my problem?

You are rigth by resuming my problem to the following:"I would like to


get rid of those tools and code my own solution."

I know that the best solution would be to wait for Apple to release the
correct drivers but on the other side it looks fun and challeging to
try to do it myself.

Right now, It's only the beginning for me and I'm a bit lost. I would
like to get your input to be sure I'm going into the right direction.

So, is what I need a Class driver? A mini Driver? A mapper driver? None
of them?

I guess that I can resume my problem to two secondary problems:
1/ map keys from one keyboard layout to another, I think that I can do
that with a keyboard layout. that looks not to be too hard to do.
2/ respond to keys not recognized by windows by default. for example
the Eject key and all the combinaison with the fn key. fn + F10 that is
toggle sound.

This might be the though part for me. I did already take a good look at
the hclient sample.

I can access to the eject key and to the fn key combinations, but not
the fn key alone, cool. But now, if I get correctly what the hclient
sample is doing, it's that it is accessing directly the hid. this means
that he will be the only one able to interpret...wow, minute, maybe I
get it ;) It helps explaining to others where you're stuck...

Do you agree with me when I say that I should base my program on a
hclient subset, run in the background and listen for the "special"
events from my keyboard and then do what is expected from me? like
raize or lower the sound, eject the CD etc...

Because I was not getting it how the programs where meant to
interact... But they are not meant to interact. The window progarms are
only meant to interact with the default know keys, and in case they
need to access to those special keys they have to do it on their own.

By the way, while talking about the hclient sample, I'm sorry but I
could not find the difference between button data and value data. and
all 3 kind of reports have them.

Also why is the "blocked read data" only getting a part of the pressed
keys (about half the special keys I want) and no default windows key.

Is there a way to say, hey, look, a USB keyboard... why don't you
listen to what it says and let me handle it if I want. Something like a
keyboard hook. I can handle on the fly or just modify what is passing
trough...

Last question... should I remove the apple drivers to be sure they do
not interfere with what I'm doing or can I "live" with them side by
side?

Sorry it was very long again and you time is limited.
I'll do my home work after that, I'll promiss ;)

Thank you all for having read trough here and for your help, it is very
appreciated, thanks again,
John.

--

0 new messages