Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Badusb keyboardlayout support #1867

Closed
wants to merge 3 commits into from
Closed

Badusb keyboardlayout support #1867

wants to merge 3 commits into from

Conversation

rcv4
Copy link

@rcv4 rcv4 commented Oct 11, 2022

Reopen #1525

What's new

  • added a config menu to the badusb application which allows to select the keyboard layout used when emulating a hid and running a badusb script. the selected layout is persisted and reused on subsequent script execution until another layout is selected. some keyboard layouts are provided, layout files can be generated using the tool (here)
  • reworked directory structure on the sd card to avoid mixing scripts and keyboard layout files. new structure and additional sd card files are in "assets/resources/badusb".

Verification

  • copy the content of the "assets/resources/badusb/" folder into the "badusb/" folder of the sd card. if the sd card does not have the new directory hierarchy, the display may be confusing because the file selector will go straight to the root of the sd-card (but still everything will work)
  • on your computer, select a keyboard input language other than english-us.
  • plug the flipperzero to a computer with an usb cable
  • launch the badusb application, select a simple script
  • press run. the script executes, if your computer keyboard is not set to "en-US", you may see some strange character replacement ('q' instead of 'a', 'z' instead of 'y'...)
  • on the flipper, still on the script execution page, press the left button to enter the "config" menu. select a keyboard layout matching the one on your computer. after selecting a layout, you are back to the config menu, you should press back once again to see the script execution view again.
  • on the flipper, press "run". the script executes, you should see exactly what was intended, without character replacements.
  • when you exit the badusb application, you should see a ".badusb.settings" file appear next to the script and layouts folders. this file persists the last used keyboard layout. application should work even if this file does not exist.

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

@hedger hedger added the USB BadUSB + physical USB interface label Oct 20, 2022
@rcv4
Copy link
Author

rcv4 commented Oct 22, 2022

there is still weird behavior:
if i let the flipper sit in the work-view for a while the app will freeze and i need to restart the flipper.
i am not sure where this comes from and sadly i dont have debugging equipment yet.

if anyone knows how to fix this feel free to help

@rcv4 rcv4 closed this Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
USB BadUSB + physical USB interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants