PDA

View Full Version : PHP question involving shortcut keys



Moonbat
09-10-2007, 06:03 PM
Okay, I noticed that when I'm typing here to make a post, I can press Ctrl+B and the Bold Tags will appear.

I want to use this feature. When the user presses Ctrl+Y for example, it'll take them to a secret part of the site.

I think this is some time of PHP thing, but it could be JS too. So, how would I do this?

Ezekiel
09-10-2007, 06:29 PM
Okay, I noticed that when I'm typing here to make a post, I can press Ctrl+B and the Bold Tags will appear.

I want to use this feature. When the user presses Ctrl+Y for example, it'll take them to a secret part of the site.

I think this is some time of PHP thing, but it could be JS too. So, how would I do this?

It's almost definitely Javascript, unless you do some sort of elite AJAX coding to check each user key press.

You'd probably have to use onkeydown or something like that. I never learned that much Javascript, so check here:

http://www.w*schools.com/jsref/jsref_events.asp