1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 23:02:27 +01:00

support for space and alt-left/right keys

This commit is contained in:
Martin Stubenschrott
2007-04-18 11:42:15 +00:00
parent 415a9119cc
commit c431f8c2e5
5 changed files with 26 additions and 15 deletions

View File

@@ -942,10 +942,18 @@ function keyToString(event)
return null;
}
// special handling of the Space key
if (event.charCode == 32)
{
if (event.shiftKey)
modifier += "S-";
key = "Space";
}
// a normal key like a, b, c, 0, etc.
if (event.charCode > 0)
{
if (modifier.length > 0)
if (modifier.length > 0 || event.charCode == 32)
return "<" + modifier + key + ">";
else
return key;