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

Added special multimedia keycodes + restructured code #106

Merged
merged 2 commits into from
Dec 28, 2015
Merged

Added special multimedia keycodes + restructured code #106

merged 2 commits into from
Dec 28, 2015

Conversation

vshymanskyy
Copy link
Contributor

Restructured code a bit to make adding keyboard keycodes much easier.
Added multimedia keys + brightness control. This should be also possible on Cocoa but I didn't have a chance to investigate.
Fixes #91

@Zeukkari
Copy link
Contributor

+1

@octalmage
Copy link
Owner

Thanks @vshymanskyy! I'll take a deeper look and test later today.

@petre2dor
Copy link

👍

@vshymanskyy
Copy link
Contributor Author

I hope someone can test this on Windows & implement for OS X ;)

@octalmage
Copy link
Owner

That's my plan!

@vshymanskyy
Copy link
Contributor Author

Are there any estimations when it could be published on the npm?
I want to publish a tutorial which uses multimedia keys ;)

@vshymanskyy
Copy link
Contributor Author

@octalmage
Copy link
Owner

Most likely before Thursday. I'm traveling today so I'll be pretty busy, but I'll try to take a look today.

@octalmage
Copy link
Owner

I'm getting errors compiling on Mac, working on fixing it now.

Example:

  CXX(target) Release/obj.target/robotjs/src/robotjs.o
../src/robotjs.cc:283:22: error: constant expression evaluates to -1 which cannot be narrowed to type 'MMKeyCode' (aka 'unsigned short') [-Wc++11-narrowing]
        { "printscreen",    K_PRINTSCREEN },

It complains on keys that don't exist.

@vshymanskyy
Copy link
Contributor Author

this should be simple to fix.. i just added it to every platform.

@octalmage
Copy link
Owner

I figured that out, but this change is causing a warning on Mac:

  CXX(target) Release/obj.target/robotjs/src/robotjs.o
../src/robotjs.cc:329:11: warning: comparison of constant 'K_NOT_A_KEY' (-1) with expression of type 'MMKeyCode' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
        if (*key == K_NOT_A_KEY) {
            ~~~~ ^  ~~~~~~~~~~~

I'm going to see if I can fix this real quick.

@vshymanskyy
Copy link
Contributor Author

Please tell me if you need any help...

@octalmage
Copy link
Owner

I'm focusing my time on a breaking bug right now, if you can fix this warning please do.

@petre2dor
Copy link

any news about this? thanks :)

@octalmage
Copy link
Owner

I'm just going to merge it and fix the warning later, sorry for the delay.

octalmage added a commit that referenced this pull request Dec 28, 2015
Added special multimedia keycodes + restructured code.
@octalmage octalmage merged commit 288a35b into octalmage:master Dec 28, 2015
octalmage added a commit that referenced this pull request Dec 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants