AZERTY support for BADUSB

Hi,
i wonder if there is another solution to add another keyboard language for the badusb.
i tried applying this patch to the latest firmware https://github.com/Log-s/flipperzero-contributions
but i cant build it if i replace the original file with this patched file. Yeah i know i can flash that one but i think it’s outdated. So i want a way i can apply this patch to every firmware i want.
Anyone who has a solution?


that’s the error i get when i replace the furi_hal_usb_hid.h

7 Likes

I hope you will find the solution; I am trying to figure out how to use a QUERTZ layout.

Same issue, impossible tu use this function in France.
We need the possibility to choose a keyboard (qwerty, azerty, and maybe others)

4 Likes

Yup same here, thanks for trying!

Hello guys ! yes, it is a real showstopper in the usage of the bad USB feature. Even if the workaround is to translate the script it is not really confortable. I hope it will be fixed :slight_smile:

Just use something like this: https://flippermaker.github.io/
(the “String to Alt Code” part) - and replace all your strings with corresponding alt codes. I’ve tested on non-QWERTY layouts, it works just fine!

example; instead of doing
STRING cmd
ENTER

do
ALTCHAR 099
ALTCHAR 0109
ALTCHAR 0100
ENTER
:slight_smile:

1 Like

Hi,
I created a PR with update to the file furi_hal_usb_hid.h so it can compile with the latest firmware.
I’m also trying to figure out how to create a menu to switch from QWERTY to AZERTY but my skills are pretty limited, any help is welcome :wink:

The fork can be found here:

I’ll update the link when (or if) the PR is merged:

1 Like

It works, but its much much slower because it writes every single character one by one.
Also if you want to change some code you have to convert it every time :slight_smile: kinda anoying but still the best solution so far :wink: thx

Hi,
just replace STRING with ALTSTRING and type your code normally.

1 Like

i thought that was windows only
trying to make a string that types a pipe character on a linux system with a uk keyboard layout

Hey, did you find solution for this case?
I tried to use ALTSTRING but i get series of numbers. (Tried on MacOs)

Any solution?

Thanks guys

On Windows I use Powershell to change layout at begginin and end of my script

GUI r
DELAY 500
ALTSTRING Powershell Set-WinUserLanguageList -LanguageList en-US
DELAY 500
ENTER
DELAY 1000
STRING O
ENTER
##################### CODE ###########################
GUI r
DELAY 500
ALTSTRING Powershell Set-WinUserLanguageList -LanguageList fr-FR
DELAY 500
ENTER
DELAY 1000
STRING O
ENTER

1 Like

Bonjour @Alexmoi comment peut tu envoyer la commande de passer en qwerty avec une commande en azerty alors que lorsque la commande se frappe le clavier est encore en azerty ,???

EDIT :
Ho dsl oui avec le ALTSTRING, alors pk ne pas mettre altstring partout tout simplement ?

j’ai refais le code au propre
GUI r
DELAY 1000
ALTSTRING Powershell Set-WinUserLanguageList -LanguageList en-US
DELAY 200
ENTER
DELAY 200
ENTER

le truc c’est que le ALTSTRING fait buger car une fois la commande tapée la touche ALT à l’aire de rester enfoncée car ca me fait defiler tous les commande précedement tapées dans la fenetre executer, une suggestion pour annuler ceci ?

Amoins de taper la commande pour passer en qwerty direcetment en converti genre :

STRING Pozershell Set)ZinUserLqnguqgeList )LqnguqgeList en)US

EDIT voici la bonne commande sur un clavier qwerty sans le ALTSTRING :slight_smile:
STRING Pozershell Set-ZinUserLqnguqgeList -LqnguqgeList en-US

Sauf que ca me rentre la bonne commande mais ca ne me la valide pas ca ecrit des autres choses

Bon j’ai réésayer juste avec ça :
GUI r
DELAY 1000
ALTSTRING Powershell Set-WinUserLanguageList -LanguageList en-US

sans rien derrière, he ben la il me fait pas buger a faire défiler mon historique de commande ds la fenetre executer

j’ai donc reesayer sans la ALTSTRING, un coup il me met bien les tirets, un coup il me met des ) a la place
j’y comprends pu rien et je me dit que ce n’est pas la solution de convertir les touches car d’un pc a un autre ca peut changer

Sauf que avec le ALTSTRING ma touche enter ne fonctionne pas

Deux solutions : Soit réussir à fair enlever le bug du ALTSTRING qui me fait defiler les recherche au lieu de taper sur ENTRER,
Soit trouver le tiret du 6 car j’ai tout essayer et rien… de maniere a envoyer en string normal converti

Bonjour, je me suis inspiré de ce qui vous avez tous mis en créant ceci qui fonctionne pour moi.

badusb.press(“GUI”, “x”);
delay(300);
badusb.press(“i”);
delay(3000);
badusb.println(“Pozershell Set6ZinUserLqnguqgeList 6LqnguqgeList en6US”);
delay(300)
badusb.press(“ENTER”);
delay(600)
badusb.press(“ENTER”);
+++++++++++++++++++Code++++++++++
badusb.press(“ENTER”);
delay(3000)
badusb.println(“Powershell Set-WinUserLanguageList -LanguageList fr-FR”);
delay(300)
badusb.press(“ENTER”);
delay(600)
badusb.press(“ENTER”);
delay(600)
badusb.println(“exit”);
delay(600)
badusb.press(“ENTER”);