flipperdevices / flipperzero-firmware

Flipper Zero firmware source code
https://flipperzero.one
GNU General Public License v3.0
12.74k stars 2.71k forks source link

Inverted < > and \ | on Mac Italian keyboard #2472

Closed MrVideo closed 6 months ago

MrVideo commented 1 year ago

Describe the bug.

The keys < > and \ | are inverted on the it-IT keyboard layout on Mac. No USB Ducky script that uses those characters can work properly unless this issue is fixed.

For example, the demo_macos.txt script that comes with the device does not work properly. You can see the output of that script here:

❯ cat | /dev/null \\ EOF
zsh: permission denied: /dev/null
Hello World!
❯ ============================================================
zsh: =========================================================== not found
❯ 
❯               _.-------.._                    -,
zsh: command not found: _.-------.._
❯           .-"'''"--..,,_/ /'-,               -,  <
quote>        .:"          /:/  /'<  <     ,_...,  '. >  >
zsh: parse error near `<'
❯       /       ,----/:/  /'< _<'_-"'     _;
dquote>      '      / /'"""'< < <.'_-'      ,-"'/
zsh: permission denied: /
❯     >      > >  0    > > .-'      ,/'  /
zsh: parse error near `>'
❯    >    ,..< <     ,.-"'       ,/'    /
zsh: parse error near `<'
❯   ;    :    '/'""<'           ,/--==,/-----,
quote>   >    '-...>        -.___-Z:_______J...---;
zsh: no such file or directory:            ,/--==,/-----,\n  >    -...
❯   :         '                           _-'
❯  _L_  _     ___  ___  ___  ___  ____--"'
dquote> > __>> >   >_ _>> _ <> _ <> __>> _ <
dquote> > _> > >__  > > >  _/>  _/> _> >   /
dquote> >_>  >____>>___>>_>  >_>  >___>>_>_<
dquote> 
dquote> Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script format
dquote> More information about script syntax can be found here:
dquote> https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/file_formats/BadUsbScriptFormat.md
dquote> EOF
dquote> 

By manually inverting these keys properly in the file, the script produces the correct output.

Would it be possible to get an Italian Mac keyboard layout in the future?

Thanks.

Reproduction

  1. Go to the main menu
  2. Open the Bad USB application
  3. Select demo_macos.txt
  4. Run the script
  5. The result should be similar to the one described above

Target

No response

Logs

No response

Anything else?

No response

optimus10ro commented 1 year ago

Use ALTSTRING instead of STRING

ALTSTRING codes are language independent.

skotopes commented 1 year ago

@nminaylov can you check keyboard map?

skotopes commented 1 year ago

What we missing is it-IT-mac, it will be nice if someone contribute correct one.

nminaylov commented 8 months ago

Please check this layout file https://github.com/flipperdevices/flipperzero-firmware/blob/ca05abea327cd34902a61c0294792a82b3bace22/applications/main/bad_usb/resources/badusb/assets/layouts/it-IT-mac.kl

skotopes commented 6 months ago

Was fixed in https://github.com/flipperdevices/flipperzero-firmware/pull/3401