Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Mar 26, 2017
1 parent 3f2127c commit 3c406ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,17 @@ Android Unicode Input Service Node.js wrapper.

## Installment

``` shell
``` bash
$ npm i android-unicode --save
```

## Use with Macaca

``` javascript
driver.keys('[ADB_INPUT_TEXT]使用ADB中文输入');
driver.keys('[ADB_INPUT_CODE]67'); // delete key
driver.keys('[ADB_INPUT_CHARS]128568,32,67,97,116');
driver.keys('[ADB_EDITOR_CODE]2');
```

## Use in ADB shell

Ref: <https://github.com/senzhk/ADBKeyBoard>

1. Sending text input

``` shell
``` bash
$ adb shell am broadcast -a ADB_INPUT_TEXT --es msg '你好Hello'
$ adb shell am broadcast -a ADB_INPUT_TEXT --es format base64 --es msg 'K1RpMWxody1jbg=='
```
Expand Down Expand Up @@ -83,7 +74,7 @@ $ adb shell am broadcast -a ADB_INPUT_CHARS --eia chars '128568,32,67,97,116'

Switch to Utf7ImeService

``` shell
``` bash
$ adb shell ime set macaca.unicode.ime/.Utf7ImeService
```

Expand All @@ -92,13 +83,13 @@ $ adb shell ime set macaca.unicode.ime/.Utf7ImeService

Switch to system default Service

```shell
``` bash
$ adb shell ime set com.android.inputmethod.pinyin/.PinyinIME
```

List available Service

```shell
``` bash
$ adb shell ime list -a
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "android-unicode",
"version": "1.0.11",
"version": "1.0.12",
"description": "android unicode input apk",
"keywords": [
"unicode",
Expand Down

0 comments on commit 3c406ce

Please sign in to comment.