I would like to fake i.e trigger a keycode event which matches a custom keycode defined in the CE-HTML standard for NetTV. Is this possible from the javascript console in chrome / firefox? I tried:
var e = jQuery.Event("keydown");
e.which = 406; // this is the custom keycode value for constant VK_BLUE (blue button on remote control)
$("input").trigger(e);
But it has no effect. I have a feeling this might be restricted.
If its not possible, can I send a code like that from my operating system (OSX) by triggering that keycode event somehow? Or is 406 completely meaningless outside of the NetTV environment?
You should be able to fake an event object like so:
documentation