Assigning hotkeys to custom buttons in Sage CRM
Posted
by
CodeGeek
on Stack Overflow
See other posts from Stack Overflow
or by CodeGeek
Published on 2010-12-14T03:04:50Z
Indexed on
2010/12/21
5:00 UTC
Read the original article
Hit count: 257
hotkeys
|shortcut-key
Hi All, I'm trying to assign a hotkey to a custom buttom in Sage CRM. I'm able to do so for one keypress. However, it doesn't seem to work if I try to use a combination of keys, for example, 'Alt+C' Please refer my code below:
document.onkeypress = onKeyPress;
var flag = false;
function onKeyPress()
{
if(window.event.keyCode == 18)
{
flag = true;
}
if(window.event.keyCode == 67 && flag)
{
alert("Successful!!!");
}
}
© Stack Overflow or respective owner