T-vK / ESP32-BLE-Keyboard

Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)
2.28k stars 379 forks source link

CTRL + WIN + T #215

Closed sirpete83 closed 1 year ago

sirpete83 commented 1 year ago

Hallo I try to build a Hotkey for this "CTRL + WIN + T"

by bleKeyboard.releaseAll(); bleKeyboard.press(KEY_LEFT_CTRL); bleKeyboard.press(KEY_LEFT_GUI); bleKeyboard.press('T'); delay(120); // delay of 20 ms bleKeyboard.releaseAll();

but I get: "CTRL + SHIFT + T + WIN"

Why?

it fails after adding the 'T' press line.

bleKeyboard.releaseAll(); bleKeyboard.press(KEY_LEFT_CTRL); bleKeyboard.press(KEY_LEFT_GUI); //bleKeyboard.press('T'); delay(120); // delay of 20 ms bleKeyboard.releaseAll();

i get "CTRL + WIN"

any ideas?

I tried: typedef uint8_t PPMKeyReport[3];

const PPMKeyReport KEY_ON_TOP = {KEY_LEFT_CTRL, KEY_LEFT_GUI, 'T'};

and

bleKeyboard.write(KEY_ON_TOP);

not working...

sirpete83 commented 1 year ago

Ok, I got it ... it is clear. I press the 'T' not the 't' so SHIFT will be included. The other part with the KeyReport is not that simple. What does the Modifier?