1. Send Keyboard Events:
Command Format 1: adb shell input keyevent "value"
The value and corresponding key code are listed in the following table:
KeyEvent ValueKEYCODEComment0KEYCODE_UNKNOWN1KEYCODE_MENUThe command in the SDK2.1 simulator is invalid, and the sendevent command is feasible.2KEYCODE_SOFT_RIGHT3KEYCODE_HOME4KEYCODE_BACK5KEYCODE_CALL6KEYCODE_ENDCALL7KEYCODE_08KEYCODE_19KEYCODE_210KEYCODE_311KEYCODE_412KEYCODE_513KEYCODE_614KEYCODE_715KEY
I was planning to develop a fun project last month, but I have never had time. This is a part of this project, and it is easy to handle this part, such as poor communication. First, simulate the mouse and keyboard press the release action. I use the X11 library, so I need to understand X11 programming. Second, I can use c or c ++ to implement it, however, because I am a py fan, I always want to move the cod
Some users reported that after Win8.1 is installed, the mouse and keyboard stop working, but Microsoft has not released a solution or related patches to solve the problem.
This problem seems to be caused by incompatible drivers, but it turns out that even the latest driver cannot solve this problem.
A Microsoft community forum user said he had found a quick solution. If you need it, try it:
First, rest
Prepare
Raspberry Pi Development Board ( Click here to purchase ) (has been brushed into the official Raspbian system )
USB to Serial board ( click here to buy )
DuPont Line (4 root)
Connection
串口板 树莓派--------------------VCC +5V(非必须)RX TXD(GPIO15)TX RXD(GPIO14)GND Ground Raspberry Pi pin Map (40PIN Gpio For example, 26PIN Gpio compatible) serial terminal software Installation and connection
[Ubuntu Linux Environment]1. Instal
Because the USB driver in Linux is already very complete,You only need to follow the following configuration. After the configuration, recompile the kernel and install it on the Development Board.
1. Modify make menuconfig
System type -->
Input core support -->
SCSI device support --->
[*] Legacy/proc/SCSI/support
* ** SCSI support type (disk, tape, CD-ROM )***
[*] Hid devices --->
--- Hid Devices
-*-Generic hid support
[]/Dev/hidraw raw
Software name: howtired (check your labor intensity)
Version: 1.0 Beta
Development Environment:Windows Server 2003 +. NET Framework 1.1C # + Win32 API
Function:1. Monitor the number of mouse clicks, left-click, right-click2. Monitor the total movement distance of the mouse3. Monitor the number of keyboard hits and count each key in detail.4. After the task starts running, minimize it to the taskbar and
1, the form of the Opacity from 100% to the transparency we want, such as this->opacity = 0.2;2. In the Form_Load function, add:HWND Hwnd=::findwindow (null,l "Form1");DWORD Dwnewlong = GetWindowLong (hWnd, Gwl_exstyle);Dwnewlong |= ws_ex_transparent | ws_ex_layered;SetWindowLong (HWnd, Gwl_exstyle, Dwnewlong);Of course, add some head files. # include #pragma comment (lib, "User32.lib")3. Set the screen windowstate to maximized, set the topmost of the screen to true, and then set the desired mas
Simulate the mouse keyboard. So there is no offence.
. NET C # development.
Two scripts attached.
Development reason: Because you find several are not good to use.
So I used the previous code to simply encapsulate a bit. Got a simpler one.
It's OK to play web games. Close Test.
The code has not been rigorously tested and developed directly on the original library.
There is a bug, the function is not c
Because to batch use a software to deal with a batch of EPS files, so to simulate the mouse and keyboard action, so that it can automate the operation.
Copy Code code as follows:
#-*-coding:utf-8-*-
Import OS
Import time
Import Win32gui
Import Win32API
Import Win32con
From PIL import Imagegrab
#os. Startfile ("D:\\artcut6\\prog\\artcut6.exe")#time. Sleep (1)
Wdname1=u "Ventece paint
There are bugs in the original, because this is the code I converted from C #, where the original conversion was not fully compatible because of the different nature of the two languages.
Of course, now I am fully capable of compatible with the characteristics of both languages, so rewrite this code, the original code in the event detection, as well as the original code in the KeyPress time can not detect input character casing bug elimination (thanks to Comrade Verywzm).
Note: If this code wa
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.