Previous articles have discussed how Hot Keys can be added into Sage CRM.

What these articles have not explained is how the Hot Keys are implemented as code within the Sage CRM screens.

If we consider a screen like the Case Summary screen shown above, there are number HotKeys indicated on the screen.

These are 

  • Change, [Alt][H]
  • Continue, [Alt][O]
  • Summary Report, [Alt][R]
  • Help, [Alt][P]

As the article "Adding a Hot Key keystroke to a Custom Button (added using Button Groups)" explained these are actually added using Sage CRM's standard translation feature.

You can search for these in the area

Administration -> Customization -> Translations

Caption Family Caption Code US Translation
Button Change C&hange
Button Continue C&ontinue
Button ExecuteSummaryReport Summary &Report
Button Help Hel&p

Entering the translation provides the prompt on the screen, but actually all of the Hot Keys in Sage CRM are implemented in the browser as the HTML property "AccessKey".

Buttons in the Sage CRM interface are created as HTML hyperlinks.  For each "button" there is the image and there is the associated text with a hyperlink.

We can see that by looking at the HTML of the page.

Below is the HTML that is used to create the button "Add this record to a group".  We can see the reference to the image and the text and how they are hyperlinked.  


<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD><A class=ButtonItem onclick="ADDTOGROUP=window.open('/crmdpp/eware.dll/Do?SID=1609689983994&amp;Act=595&amp;Mode=1&amp;CLk=T&amp;Key0=8&amp;Key1=51&amp;Key2=65&amp;Key8=48&amp;Key50=582','ADDTOGROUP','width=420,height=200,scrollbars=yes,resizable=yes');" href="#"><IMG title="" border=0 align=middle src="/crmdpp/Themes/img/color/Buttons/AddRecToGroup.gif"></A></TD>
<TD>&nbsp;</TD>
<TD><A class=ButtonItem onclick="ADDTOGROUP=window.open('/crmdpp/eware.dll/Do?SID=1609689983994&amp;Act=595&amp;Mode=1&amp;CLk=T&amp;Key0=8&amp;Key1=51&amp;Key2=65&amp;Key8=48&amp;Key50=582','ADDTOGROUP','width=420,height=200,scrollbars=yes,resizable=yes');" href="#">Add this record to a Group</A></TD></TR></TBODY></TABLE>
 

But there is no Hot Key associated with the "Add this record to a group" button.  Contrast this with the code below for the help button.  


<TABLE border=0 cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD><A accessKey=p class=ButtonItem onfocus="if (event &amp;&amp; event.altKey) { this.blur(); click(); this.blur();  }" title=Help tabIndex=100 onclick="  javascript:window.open(' /crmdpp/help/EN/Main Menu/Default_CSH.htm#User/CA_FAQs.htm', 'HELPWIN','scrollbars=yes,toolbar=no,menubar=no,resizable=yes,top=200, width=600,height=400');  " target=EWARE_HELP><IMG title="" border=0 align=middle src="/crmdpp/Themes/img/color/Buttons/help.gif"></A></TD>
<TD>&nbsp;</TD>
<TD><A accessKey=p class=ButtonItem onfocus="if (event &amp;&amp; event.altKey) { this.blur(); click(); this.blur();  }" title=Help tabIndex=100 onclick="  javascript:window.open(' /crmdpp/help/EN/Main Menu/Default_CSH.htm#User/CA_FAQs.htm', 'HELPWIN','scrollbars=yes,toolbar=no,menubar=no,resizable=yes,top=200, width=600,height=400');  " target=EWARE_HELP>Hel<FONT style="TEXT-DECORATION: underline">p</FONT></A></TD></TR></TBODY></TABLE>
 

Both buttons are quite complex in their behaviour.  They both pop up windows and invoke javascript. BUT the important difference is that the Help button uses the AccessKey property e.g. "<A accessKey=p class=....".