I have this function, it should track ctrk+enter keys and send message. But function don't work. But if i call HotKeys();
in console, it works. So how to trigger it when script loaded? I new to javascript. Thanks and sry for my english.
function HotKeys() {
$('#msgbox').keydown(function (e) {
if (e.ctrlKey && e.keyCode == 13) {
document.getElementById("go").click();
}
});
}
HotKeys();