?

Log in

No account? Create an account
More Mac Hackin' - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

More Mac Hackin' [Mar. 2nd, 2002|12:20 am]
Brad Fitzpatrick
So I got my 'Fn' key working totally. The hardware does some keycode remappin' for me (or perhaps the OS handles translating keyboard "flavors" into their canonical mappings below the IOKit layer), so I just map it back when I see the "Fn I remapped for ya" flag set.

So now things be totally sweet.

Only little problem is that if I close the lid with my "Caps Lock" key "on", when I resume, the hardware upon getting its power notify message sends an HID event telling the OS the caps lock is on. Problem is, my code sees that and remaps it to the option key, so anything I click afterwards is Option-clicked.

Hack solution: whenever I power on and the caps lock light is on, just press it again, which'll send both the key up/down modifier events (special + hid).

What I really want to do is find a way to tell the keyboard driver to turn that damn light off, and check the state of it, so I can tell on wakeup if that hid message I just got was bogus or not.

My next project involves the display brightness. There are two keys to do brightness up & brightness down, but no key combos for GoMax and GoMin, like my Dell has. So now I'll make the Fn modifier do that, when used with the existing brightness keys.

Fun fun.
LinkReply

Comments:
[User Picture]From: gorgonous
2002-03-02 12:42 am (UTC)
You didn't link that 'totally sweet'.
(Reply) (Thread)