How to fire a keyboard shortcut function in JavaScript? <p>I have a record functionality in my website. If a user hits <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>R</kbd> the recording will begin. Now I would like a button named <code>RECORD</code> in my html page, so that when a user hits that button recording will start.</p> <pre><code>&lt;button type="submit" class="btn btn-primary" data-toggle="tooltip" data-placement="top" onclick="record_session()" title="Start Recording"&gt;Record&lt;/button&gt; </code></pre> <p>in my function below</p> <pre><code>function record_session(){ //how can i trigger or initiate ctrl+alt+r here?? } </code></pre>