mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-23 05:24:46 -07:00
BadUSB: Mouse control (#4004)
* add usb hid mouse functions, add mouse functions to BadUsbHidApi * add ble mouse functionality * add hid_usb_mouse_release_all * ducky mouse command skeleton * implement mouse click functions * corrected missing semicolon * added mouse functionality * corrected mouse scroll functionality * mouse key functionality, removed mouse commands, supporting get_mouse_keycode function, added mouse buttons as Keys for HOLD function * add mouse commands * removed mouse middle click * Format sources and fix bunch of mistakes in nfc and subghz * added HID_MOUSE_NONE: added to help with better readability * added script for mouse movement test * Fix: hold and release, imrpove readability * simplified the mouse demo/test * Format sources Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
46
applications/main/bad_usb/resources/badusb/test_mouse.txt
Normal file
46
applications/main/bad_usb/resources/badusb/test_mouse.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
ID 1234:abcd Generic:USB Keyboard
|
||||
REM Declare ourselves as a generic usb keyboard
|
||||
REM You can override this to use something else
|
||||
REM Check the `lsusb` command to know your own devices IDs
|
||||
|
||||
DEFAULT_DELAY 200
|
||||
DEFAULT_STRING_DELAY 100
|
||||
|
||||
DELAY 1000
|
||||
|
||||
REM Test all mouse functions
|
||||
LEFTCLICK
|
||||
RIGHTCLICK
|
||||
MIDDLECLICK
|
||||
|
||||
DELAY 1000
|
||||
|
||||
MOUSEMOVE -10 0
|
||||
REPEAT 20
|
||||
MOUSEMOVE 0 10
|
||||
REPEAT 20
|
||||
MOUSEMOVE 10 0
|
||||
REPEAT 20
|
||||
MOUSEMOVE 0 -10
|
||||
REPEAT 20
|
||||
|
||||
DELAY 1000
|
||||
|
||||
MOUSESCROLL -50
|
||||
MOUSESCROLL 50
|
||||
|
||||
DELAY 1000
|
||||
|
||||
REM Verify Mouse hold working
|
||||
HOLD LEFTCLICK
|
||||
DELAY 2000
|
||||
RELEASE LEFTCLICK
|
||||
|
||||
DELAY 1000
|
||||
|
||||
REM Verify KB hold working
|
||||
HOLD M
|
||||
DELAY 2000
|
||||
RELEASE M
|
||||
|
||||
ENTER
|
||||
Reference in New Issue
Block a user