From 8893e55daec12693197e4550a75f28885f47760f Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Sat, 29 May 2010 16:09:17 +0100 Subject: Document named key functions (per philc) --- background_page.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'background_page.html') diff --git a/background_page.html b/background_page.html index 9e43fecd..0f923869 100644 --- a/background_page.html +++ b/background_page.html @@ -15,7 +15,9 @@ var validFirstKeys = {}; var singleKeyCommands = []; - var namedKeyRegex = /^(<[amc-].|(?:[amc]-)?[a-z]{2,5}>)(.*)$/; + // Keys are either literal characters, or "named" - for example (alt+b), (the left arrow) or + // This regular expression captures two groups, the first is a named key, the second is the remainder of the string. + var namedKeyRegex = /^(<[amc-].|(?:[amc]-)?[a-z0-9]{2,5}>)(.*)$/; var defaultSettings = { scrollStepSize: 60, -- cgit v1.2.3