Skip to content

Commit

Permalink
Format sources
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes committed Feb 18, 2025
1 parent 87a4be9 commit 6593070
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions applications/main/bad_usb/helpers/ducky_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ static int32_t ducky_fnc_hold(BadUsbScript* bad_usb, const char* line, int32_t p

// Handle Mouse Keys here
uint16_t key = ducky_get_mouse_keycode_by_name(line);
if (key != HID_MOUSE_NONE) {
if(key != HID_MOUSE_NONE) {
bad_usb->key_hold_nb++;
bad_usb->hid->mouse_press(bad_usb->hid_inst, key);
return 0;
}

// Handle Keyboard keys here
key = ducky_get_keycode(bad_usb, line, true);
if (key != HID_KEYBOARD_NONE) {
if(key != HID_KEYBOARD_NONE) {
bad_usb->key_hold_nb++;
bad_usb->hid->kb_press(bad_usb->hid_inst, key);
return 0;
Expand All @@ -161,7 +161,7 @@ static int32_t ducky_fnc_release(BadUsbScript* bad_usb, const char* line, int32_

// Handle Mouse Keys here
uint16_t key = ducky_get_mouse_keycode_by_name(line);
if (key != HID_MOUSE_NONE) {
if(key != HID_MOUSE_NONE) {
bad_usb->key_hold_nb--;
bad_usb->hid->mouse_release(bad_usb->hid_inst, key);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion applications/main/bad_usb/helpers/ducky_script_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extern "C" {
#define FILE_BUFFER_LEN 16

#define HID_MOUSE_INVALID 0
#define HID_MOUSE_NONE 0
#define HID_MOUSE_NONE 0

struct BadUsbScript {
FuriHalUsbHidConfig hid_cfg;
Expand Down

0 comments on commit 6593070

Please sign in to comment.