press shift + space

🚧 under construction

browsereventtype ⟩ key ⟩ example ⟩ press shift + space

keydown / keyup – keyboard key is pressed / released.

// ⭐️ import
import { $ } from './js/ext/Node_ext.js'; // Node extension

const cat = $('#cat');
let hidden = true;

// ⭐️ onkeydown
window.addEventListener("keydown", event => {
    // ⭐️ shift + space
    if (event.key == " " && event.shiftKey) {
        hidden = !hidden;
        cat.style.display = hidden ? 'none' : 'inline';
    }
});

Last updated