Open Bouh opened 5 months ago
Is this a great idea? I got this to work and found out that CTRL+D is also the key that bookmarks pages.
This default browser behavior can be prevent by a Javascript code like:
document.querySelector('html').addEventListener('keydown', handleKeyDown);
function handleKeyDown( e ) {
if ( e.ctrlKey && e.keyCode === 68 ) { // ctrl + d
console.log('Ctrl+D');
}
e.preventDefault();
}
I was more suggesting that we don't do that anywhere else in the codebase (to my knowledge), would it perhaps be better to change the keybind?
Hi @bouh, I'm going to take your advice and tackle this issue to pass my course
document.addEventListener('keydown', (e) => { const { key, ctrlKey } = e; if (ctrlKey && key.toLowerCase() === 'd') { console.log('Ctrl+D'); e.preventDefault(); } });
hello @9Amit i am on this issue
Description
Please add the CTRL+D duplicate on the object list.