OLLYDOTDEV / Project-Birdseye-DTX-2020

The initial plan is to create a device that is made for the sole purpose of a Preemptive Security system for People who work with Confidential/Private Information and need to work on potentially more public places where one cant Guarantee fully secure/discrete room. My Approach to solving this is with a wireless computing node That Takes Sensor data from a variety of senses. Then the Data from the Senses is taken then and processed to determine whether there is a security breach if so then it will Relay that info over to the Raspberry Pi W that then Emulates an HID (Human interface device) Using the P4wnP1_aloa made by mame82 to Execute a custom user-defined action that will be set via Apache server hosted of the Raspberry Pi W Communicating From a web interface back to the purchase server utilizing Ajax
GNU General Public License v3.0
3 stars 1 forks source link

HID scripts #22

Closed OLLYDOTDEV closed 3 years ago

OLLYDOTDEV commented 3 years ago

As a developer I will need to use HID (human interface device) scrips emulate a keyboard to control the computer So that #21 can utilize these scrips

OLLYDOTDEV commented 3 years ago

Once I had connected the RPI to my test bench (my desktop) with a USB cable. this USB cable must be connected to the RPI zero w data USB NOT the power USB port.

then to test if there was an HID connection with my test bench i used the example HID cli command found in the Repo README.md
P4wnP1_cli hid run -c 'type("Hello world")' and just as expected it typed Hello world image

the great thing about this is that due to the fact that is running of the bash command line I am able to put this to a bash script file (.sh) and these files can be run from RPI.cpp.

from here I can start making some more useful HID scripts

OLLYDOTDEV commented 3 years ago

a function that is a simple but yet universally recognized in the short cut to the lock screen (Windows, Linux, macOS)

So in the last hid script the type function was used which just directly takes the input in types it out The other important function is the press function this allows the uses of modifier keys

The modifier keys are

LEFT_CTRL RIGHT_CTRL LEFT_ALT RIGHT_ALT LEFT_SHIFT RIGHT_SHIFT LEFT_GUI RIGHT_GUI P4wnP1 allows using aliases for common modifiers CTRL == CONTROL == LEFT_CTRL ALT == LEFT_ALT SHIFT == LEFT_SHIFT WIN == GUI == LEFT_GUI https://github.com/OLLYDOTDEV/P4wnP1_aloa

with that, I can take that knowledge to make P4wnP1_cli hid run -c 'press("GUI l")' and well this locks the screen on Linux and windows anyway, I don't have a mac to test on but here is the test on my personal system

OLLYDOTDEV commented 3 years ago

added to the HID folder is also desktop.sh,lock.sh,switch.sh as some to suit some potentially common use cases infrastructures will be in a place where end users can add their own custom hid. but with having HID scripts made, the next move it is to integrate them with the rest of the system as will be seen in #21