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

How to use custom commands #70

Open
mishalshanavas opened this issue May 12, 2023 · 3 comments
Open

How to use custom commands #70

mishalshanavas opened this issue May 12, 2023 · 3 comments

Comments

@mishalshanavas
Copy link

How to use custom commands
image

Can anyone show an example that i can try?

@cnlohr
Copy link
Owner

cnlohr commented May 12, 2023

@YeetTheAnson
Copy link

@cnlohr Can you give more details on it? And provide some examples

@cnlohr
Copy link
Owner

cnlohr commented Feb 29, 2024

If you type something in there and click submit you can send messages to the C code, I strongly recommend printing the value being passed into CustomCommand. I believe you have to prefix it with C so for instance, CK would be handled in case 'K': case 'k': //Keyboard

Commands are separated by the tab character. I thought it was a space, but it looks like a tab, so you might have to copy-paste a tab in, i.e. CM0 100 100 would move the mouse by 100,100.

See here:

var msg = "CM" + ButtonsDown + "\t" + Math.round(x) + "\t" + Math.round(y);

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

3 participants