Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Support for Apple Keyboard Eject-Key


  • Please log in to reply
12 replies to this topic
Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Hi,

with BootCamp there are now some Users installing Windows on their Macs. The Apple Keyboard has a special key to eject CDs/DVDs. On Windows this key has no effect until I install the special keyboard-driver. In both situations (driver, no driver) it's not possible to use that key in AutoHotkey. There does not appear any key in the key history.

Is it possible to support this key?
Tekl

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
It's most likely hardcoded right in. I doubt they anticipated this particular scenario when they designed their keyboard. :D

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Well, it seem's that their "driver" is just an application which gives the eject-key a function. The keyboard does work well without that driver. Maybe the Problem is, that Windows does not know about an Eject-Key of HID-Devices.
Tekl

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
Is it a firewire keyboard? (I don't actually know that much about Macs, by the way)

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
No, it's a common USB keyboard.
Tekl

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
If it doesn't appear in the key history in both cases, driver installed and not installed, then the key probably doesn't have a virtual key code assigned to it, meaning AHK will have a tough time accessing it. You could see if:
- It allows you to assign it to a key, that you can then assign a hotkey to.
- It allows you to run an executable for the function, thus run a script.

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
So, AHK does get any scancode from the keyboard, and if not, the key does not send a scancode? So how does Apple get the key working?
Tekl

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

So how does Apple get the key working?

A driver is low level, it can perfectly bypass high level code (ie. don't expose scan code to the system) but directly talk to the driver when it sees the key. Autarkic behavior...
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
You've probably already seen DLLCall: Support for Human Interface devices, but if not it might be one of the few methods other than WM_INPUT (which I don't know how to do yet).

Tekl
  • Members
  • 814 posts
  • Last active: May 03 2009 03:28 PM
  • Joined: 24 Sep 2004
Ah, Thanks. That's very nice. I'll try it. Are there plans to integrate HID-Support into AHK?
Tekl

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
No specific plans at this time, though certain it falls within the primary missions of AutoHotkey.

Frits Jan
  • Guests
  • Last active:
  • Joined: --
I used this post to turn the eject and fn key into a special key:

http://www.autohotke.../topic7135.html

Good luck!

scotia
  • Members
  • 9 posts
  • Last active: Nov 10 2009 02:28 PM
  • Joined: 09 Nov 2009
Frits Jan - how??!