2022-04-05 15:49:19 +00:00
|
|
|
# Swipe Keyboard
|
|
|
|
|
|
|
|
A library that provides the ability to input text by swiping PalmOS Graffiti-style characters onto the screen.
|
|
|
|
|
|
|
|
To get a legend of available characters, just tap the screen.
|
|
|
|
|
2022-12-02 18:38:51 +00:00
|
|
|
To switch between the input of alphabetic and numeric characters tap the widget which displays either "123" or "ABC".
|
|
|
|
|
2022-12-04 18:44:17 +00:00
|
|
|
To switch between lowercase and uppercase characters do an up swipe.
|
|
|
|
|
2022-04-25 13:34:49 +00:00
|
|
|

|
2022-04-05 15:49:19 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
In your app's metadata, add:
|
|
|
|
|
|
|
|
```
|
|
|
|
"dependencies": {"textinput":"type"},
|
|
|
|
```
|
|
|
|
|
|
|
|
From inside your app, call:
|
|
|
|
|
|
|
|
```
|
|
|
|
Bangle.loadWidgets();
|
|
|
|
Bangle.drawWidgets();
|
|
|
|
require("textinput").input({text:"Foo"}).then(result => {
|
|
|
|
console.log("Text input", E.toJS(result));
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
|
|
|
The first argument to `input` is an object containing the following:
|
|
|
|
|
|
|
|
* `text` - initial text to edit
|
|
|
|
|
|
|
|
(in the future, the ability to restrict usage of newline/etc may be added)
|
|
|
|
|
|
|
|
## Make your own
|
|
|
|
|
|
|
|
You can create your own keyboard input apps. Just ensure that they have
|
|
|
|
`"type":"textinput",` in their metadata and provide a library called `textinput`
|
|
|
|
that exports an `input` method.
|