Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed conflict meta keys with text message #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ adb shell am broadcast -a ADB_INPUT_CHARS --eia chars '128568,32,67,97,116'

5. Send meta keys
To send Ctrl + A as below: (4096 is META_CONTROL_ON, 8192 is META_CONTROL_LEFT_ON, 29 is KEYCODE_A)
adb shell am broadcast -a ADB_INPUT_TEXT --es mcode '4096,29' // one metaState.
adb shell am broadcast -a IME_META_KEYS --es mcode '4096,29' // one metaState.
or
adb shell am broadcast -a ADB_INPUT_TEXT --es mcode '4096^+^8192,29' // two metaState.
adb shell am broadcast -a IME_META_KEYS --es mcode '4096^+^8192,29' // two metaState.


6. CLEAR all text (starting from v2.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class AdbIME extends InputMethodService {
private String IME_EDITORCODE = "ADB_EDITOR_CODE";
private String IME_MESSAGE_B64 = "ADB_INPUT_B64";
private String IME_CLEAR_TEXT = "ADB_CLEAR_TEXT";
private String IME_META_KEYS = 'ADB_INPUT_META_KEYS';

private BroadcastReceiver mReceiver = null;

@Override
Expand Down Expand Up @@ -97,7 +99,7 @@ public void onReceive(Context context, Intent intent) {
}
}

if (intent.getAction().equals(IME_MESSAGE)) {
if (intent.getAction().equals(IME_META_KEYS)) {
String msg = intent.getStringExtra("mcode"); // Get message.
String[] mcodes = msg.split(","); // Get mcodes in string.
if (mcodes != null) {
Expand Down