Author Topic: Can't find the way to ONLY press a mod (alt, shift, etc.)  (Read 427 times)

LeoAraujo

  • Newbie
  • *
  • Posts: 1
Can't find the way to ONLY press a mod (alt, shift, etc.)
« on: November 15, 2018, 11:47:20 am »
As it is said, I can't find the way to leave pressed a key of the type MOD. I have already defined on "DigiKeyboard.h" the key to be pressed (in this case, left shift), but it does not behaves as any other key. I added on the library file:

#define KEY_SHIFT_LEFT   225

And the code is:

void loop() {
  // put your main code here, to run repeatedly:
  DigiKeyboard.sendKeyPress(225);
  DigiKeyboard.delay(200);
  DigiKeyboard.sendKeyPress(4);
  DigiKeyboard.sendKeyPress(0,0);
}

The instructions are: "Press left shift, wait 0.2 sec, press letter "a", release all, repeat."
So the output should be "A" every 0.2 sec. Instead, I get "a".

Do you know any other way to press left shift? Thank you community.