Skip to content

Commit

Permalink
Added installation instructions; modified start script to start up ch…
Browse files Browse the repository at this point in the history
…romium browser w/virtual keyboard
  • Loading branch information
wfsaxton committed Jun 26, 2023
1 parent 0bd7752 commit f2d8b43
Show file tree
Hide file tree
Showing 39 changed files with 3,926 additions and 2 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# This is a dashboard for my family

To run, make sure to copy config/config.ts.sample to config/config.ts.
## Quick install and run

If you don't have a config yet, use the example one

```
$ cp config/config.ts.sample config/config.ts
```

Then install and run

```
$ npm i
$ npm run build
$ npm run start
```
10 changes: 10 additions & 0 deletions installer/virtual-keyboard-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Virtual Keyboard for Google Chrome™
=========================================

Virtual Keyboard for Google Chrome™ will popup automatically when the user clicks on an input field such as textboxes and textareas. Futhermore, the keyboard will disappear automatically once no longer needed.

This extension is ideal for touch screen devices. This keyboard works like an iOS/Android/Windows 8 touch virtual keyboard.

<img src="http://xontab.azurewebsites.net/Content/VirtualKeyboard/1.png" alt="" />

For more details visit: http://xontab.com/Apps/VirtualKeyboard/
16 changes: 16 additions & 0 deletions installer/virtual-keyboard-extension/background.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script>
chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
if (request.method == "getLocalStorage")
{
sendResponse({data: localStorage[request.key]});
}
else if (request.method == "setLocalStorage")
{
localStorage[request.key] = request.value;
sendResponse({data: "ok"});
}
else {
sendResponse({});
}
});
</script>
123 changes: 123 additions & 0 deletions installer/virtual-keyboard-extension/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
if (request.method == "getLocalStorage")
{
sendResponse({data: localStorage[request.key]});
}
else if (request.method == "getSmallKeyboardCoords")
{
sendResponse({smallKeyboard: localStorage["smallKeyboard"], smallKeyboardTop: localStorage["smallKeyboardTop"], smallKeyboardBottom: localStorage["smallKeyboardBottom"], smallKeyboardRight: localStorage["smallKeyboardRight"], smallKeyboardLeft: localStorage["smallKeyboardLeft"]});
}
else if (request.method == "loadKeyboardSettings")
{
sendResponse({openedFirstTime: localStorage["openedFirstTime"],
capsLock: localStorage["capsLock"],
smallKeyboard: localStorage["smallKeyboard"],
touchEvents: localStorage["touchEvents"],
keyboardLayout1: localStorage["keyboardLayout1"],
urlButton: localStorage["urlButton"],
keyboardEnabled: localStorage["keyboardEnabled"]});
}
else if (request.method == "initLoadKeyboardSettings")
{
sendResponse({hardwareAcceleration: localStorage["hardwareAcceleration"],
zoomLevel: localStorage["zoomLevel"],
autoTrigger: localStorage["autoTrigger"],
repeatLetters: localStorage["repeatLetters"],
intelligentScroll: localStorage["intelligentScroll"],
autoTriggerLinks: localStorage["autoTriggerLinks"],
autoTriggerAfter: localStorage["autoTriggerAfter"]});
}
else if (request.method == "setLocalStorage")
{
localStorage[request.key] = request.value;
sendResponse({data: "ok"});
}
else if (request.method == "openFromIframe")
{
chrome.tabs.getSelected(null, function(tab) {
chrome.tabs.sendRequest(tab.id, request);
});
}
else if (request.method == "clickFromIframe")
{
chrome.tabs.getSelected(null, function(tab) {
chrome.tabs.sendRequest(tab.id, request);
});
}
else if (request.method == "toogleKeyboard")
{
if (localStorage["keyboardEnabled"] != "false") {
localStorage["keyboardEnabled"] = "false";
} else {
localStorage["keyboardEnabled"] = "true";
}
chrome.tabs.getSelected(null, function(tab) {
vkeyboard_loadPageIcon(tab.id);
if (localStorage["keyboardEnabled"] == "false") {
chrome.tabs.sendRequest(tab.id, "closeKeyboard");
} else {
chrome.tabs.sendRequest(tab.id, "openKeyboard");
}
})
sendResponse({data: "ok"});
}
else if (request.method == "toogleKeyboardOn")
{
localStorage["keyboardEnabled"] = "true";
chrome.tabs.getSelected(null, function(tab) {
vkeyboard_loadPageIcon(tab.id);
chrome.tabs.sendRequest(tab.id, "openKeyboard");
})
sendResponse({data: "ok"});
}
else if (request.method == "toogleKeyboardDemand")
{
localStorage["keyboardEnabled"] = "demand";
chrome.tabs.getSelected(null, function(tab) {
vkeyboard_loadPageIcon(tab.id);
chrome.tabs.sendRequest(tab.id, "openKeyboard");
})
sendResponse({data: "ok"});
}
else if (request.method == "toogleKeyboardOff")
{
localStorage["keyboardEnabled"] = "false";
chrome.tabs.getSelected(null, function(tab) {
vkeyboard_loadPageIcon(tab.id);
chrome.tabs.sendRequest(tab.id, "closeKeyboard");
})
sendResponse({data: "ok"});
}
else if (request.method == "openUrlBar")
{
chrome.tabs.getSelected(null, function(tab) {
chrome.tabs.sendRequest(tab.id, "openUrlBar");
sendResponse({data: "ok" });
});
} else if (request.method == "createTab") {
chrome.tabs.create({ url: request.url });
}
else {
sendResponse({});
}
});

function vkeyboard_loadPageIcon(tabId) {
if (localStorage["keyboardEnabled"] == "demand") {
chrome.pageAction.setIcon({ tabId: tabId, path: "buttons/keyboard_2.png" }, function() { })
} else if (localStorage["keyboardEnabled"] != "false") {
chrome.pageAction.setIcon({ tabId: tabId, path: "buttons/keyboard_1.png" }, function() { })
} else {
chrome.pageAction.setIcon({ tabId: tabId, path: "buttons/keyboard_3.png" }, function() { })
}
}

chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
if (localStorage["toogleKeyboard"] != "false") {
chrome.pageAction.show(tabId);
vkeyboard_loadPageIcon(tabId);
} else {
localStorage["keyboardEnabled"] = "true";
chrome.pageAction.hide(tabId);
}
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added installer/virtual-keyboard-extension/icons/enter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 138 additions & 0 deletions installer/virtual-keyboard-extension/keyboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
<div id="virtualKeyboardChromeExtensionOverlayScrollExtend" style="display: none; height:500px">
</div>
<div id="virtualKeyboardChromeExtensionOverlayDemand" style="display: none;">
</div>
<div id="virtualKeyboardChromeExtensionOverlaySettings" _state="closed" class="virtualKeyboardChromeExtensionOverlay" style="display: none;">
<ul id="virtualKeyboardChromeExtensionOverlaySettingsUl">
<li class="virtualKeyboardChromeExtensionOverlayButton" _action="setKeyboard" _layout="en">EN</li>
<li class="virtualKeyboardChromeExtensionOverlayButton" _action="setKeyboard" _layout="ru">RU</li>
</ul>
</div>
<div id="virtualKeyboardChromeExtensionUrlBar" style="top: -100px;">
<form onsubmit="this.action = 'http://'+document.getElementById('virtualKeyboardChromeExtensionUrlBarTextBox').value;">
<input type="text" id="virtualKeyboardChromeExtensionUrlBarTextBox" placeholder="http://" />
<input type="submit" value="Go" />
</form>
</div>
<div id="virtualKeyboardChromeExtension">
<div id="virtualKeyboardChromeExtensionDraggableLeft"></div>
<div id="virtualKeyboardChromeExtensionDraggableRight"></div>
<div id="virtualKeyboardChromeExtensionNumberBarKbdInput" style="display: none;">
<table cellpadding="2">
<tr>
<td class="kbdH kbdClick" _key="7"><span>7</span></td>
<td class="kbdH kbdClick" _key="8"><span>8</span></td>
<td class="kbdH kbdClick" _key="9"><span>9</span></td>
<td class="kbdH kbdClick" _key="#"><span>#</span></td>
<td class="kbdD kbdClick" _key="Backspace" rowspan="2"><span>Back</span></td>
</tr>
</table>
<table cellpadding="2">
<tr>
<td class="kbdH kbdClick" _key="4"><span>4</span></td>
<td class="kbdH kbdClick" _key="5"><span>5</span></td>
<td class="kbdH kbdClick" _key="6"><span>6</span></td>
<td class="kbdH kbdClick" _key="-"><span>-</span></td>
<td class="kbdH kbdClick" _key=")"><span>)</span></td>
</tr>
</table>
<table cellpadding="2">
<tr>
<td class="kbdH kbdClick" _key="1"><span>1</span></td>
<td class="kbdH kbdClick" _key="2"><span>2</span></td>
<td class="kbdH kbdClick" _key="3"><span>3</span></td>
<td class="kbdH kbdClick" _key="+"><span>+</span></td>
<td class="kbdH kbdClick" _key="("><span>(</span></td>
</tr>
</table>
<table cellpadding="2">
<tr>
<td class="kbdH kbdClick" _key="0"><span>0</span></td>
<td class="kbdH kbdClick" _key="."><span>.</span></td>
<td class="kbdH kbdClick" _key="*"><span>*</span></td>
<td class="kbdH kbdClick" _key="$"><span>$</span></td>
<td class="kbdD kbdClick" _key="Enter"><span>Enter</span></td>
</tr>
</table>
</div>
<div id="virtualKeyboardChromeExtensionMainKbd">
<table cellpadding="2" id="virtualKeyboardChromeExtensionNumberBarKbd1">
<tr>
<td class="kbdH kbNumberMain kbdClick " _key="1"><span>1</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="2"><span>2</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="3"><span>3</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="4"><span>4</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="5"><span>5</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="6"><span>6</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="7"><span>7</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="8"><span>8</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="9"><span>9</span></td>
<td class="kbdH kbNumberMain kbdClick " _key="0"><span>0</span></td>
</tr>
</table>
<div id="virtualKeyboardChromeExtensionMainKbdPH"></div>
</div>
<div id="virtualKeyboardChromeExtensionMainNumbers" style="display: none;">
<table cellpadding="2">
<tr>
<td class="kbdH kbdClick" _key="_"><span>_</span></td>
<td class="kbdH kbdClick" _key="\"><span>\</span></td>
<td class="kbdH kbdClick" _key=":"><span>:</span></td>
<td class="kbdH kbdClick" _key=";"><span>;</span></td>
<td class="kbdH kbdClick" _key=")"><span>)</span></td>
<td class="kbdH kbdClick" _key="("><span>(</span></td>
<td class="kbdH kbdClick" _key="/"><span>/</span></td>
<td class="kbdH kbdClick" _key="^"><span>^</span></td>
<td class="kbdH kbdClick" _key="1"><span>1</span></td>
<td class="kbdH kbdClick" _key="2"><span>2</span></td>
<td class="kbdH kbdClick" _key="3"><span>3</span></td>
<td style="width: 2px;"><span></span></td>
<td class="kbdD kbdClick" _key="Backspace"><span class="kBack"></span></td>
</tr>
<tr>
<td class="kbdH kbdClick" _key="&euro;"><span>&euro;</span></td>
<td class="kbdH kbdClick" _key="$"><span>$</span></td>
<td class="kbdH kbdClick" _key="&pound;"><span>&pound;</span></td>
<td class="kbdH kbdClick" _key="&"><span>&amp;</span></td>
<td class="kbdH kbdClick" _key="@"><span>@</span></td>
<td class="kbdH kbdClick" _key='"'><span>"</span></td>
<td class="kbdH kbdClick" _key="*"><span>*</span></td>
<td class="kbdH kbdClick" _key="~"><span>~</span></td>
<td class="kbdH kbdClick" _key="4"><span>4</span></td>
<td class="kbdH kbdClick" _key="5"><span>5</span></td>
<td class="kbdH kbdClick" _key="6"><span>6</span></td>
<td style="width: 2px;"><span></span></td>
<td class="kbdD kbdClick" _key="Enter"><span class="kEnter"></span></td>
</tr>
<tr>
<td class="kbdH kbdClick" _key="?"><span>?</span></td>
<td class="kbdH kbdClick" _key="!"><span>!</span></td>
<td class="kbdH kbdClick" _key="'"><span>'</span></td>
<td class="kbdH kbdClick" _key="_"><span>_</span></td>
<td class="kbdH kbdClick" _key="<"><span>&lt;</span></td>
<td class="kbdH kbdClick" _key=">"><span>&gt;</span></td>
<td class="kbdH kbdClick" _key="-"><span>-</span></td>
<td class="kbdH kbdClick" _key="`"><span>`</span></td>
<td class="kbdH kbdClick" _key="7"><span>7</span></td>
<td class="kbdH kbdClick" _key="8"><span>8</span></td>
<td class="kbdH kbdClick" _key="9"><span>9</span></td>
<td style="width: 2px;"><span></span></td>
<td class="kbdD kbdClick" _key="&123"><span class="kAbc">ABC</span></td>
</tr>
<tr>
<td class="kbdH kbdClick" _key="["><span>[</span></td>
<td class="kbdH kbdClick" _key="]"><span>]</span></td>
<td class="kbdH kbdClick" _key="{"><span>{</span></td>
<td class="kbdH kbdClick" _key="}"><span>}</span></td>
<td class="kbdH kbdClick" _key="#"><span>#</span></td>
<td class="kbdH kbdClick" _key=","><span>,</span></td>
<td class="kbdH kbdClick" _key="+"><span>+</span></td>
<td class="kbdH kbdClick" _key="%"><span>%</span></td>
<td colspan="2" class="kbdH kbdClick" _key="0"><span>0</span></td>
<td class="kbdD kbdClick" _key="."><span>.</span></td>
<td style="width: 2px;"><span></span></td>
<td class="kbdD kbdClick" _key="Close"><span class="kClose"></span></td>
</tr>
</table>
</div>
</div>
Binary file added installer/virtual-keyboard-extension/keyboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f2d8b43

Please sign in to comment.