[Edge]。読取専用。→、、
KeyboardEvent が発生したときに Metaキーが押されていたか否かを論理値で示します。
オペレーティング システムによっては、キーが検出されないように遮蔽されることがあります。
メモ: Macintosh のキーボードでは、これは ⌘ Commandキーです。
| KeyboardEvent | KeyboardEvent。 |
|---|
論理値。true:押されていた。false:押されていなかった。
HTML:
<SPAN id=IdTest1 contenteditable>[SPAN要素。ここで編集操作…]</SPAN><BR> <INPUT id=IdTest2 type=text><BR> <SPAN id=IdLog></SPAN>
JavaScript:
function Job(eve){ //keydown イベントの処理:
D=eve;
IdLog.innerHTML="key:"+ eve.key +"<BR>"
+"code:"+ eve.code +"<BR>"
+"shiftKey:"+ eve.shiftKey +"<BR>"
+"ctrlKey:"+ eve.ctrlKey +"<BR>"
+"altKey:"+ eve.altKey +"<BR>"
+"metaKey:"+ eve.metaKey; //表示。
}
IdTest1.onkeydown=Job; //イベント割り当て。
IdTest2.onkeydown=Job; //イベント割り当て。