Skip to content

Instantly share code, notes, and snippets.

@arantius
Created April 1, 2011 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arantius/898642 to your computer and use it in GitHub Desktop.
Save arantius/898642 to your computer and use it in GitHub Desktop.
GM_registerMenuCommand() accelerator tester
// ==UserScript==
// @name GM_registerMenuCommand() accelerator tester
// @namespace http://arantius.com/misc/greasemonkey/
// @description A flexible test script for examining if/how GM_rmc's accelerator keys work
// @include about:blank#GM_rmc
// ==/UserScript==
<table>
<tr>
<td>Modifiers:</td>
<td id="modifiers">
<input type="checkbox" value="shift"> Shift<br>
<input type="checkbox" value="alt"> alt<br>
<input type="checkbox" value="meta"> meta<br>
<input type="checkbox" value="control"> Control<br>
<input type="checkbox" value="accel"> accel<br>
<input type="checkbox" value="access"> access<br>
<input type="checkbox" value="any"> any<br>
</td>
</tr>
<tr>
<td>Accelerator key:</td>
<td><input type="text" size="1" maxlength="1" id="accelerator"></td>
</tr>
<tr>
<td></td>
<td><button id="register">Register this menu command</button></td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment