Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick

More Mac Hackin'

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.

  • Happy Birthday!

    Happy 20th Birthday, LiveJournal! 🐐🎂🎉

  • hi

    Posting from the iPhone app. Maybe I'm unblocked now.

  • Why, hello...

    Long time no see. How's my baby doing?

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment