Function Key

Results 1 to 3 of 3

Thread: Function Key

  1. #1
    Join Date
    Dec 1969

    Default Function Key

    Hi!<BR><BR>Is there a way to trap function Key "F3" and attach our function<BR>to that key?<BR><BR>Thanks,<BR>Ana

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Dont think so <eop>


  3. #3
    Reggie Guest

    Default Probably not.

    I don&#039;t think you can use function keys. When I press F3, the search sidebar pops up in IE, so I don&#039;t think you&#039;d be able to override the system call.<BR><BR>BUT, if are willing to make it a different key, this code is exactly what you need. The obvious problem is that there&#039;s no way to get the "hotkey" number for the F3 key: <BR><BR>&#060;script language="JavaScript1.2"&#062;<BR><BR>/*<BR>Home Hot Key Script- <BR>© Dynamic Drive (<BR>For full source code, installation instructions,<BR>100&#039;s more DHTML scripts, and Terms Of<BR>Use, visit<BR>*/<BR><BR>var hotkey=106<BR>var destination=""<BR>if (document.layers)<BR>document.captureEvents(Event. KEYPRESS)<BR>function backhome(e){<BR>if (document.layers){<BR>if (e.which==hotkey)<BR>window.location=destination<B R>}<BR>else if (document.all){<BR>if (event.keyCode==hotkey)<BR>window.location=destina tion<BR>}<BR>}<BR>document.onkeypress=backhome<BR> <BR>&#060;/script&#062;<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts