+ Start a Discussion
Swaggy BSwaggy B 

ShortKey not working.

I have a component with some fields and what not on there, basically I am trying to get a button to click using Shift + c, I have setup the short key via the app. this is what i have in my Component and Script. the ID of my component is called theComponent and the page where I use the component, id is called thePage. when i hit Shift + C nothing happens. 

sforce.console.addEventListener('SHIFT+C', function() {
    <apex:form id="theForm">
        <apex:pageBlock mode="detail" id="pageBlockSection" rendered="{!!currentContact}" >
            <apex:pageBlockButtons id="blockButtons">
                <apex:actionStatus id="finishChangedNew" onstart="openPopUp()"/>
                <apex:commandButton id="addContact" alt="Add Contact" value="Add Contact" action="{!addContact}" status="finishChangedNew" onclick="document.getElementById('{!$Component.thePage.externalComponentId.theComponent.theForm.contactId}').value = '';"  />
                <br></br>......etc. </apex:form>
ShashankShashank (Salesforce Developers) 
Please see if this helps: http://salesforce.stackexchange.com/questions/30100/how-to-create-a-custom-keyboard-shortcut-for-the-salesforce-console