Member #675763

Member Since: April 23, 2015

Country: United States

  • Hi, i am trying to make a custom Kb for a friend, i am trying to achieve multi-key functionality as he has trouble doing so, for an instance, Ctrl+Alt+Del, Alt+Tab, etc... I am able to do the basic key combinations but when i particularly try to do Alt+Tab by, using Keypad.press(KEY_LEFT_ALT) and trying to loop Keypad.write(KEY_TAB) with some delay so as to mimic Holding the Alt key and alternating the TAB key to switch windows, i am able to achieve this, but as soon as it hits the loop for the TAB ... it just loops infinitely, i am trying to listen to the RELEASED event to break the loop but nothing works... no matter what i do, it ends up creating infinite loop... Please help me... i am new to Arduino and not very strong with C... I went through the examples and tried to accomplish above... Here is snippet of code: Pressing 2 should do ALT+TAB action

    void checkrelease() { while (flag==1) { Keyboard.write(KEY_TAB); delay(1000); } }

    case HOLD: if (key == '2') { Keyboard.press(KEY_LEFT_ALT); checkrelease(); Keyboard.releaseAll(); } break;

    case RELEASED: if (key == '2') { flag=0; Keyboard.releaseAll(); }

        break;
    

    When i try the above... as soon as i Hold 2 .. it goes to infinite Loop ... please help, thanks in advance.

No public wish lists :(