When using the converter to convert from a RubberDucky script containing one or more special keys (CTRL, ALT, SHIFT, ...) followed by one or more an alphabetic letters in order to trigger a hotkey (like CTRL + A, CTRL + ALT + B, ...) the conversion generated does not provide a working script.
but as the b and s letters are converted as their ASCII equivalents so their keycodes won't be triggered, making the hotkey combination never trigger.
Temporary workaround
Meanwhile the converter gets fixed, the following workaround can be used after the conversion has been generated. This has to be done for each Keyboard.press function call whose argument is a decimal integer and corresponds to the conversion of a special key(s) with alphabetic letter(s) RubberDucky script line
Look for the letter keycode
In the first example, we wanted CTRL + ALT + b and b was not properly converted with its keycode. We have to look in USB HID Usage Tables (page 53) for our letter keycode. We see that b keycode is, in decimal, the number 5.
Change the letter keycode
Now we have to change the converted ASCII number (in the example Keyboard.press(98), 98) by the obtained keycode for our letter from the usage tables (5 for key b) plus 136 (therefore 141). In our example, the line would be changed by:
Keyboard.press(141)
And for CTRL + S we would have changed Keyboard.press(115); for the following line Keyboard.press(158); (s keycode is 22, plus 136 equals 158)
The issue
When using the converter to convert from a RubberDucky script containing one or more special keys (
CTRL, ALT, SHIFT, ...
) followed by one or more an alphabetic letters in order to trigger a hotkey (likeCTRL + A, CTRL + ALT + B, ...
) the conversion generated does not provide a working script.Example: Converting
outputs
but as the
b
ands
letters are converted as their ASCII equivalents so their keycodes won't be triggered, making the hotkey combination never trigger.Temporary workaround
Meanwhile the converter gets fixed, the following workaround can be used after the conversion has been generated. This has to be done for each
Keyboard.press
function call whose argument is a decimal integer and corresponds to the conversion of a special key(s) with alphabetic letter(s) RubberDucky script lineLook for the letter keycode In the first example, we wanted
CTRL + ALT + b
andb
was not properly converted with its keycode. We have to look in USB HID Usage Tables (page 53) for our letter keycode. We see thatb
keycode is, in decimal, the number5
.Change the letter keycode Now we have to change the converted ASCII number (in the example
Keyboard.press(98)
,98
) by the obtained keycode for our letter from the usage tables (5
for keyb
) plus136
(therefore141
). In our example, the line would be changed by:And for CTRL + S we would have changed
Keyboard.press(115);
for the following lineKeyboard.press(158);
(s
keycode is22
, plus136
equals158
)In order to solve it, either the converter JavaScript code or the
Keyboard::press
function can be changed