Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with DigiKeyboard.sendKeyStroke() #22

Open
BeastHunter66 opened this issue Apr 9, 2020 · 2 comments
Open

Problem with DigiKeyboard.sendKeyStroke() #22

BeastHunter66 opened this issue Apr 9, 2020 · 2 comments

Comments

@BeastHunter66
Copy link

no matching function for call to 'DigiKeyboardDevice::sendKeyStroke(int, int, int)'

I get this error everytime i put more than one key at a time.

@terceranexus6
Copy link

I think you can only send two values?

@ghost
Copy link

ghost commented Aug 29, 2022

In the sendKeyStroke() function we can send single, double, and triple keystrokes at the same time.

  1. sendKeyStroke(𝒙)
    𝒙 is the single keystroke of a key.
    It is used to inject a single keystroke into a PC/Laptop.
    Example – DigiKeyboard.sendKeyStroke(KEY_R);
    This example shows that the key R is pressed.

  2. sendKeyStroke(𝒚, 𝒙)
    𝑥 is the first keystroke.
    𝑦 is the second keystroke.
    It is used to inject two keystrokes at the same time into a PC/Laptop.
    Two keystrokes are separated by a comma.
    Example - DigiKeyboard.sendKeyStroke(KEY_C,MOD_CONTROL_LEFT);
    This example shows the operation of copy by shortcut.
    Here, 𝑥 is MOD_CONTROL_LEFT and 𝑦 is KEY_C.

  3. sendKeyStroke(𝒛, 𝒙|𝒚)
    𝑥 is the first keystroke.
    𝑦 is the second keystroke.
    𝑧 is the third keystroke.
    It is used to inject three keystrokes at the same time into a PC/Laptop.
    The first and second keystrokes are separated by pipe ( | ) character.
    Write the first keystroke then, the pipe character then the second keystroke.
    The third keystroke is separated by a comma.
    Write the third keystroke then comma, then first keystroke then pipe character, then second keystroke.
    Example - DigiKeyboard.sendKeyStroke(KEY_N, MOD_CONTROL_LEFT|MOD_SHIFT_LEFT);
    This example shows the operation of creating a new folder by shortcut.
    Here, 𝑥 is MOD_CONTROL_LEFT, 𝑦 is MOD_SHIFT_LEFT and 𝑧 is KEY_N.

Thank You

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants