Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Commit

Permalink
last minute updates
Browse files Browse the repository at this point in the history
- remove unnecessary section in cch changelog
- change default setting
- add numpad symbols fix
  • Loading branch information
GaurangTandon committed Jun 29, 2019
1 parent ad59578 commit c5fa0b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 0 additions & 8 deletions html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ <h2>&#x25cf; New features</h2>
<ul>
<li>Added new FAQ content (thanks lee-tts).</li>
</ul> -->
<h2>&#x25cf; Bugs squashed</h2>
<ul>
<li>Options page no longer crashes when detecting miconfigured data storage,
and instead, helpfully allows you to recover your data easily.</li>
<li>Snippet names now appear correctly even when system language is non-English and Google Translate
is active.</li>
<li>Resumed support for old Chrome 53 and lower distributions.</li>
</ul>
<h2>&#x25cf; Functional changes</h2>
<ul>
<li>The extension no longer pops up automatically on every update. Instead, it displays a "NEW"
Expand Down
2 changes: 1 addition & 1 deletion js/commonDataHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const SETTINGS_DEFAULTS = {
charsToAutoInsertUserList: [["(", ")"], ["{", "}"], ["\"", "\""], ["[", "]"]],
dataVersion: 1,
language: "English",
hotKey: ["shiftKey", 32],
hotKey: ["shiftKey", " "],
dataUpdateVariable: true,
matchDelimitedWord: true,
tabKey: false,
Expand Down
11 changes: 10 additions & 1 deletion js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c5fa0b6

Please sign in to comment.