Re: Accessibility - Keyboard Shortcuts

  •  04-11-2005, 10:46 AM

    Re: Accessibility - Keyboard Shortcuts

    Tim:

    Yes , the shortcut displayed in context-menu is just a tool-tip . 
    You could implement it by yourself :

    First , attach the client event on editor load:

    Editor1.Attributes["oninitialized"]="OnEditorInit(this)";

    Second , write this script :
     
    <SCRIPT>
    var editor;
    var editdoc;
    function OnEditorInit(this_editor)
    {
     editor=this_editor;
     editdoc=editor.GetDocument();
     editdoc.attachEvent('onkeydown',OnEditDocKeyDown);
    }
    function OnEditDocKeyDown()
    {
     var event=editdoc.parentWindow.event;
     if(event.ctrlKey&&String.fromCharCode(event.keyCode).toLowerCase()=='s')
     {
      editor.ExecCommand("PostBack",null,"Save");
     }
    }
    </SCRIPT>


    Regards , Terry .
View Complete Thread