From 81a22885c14b3cb12dc11484b01a689f1e0c2e46 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Wed, 20 May 2015 19:46:51 +0100 Subject: Allowing mapping . Fixes #544. Copy of #655. --- README.md | 1 + background_scripts/commands.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index c391c08e..023605f4 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,7 @@ The following special keys are available for mapping: - ``, ``, `` for ctrl, alt, and meta (command on Mac) respectively with any key. Replace `*` with the key of choice. - ``, ``, ``, `` for the arrow keys +- `` for the space key - `` through `` for the function keys Shifts are automatically detected so, for example, `` corresponds to ctrl+shift+7 on an English keyboard. diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index bca1c3a4..708fe5d5 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -52,6 +52,7 @@ Commands = key.replace(/<[acm]-/ig, (match) -> match.toLowerCase()) .replace(/<([acm]-)?([a-zA-Z0-9]{2,5})>/g, (match, optionalPrefix, keyName) -> "<" + (if optionalPrefix then optionalPrefix else "") + keyName.toLowerCase() + ">") + .replace //ig, " " parseCustomKeyMappings: (customKeyMappings) -> lines = customKeyMappings.split("\n") -- cgit v1.2.3