|
|
Toggling keyboard LEDs?
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Anyone know how to do this to a USB keyboard in OS X (programmatically of course)?
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
I doubt the keyboard would let you. Why would it? If that makes sense..
You might be able to find something in the keyboard drivers...? For some reason I doubt there are setXXX type methods/functions for something like that.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jan 2001
Status:
Offline
|
|
Of course there are functions... I checked apple's site -- they've got a bunch of info on the ADB Manager, but that does you no good... I think what you're looking for is in the HID Manager -- searching for that *kinda* returned some code that did something to the hardware of the keyboard -- but I have no clue what I'm talking about.
do a search on developer.apple.com for USB Manager and HID Manager...
|
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Originally posted by IamBob:
I doubt the keyboard would let you. Why would it? If that makes sense..
You might be able to find something in the keyboard drivers...? For some reason I doubt there are setXXX type methods/functions for something like that.
I'm pretty sure it was easy in OS 9. In Linux you can just make an ioctl call on /dev/tty.
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
Seriously?..
That seems really strange to me. The only LEDs on my keyboard are caps and num lock. I'm not sure I'd want "someone else" to use them..
Oh well(back on-topic..), best of luck on figuring it out!
|
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Originally posted by IamBob:
Seriously?..
That seems really strange to me. The only LEDs on my keyboard are caps and num lock. I'm not sure I'd want "someone else" to use them..
Oh well(back on-topic..), best of luck on figuring it out!
Thanks. ;o)
I have a scroll lock as well, and I've heard of people writing programs to use them as indicators for little things, e.g. network activity.
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
Ok, the geek in me can admit it...that would be cool!
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: May 2000
Location: Belgium
Status:
Offline
|
|
I've done this in MacOS 9 where it was really easy. I think that with the HID Manager you'd just toggle a few flags, kinda like how you'd make force feedback work with gamepads/joysticks.
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Dec 2001
Location: My own personal purgatory
Status:
Offline
|
|
Bonus points to whoever can make it so that the Num Lock light doesn't toggle when I hit Clear while running the Calculator.
|
"A scientist can discover a new star but he cannot make one. He would have to ask an engineer to do it for him."
|
|
|
|
|
|
|
|
Mac Elite
Join Date: May 2002
Status:
Offline
|
|
Have a look in IOKit.framework - it includes all the HID stuff. I'm not experienced enough with the IOKit to do it myself, I'm afraid.
|
[vash:~] banana% killall killall
Terminated
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jan 2001
Status:
Offline
|
|
hmmm....
/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/usb/USBSpec.h defines
enum {
kUSBCapsLockKey = 0x39,
kUSBNumLockKey = 0x53,
kUSBScrollLockKey = 0x47
};
still looking for what the hell you can do with this though...
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Nov 2000
Status:
Offline
|
|
Has anyone gone looking through the IORegistryExplorer?
I wouldn't know what to look for but there seems to be much info buried in there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|