<p>
Press any character key, with or without holding down the CTRL key.<br />
You can also use the SHIFT key together with the CTRL key.
</p>
<pre id="output"></pre>KeyboardEvent: ctrlKey property / notebook
KeyboardEvent: ctrlKey property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const output = document.getElementById("output");
function showChar(e) {
output.textContent = `Key KeyDown: "${e.key}"
CTRL key KeyDown: ${e.ctrlKey}
`;
}
document.addEventListener("keydown", showChar);