dbisu / pico-ducky

Create a USB Rubber Ducky like device using a Raspberry PI Pico
GNU General Public License v2.0
2.31k stars 423 forks source link

Pico W Ducky - Backslashes converted to # using Neradoc UK Keyboard Layout #263

Open mick-dee-irl opened 3 months ago

mick-dee-irl commented 3 months ago

Hi - I have setup a Pico Ducky using Pico W. I have been able to get some test scripts to work. I am working on a simple use case where a text file is saved to a location on the target machine. I am using the UK Keyboard layout as provided by Neradoc. Below is my duckyscript that i am transferring to the target machine. However, the backslashes are being converted to # when entered onto the target machine via the Pico Ducky.

I am wondering if anyone has found a fix for backslashes on UK Keyboard layouts?

DELAY 500 GUI r DELAY 500 STRING powershell ENTER DELAY 500 STRING $filepath = "$env:userprofile\Documents" ENTER DELAY 500 STRING New-Item -Path "$filepath\secrets.txt" -ItemType File -Force ENTER DELAY 500 STRING $doc = "$filepath\secrets.txt" ENTER DELAY 500 STRING Set-Content -Path $doc -Value 'These are my secrets' ENTER

io1901 commented 1 week ago

"#" is the "\" key on the US layout. You've not done something silly like not replacing the lines in the duckinpython.py? I tested it and if you don't make the changes below the "\" comes out as a "#".

# comment out these lines for non_US keyboards
#from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS as KeyboardLayout
#from adafruit_hid.keycode import Keycode

# uncomment these lines for non_US keyboards
# replace LANG with appropriate language
from keyboard_layout_win_uk import KeyboardLayout
from keycode_win_uk import Keycode