Hello all,

How do you create shortcut keys in DQSD?

For example, if I want to simulate the googlebar shortcut keys for
CTRL+SHIFT+I searches Google Images - how do I hook that key
combination?

I looked in the code for examples and the only one I found was in the
genealogy addin, but I don't understand how it works. Here's what
appears to be the relevant code:

'// ========================================================
function genealogy_keypressHook(keypressEvent)
{
//  alert("genealogy_keypressHook: "+keypressEvent.keyCode);
  return false;
}

function genealogy_okp()
{
  if (okp() == false) {
        return false;
  } else {
        return (genealogy_keypressHook(window.event) == false) ? true :
false;
  }
}

if (typeof registerKeypressHook == "function") {
  registerKeypressHook(genealogy_keypressHook);
} else {
  document.onkeypress = genealogy_okp;
}
'// ========================================================

If I'm reading it correctly, it adds an onkeypress hook to the stack,
but doesn't (1) set it system-wide, and (2) identify the key
combination used to raise the function.

Does the method identified run for every key pressed, and not simply
whatever combination requested? This would have the added benefit of
easing key-reassingments for the method called, but would effectively
increase the call stack for every keypress if a large number of key
hooks are created.

I'm going to play with it a bit and see what I can do - if anyone has
an answer before I figure it out I'd really appreciate it.

Thanks all,

Shawn K. Hall
http://ReliableAnswers.com/

'// ========================================================
    "There is time for everything."
       -- Thomas A. Edison




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
DQSD-Devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to