whid-injector / WHID

WiFi HID Injector - An USB Rubberducky / BadUSB On Steroids.
MIT License
1.65k stars 244 forks source link

Arduino Keyboard library > 1.0.3 include support for multiple layout #94

Open RobertoD91 opened 2 years ago

RobertoD91 commented 2 years ago

Maybe we can just replace Keyboard.begin(); with something like Keyboard.begin(KeyboardLayout_it_IT); without editing files in libraries folder?

RobertoD91 commented 2 years ago

Tested Arduino_32u4_Code replacing line 63 with Keyboard.begin(KeyboardLayout_it_IT);

Result: characters ok: ,.-;:_@#[]<>\| characters empy: {}

< and > was replaced by \ and | fixed editing file Documents/Arduino/libraries/Keyboard/src/KeyboardLayout_it_IT.cpp change 0x32 with 0x35 and viceversa

EDIT: set keyboard as ISO instead of ANSI if < and > was replaced by \ and |

bHub commented 2 years ago

That's what I've done to get the italian Keyboard layout works:

As you said the {} characters won't work, but at least you could use "Press" and send the related ALT+Numeric_keypad_1+Numeric_keypad_2+(Numeric_keypad_3 or Numeric_keypad_5). Not much elegant but worth than nothing.

I was looking at library "keyboard_it_IT.h" and found this:

define KEY_I_GRAVE (136+0x2e)

define KEY_E_GRAVE (136+0x2f)

define KEY_O_GRAVE (136+0x33)

define KEY_A_GRAVE (136+0x34)

define KEY_U_GRAVE (136+0x31)

Not tested yet if the printed characthers are correct, but maybe it's possible to find a workaround like that for {}.