Updated DuckyKeyboardController with 2ms delays between each packet sent
This should fix the issue where Ducky keyboards would softlock Commit amended to move delays to packet send functions by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
parent
0fd106cb92
commit
2ae12c52ec
1 changed files with 4 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ void DuckyKeyboardController::SendInitialize()
|
|||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
void DuckyKeyboardController::SendInitializeColorPacket()
|
||||
|
|
@ -109,6 +110,7 @@ void DuckyKeyboardController::SendInitializeColorPacket()
|
|||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
||||
unsigned int DuckyKeyboardController::SendColorDataPacket
|
||||
|
|
@ -176,6 +178,7 @@ unsigned int DuckyKeyboardController::SendColorDataPacket
|
|||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
|
||||
return(bytes_sent);
|
||||
}
|
||||
|
|
@ -201,4 +204,5 @@ void DuckyKeyboardController::SendTerminateColorPacket()
|
|||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, (unsigned char *)usb_buf, 65);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue