Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading modifier keys?



Hi,

This may work for you.

# # #

function onload() {
    document.captureEvents(Event.KEYDOWN);
    document.onkeydown = setkey;

}

function setkey(event){
    if (true == event.ctrlKey)

    } else if (true == event.metaKey) { // This is Apple key

    } else {
        return;
    }

    ...

}


Best, Xia


On Jun 28, 2005, at 10:30 PM, Matt Sephton wrote:


Hi,

Does anybody have example code (in an email or in an existing widget) of how to read the modifier keys (Control, Alt, Apple, Shift)?

Thanks,
matt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/xia% 40horneddragon.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden
References: 
 >Reading modifier keys? (From: Matt Sephton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.