Open 1ci opened 9 months ago
Thanks for the pull request. You've added the feature to handle modifier key down/up, but only for macOS. This is not desired as we'd like to have the same features on all supported platforms. Are you able to provide this for Windows and X11? The second smaller issue is that you did not format your code with clang-format. In the root of the repository is a .clang-format file on how the code should be formatted.
The
acceptsFirstResponder
,becomeFirstResponder
andresignFirstResponder
methods in the opengl class make it possible for keyboard events to be caught by the (parent) view, otherwise it doesn't work if we don't have them.The line in
CocoaOpenGLView::viewSizeChanged()
fixes an issue in Logic Pro and GarageBand where when you change the view size, the key event handling stops working even though the opengl view is still the first responder. Making the parent view the first responder fixes this problem. When you click on the opengl view, it becomes the first responder again and key events work.I had to implement all key modifier flags on macOS for the fake/simulated keyUp event in
flagsChanged
to work properly: https://developer.apple.com/documentation/appkit/nseventmodifierflagsI have been testing this on Reaper, Ableton Live, Logic Pro and GarageBand.