Jump to content

[Bug Report] ARROW keys not working


Recommended Posts

My friend bet me that I couldn't shut down his computer with my rubber ducky, so I decided to prove him wrong. I started writing my code to shutdown his laptop (he has a dual booting linux and windows setup), it works well in linux but in windows it opens start and types e in the search bar instead of going across to shutdown. I have tried "RIGHTARROW" and "RIGHT" and it is using US keyboard.

 

Code:

REM Linux Shutdown (needs root user to be logged in)
DELAY 550
ALT F2
DELAY 600
STRING poweroff
ENTER
DELAY 500
REM Windows Shutdown
GUI
DELAY 250
RIGHT
RIGHT
ENTER

 

Link to comment
Share on other sites

I think all you should have to do is define the keyboard resource from the command line like this:

java -jar duckencode.jar -i script.txt -o inject.bin -l resources/us.properties

If that doesn't work, you can get the updated resources from GitHub. Let me know how it works out.
Edited by Decoy
Link to comment
Share on other sites

That being said, I feel like using TABs and ARROWs can be hit or miss. It's too easy to have another process change focus, etc. I think the PowerShell line is the way to go. Another solution would be an ALT F4 combo. Good luck!

Edited by Decoy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...