MouseEvent metaKey Property
Definition and Usage
The metaKey property returns a boolean value indicating whether the "META" key was pressed when the mouse event was triggered.
Not all keyboards have a meta key. For Sun Microsystems keyboards and MIT and LISP machine keyboards, it is common. The meta key is marked as "META" or marked with a solid diamond "◆" symbol.
On Mac keyboards, the META key is represented by the "Command/Cmd" ("⌘") key.
Note:This property is read-only.
Example
Press "META" key while clicking the mouse button:
if (event.metaKey) { alert("The META key was pressed!"); } else { alert("The META key was NOT pressed!"); }
အသုံးပြုခြင်း
event.metaKey
နည်းပညာဆိုင်ရာ အချက်အလက်
တင်ပြချက်များ: |
ဘာလို့ မှာ meta ခွိုင်းအချက်မ ပြန်လည်ပြောင်းချိန်ရှိလာကြောင်း ညွှန်ပြတာ ဘာလို့ အမှတ်အသား နိုင်ချက်များ:
|
---|---|
DOM ပုံစံ: | DOM Level 2 Events |
ဘတ်ယာဉ် ထောက်ပံ့
အခြေခံ | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
metaKey | ထောက်ပံ့ | ထောက်ပံ့ | ထောက်ပံ့ | ထောက်ပံ့ | ထောက်ပံ့ |
ပတ်သက်သော စာမျက်နှာ
HTML DOM အခြေခံ ကိုးကားMouseEvent altKey အခြေခံ
HTML DOM အခြေခံ ကိုးကားMouseEvent ctrlKey အခြေခံ
HTML DOM အခြေခံ ကိုးကားMouseEvent shiftKey အခြေခံ