cinder / Cinder

Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.
http://libcinder.org
Other
5.28k stars 939 forks source link

Add a cross-platform GetKeyboardModifierState() function #2296

Open totalgee opened 1 year ago

totalgee commented 1 year ago

When trying to find out which modifier keys were pressed during a fileDrop() event, I found it was necessary to "roll my own" custom solution. (see https://discourse.libcinder.org/t/getting-keyboard-modifiers-in-filedrop/2043)

It would be nice if this cross-platform functionality was exposed as a Cinder function (as @axjxwright wrote, this can be done using Cocoa: [NSEvent modifierFlags] and Windows: GetAsyncKeyState()).