user2523188
user2523188

Reputation: 61

Simulate a Keyboard shortcut using HTML/Javascript

I have a windows application running which takes screenshot when I press "ALT+Z". I want to trigger the same action in HTML/JS; that is the HTML/JS should simulate/trigger a "ALT+Z" so that the windows application takes a screenshot.

Upvotes: 1

Views: 1473

Answers (1)

MrCode
MrCode

Reputation: 64526

Use the accesskey attribute:

<input type="button" accesskey="z" />

This will invoke the click when alt + z is pressed.

Upvotes: 1

Related Questions