KeybdServer.java
Go to the documentation of this file.
00001 package keybdserver;
00002 
00003 import java.util.Scanner;
00004 
00005 public class KeybdServer {
00006 
00010         public static void main(String[] _args) {
00011                 System.out.println("hello");
00012                 Scanner sc = new Scanner(System.in);
00013                 String[] args = new String[] { "type", "value" };
00014                 System.out.println("waiting command");
00015                 for (;;) {
00016                         String s = sc.nextLine();
00017                         if (!s.isEmpty()) {
00018                                 if (s.startsWith("k ")) {
00019                                         args[0] = "keyevent";
00020                                         args[1] = s.substring(2);
00021                                         com.android.commands.input.Input.main(args);
00022                                 } else if (s.startsWith("K ")) {
00023                                         args[0] = "text";
00024                                         args[1] = s.substring(2);
00025                                         com.android.commands.input.Input.main(args);
00026                                 } else {
00027                                         System.out.println("invalid command");
00028                                 }
00029                         }
00030                 }
00031         }
00032 }


dji_ronin
Author(s):
autogenerated on Sat Jun 8 2019 20:15:31