From c5fa0b6a075aef408519dd45e92f30170f8c869c Mon Sep 17 00:00:00 2001
From: GaurangTandon <1gaurangtandon@gmail.com>
Date: Sat, 29 Jun 2019 08:38:14 +0530
Subject: [PATCH] last minute updates - remove unnecessary section in cch
changelog - change default setting - add numpad symbols fix
---
html/options.html | 8 --------
js/commonDataHandlers.js | 2 +-
js/options.js | 11 ++++++++++-
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/html/options.html b/html/options.html
index d9b2fc7..88eedd4 100644
--- a/html/options.html
+++ b/html/options.html
@@ -64,14 +64,6 @@
● New features
- Added new FAQ content (thanks lee-tts).
-->
- ● Bugs squashed
-
- - Options page no longer crashes when detecting miconfigured data storage,
- and instead, helpfully allows you to recover your data easily.
- - Snippet names now appear correctly even when system language is non-English and Google Translate
- is active.
- - Resumed support for old Chrome 53 and lower distributions.
-
● Functional changes
- The extension no longer pops up automatically on every update. Instead, it displays a "NEW"
diff --git a/js/commonDataHandlers.js b/js/commonDataHandlers.js
index aceb253..a4c557b 100644
--- a/js/commonDataHandlers.js
+++ b/js/commonDataHandlers.js
@@ -10,7 +10,7 @@ const SETTINGS_DEFAULTS = {
charsToAutoInsertUserList: [["(", ")"], ["{", "}"], ["\"", "\""], ["[", "]"]],
dataVersion: 1,
language: "English",
- hotKey: ["shiftKey", 32],
+ hotKey: ["shiftKey", " "],
dataUpdateVariable: true,
matchDelimitedWord: true,
tabKey: false,
diff --git a/js/options.js b/js/options.js
index 69614aa..ba32ff0 100644
--- a/js/options.js
+++ b/js/options.js
@@ -711,12 +711,21 @@ Please wait at least five minutes and try again.`);
if (keyCode >= 48 && keyCode <= 57) {
return (keyCode - 48).toString();
}
- if (keyCode >= 96 && keyCode <= 111) {
+ if (keyCode >= 96 && keyCode <= 105) {
return (keyCode - 96).toString();
}
+
if (keyCode >= 65 && keyCode <= 90) {
return String.fromCharCode(keyCode);
}
+
+ // numpad symbols - 106 to 111 (108 does not exist)
+ // http://www.foreui.com/articles/Key_Code_Table.htm
+ const numPadPunctuation = "*+U-./";
+ if (keyCode >= 106 && keyCode <= 111) {
+ return numPadPunctuation[keyCode - 106];
+ }
+
// the first one starts from 186
const punctuationChars = ";=,-./`";
if (keyCode >= 186 && keyCode <= 192) {