so I want to simulate the key combo Shift+Home via javascript. I want that key combo effect to be applied in a input box so the text inside it will be highlighted(but that isn't happening)...
<!DOCTYPE html>
<html>
<input type = text id="BLAH" value="Hello">
<script>
var e= document.createEvent("KeyboardEvent");
e.initKeyEvent("keydown", true, true, null , false, false, true, false, 36, 0);
document.getElementById("BLAH").dispatchEvent(e);
</script>
</html>
What am I doing wrong? (I am using Firefox, that's why I use initKeyEvent and not InitKeyboardEvent)