Accessibility - Keyboard Shortcuts

Last post 04-11-2005, 10:46 AM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  03-23-2005, 5:45 AM 4903

    Accessibility - Keyboard Shortcuts

    Hi,

    My accessibility guidelines require me to be able to associate a keyboard shortcut with each button that appears on the toolbar. You have done this for some of the standard toolbar buttons (e.g. Bold, Undo), but not for others (e.g. Save).

    As far as I can work out, the effect of the hotkey attribute in the toolbar configuration file is to display a tooltip, but it doesn't actually change or add new keyboard associations. I've found what I thought to be the (obfuscated) code that CuteEditor uses to associate hotkeys with toolbar buttons in \CuteSoft_Client\CuteEditor\CuteEditor.htc.ctxmenu.htm but changing this seems to have had no effect.

    I'm currently using CuteEditor version 4.0.0.4. Ideally, I'd like to be able to add an arbitrary keyboard shortcut for each button, but the Save button is the most crucial. Is there already a shortcut that I haven't found for the Save button, or alternatively, please could you suggest a way of adding one?

    Thanks,
    --Tim

  •  04-11-2005, 10:46 AM 5569 in reply to 4903

    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 as RSS news feed in XML