1

I want to create a Link that, if you click on it, calls a simulates a Key combination like CTRL+/ or CRTL+-.

thank you

DarkTrick
  • 2,447
  • 1
  • 21
  • 39
Alexander_F
  • 2,831
  • 3
  • 28
  • 61

1 Answers1

0

You may want to look here for a similar effect: jQuery: How to catch keydown + mouse click event?

However, if you are meaning that a user is to press:

Ctrl, /, and click at the same time, that may be more difficult. You also should consider if there is a simpler key combination for you to choose for the user's sake.

Edit:

I think I may have misunderstood what you are looking for, can you clean up the wording of your question?

I now think that you are meaning to simulate the keypress when a user clicks the link. If you are intending to use this to change the "zoom" or the text size on the page (ie: larger / smaller buttons), you should consider using em for text-sizes and then changing the top level font-size with css on the click.

This would allow you to provide the same functionality, but isn't a hackish way to get there.

Edit 2:

Here's what you're looking for: Simulate Keypress With jQuery

Community
  • 1
  • 1
sworoc
  • 1,461
  • 12
  • 13
  • i need to call a key press with click on a link. Shortcut CTRL++ must be callen with a click on a link, or a similar function. – Alexander_F Oct 08 '10 at 16:28