Update ready for pull request

pull/1814/head
sir-indy 2022-05-10 20:20:43 +01:00
parent 18967ef7cc
commit 0b3de60a79
6 changed files with 43 additions and 3 deletions

View File

@ -2,8 +2,15 @@
A library that provides the ability to input text in a style familiar to anyone who had a mobile phone before they went all touchscreen. A library that provides the ability to input text in a style familiar to anyone who had a mobile phone before they went all touchscreen.
Swipe right for Space, left for Backspace, and up/down for Caps lock. Tap the '?' button in the app if you need a reminder!
At time of writing, only the [Noteify app](http://microco.sm/out/Ffe9i) uses a keyboard.
Uses the multitap keypad logic originally from here: http://www.espruino.com/Morse+Code+Texting Uses the multitap keypad logic originally from here: http://www.espruino.com/Morse+Code+Texting
![](screenshot_1.png) ![](screenshot_1.png)
![](screenshot_2.png) ![](screenshot_2.png)
Written by: [Sir Indy](https://github.com/sir-indy) and [Thyttan](https://github.com/thyttan)
For support and discussion please post in the [Bangle JS Forum](http://forum.espruino.com/microcosms/1424/)

View File

@ -6,8 +6,8 @@ exports.input = function(options) {
if ("string"!=typeof text) text=""; if ("string"!=typeof text) text="";
var settings = require('Storage').readJSON("kbmulti.settings.json", true) || {}; var settings = require('Storage').readJSON("kbmulti.settings.json", true) || {};
if (settings.firstLaunch==undefined) { settings.firstLaunch = true; } if (settings.firstLaunch===undefined) { settings.firstLaunch = true; }
if (settings.charTimeout==undefined) { settings.charTimeout = 500; } if (settings.charTimeout===undefined) { settings.charTimeout = 500; }
var fontSize = "6x15"; var fontSize = "6x15";
var Layout = require("Layout"); var Layout = require("Layout");

View File

@ -9,6 +9,8 @@
"screenshots": [{"url":"screenshot_1.png"},{"url":"screenshot_2.png"}], "screenshots": [{"url":"screenshot_1.png"},{"url":"screenshot_2.png"}],
"readme": "README.md", "readme": "README.md",
"storage": [ "storage": [
{"name":"textinput","url":"lib.js"} {"name":"textinput","url":"lib.js"},
{"name":"kbmulti.settings.js","url":"settings.js"},
{"name":"kbmulti.settings.json","url":"kbmulti.settings.json"}
] ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 23 KiB

31
apps/kbmulti/settings.js Normal file
View File

@ -0,0 +1,31 @@
(function(back) {
function settings() {
var settings = require('Storage').readJSON("kbmulti.settings.json", true) || {};
if (settings.firstLaunch===undefined) { settings.firstLaunch = true; }
if (settings.charTimeout===undefined) { settings.charTimeout = 500; }
return settings;
}
function updateSetting(setting, value) {
var settings = require('Storage').readJSON("kbmulti.settings.json", true) || {};
settings[setting] = value;
require('Storage').writeJSON("kbmulti.settings.json", settings);
}
var mainmenu = {
"" : { "title" : /*LANG*/"Multitap keyboard" },
"< Back" : back,
/*LANG*/'Character selection timeout [ms]': {
value: settings().charTimeout,
min: 200, max: 1500, step : 50,
format: v => v,
onchange: v => updateSetting("charTimeout", v),
},
/*LANG*/'Show help on first launch': {
value: !!settings().firstLaunch,
format: v => v?"Yes":"No",
onchange: v => updateSetting("firstLaunch", v)
}
};
E.showMenu(mainmenu);
})