On 06/25/2016 01:17 PM, Patric Schmitz wrote: > I'll keep searching for a way to get physically located key > information on OS X, but it seems that in order to support Apple > systems reliably, one has to reimplement keyboard layouts in > order to do that reverse mapping.
So there is a possibility to get the physical key locations from Cocoas NSEvent, which apple calls virtual keycodes. They are described as: > These constants are the virtual keycodes defined originally in > Inside Mac Volume V, pg. V-191. They identify physical keys on a > keyboard. Those constants with "ANSI" in the name are labeled > according to the key position on an ANSI-standard US keyboard. So it seems that using the Cocoa API it should be possible to get those physically located keycodes as they would be labeled on a standard ANSI US keyboard. Those are not the same as what QKeyEvent calls nativeVirtualKey, since those are the (layout-translated) keysyms according to the documentation. If Qt does not pass on the Cocoa virtual keycodes one would have to get them directly via the Cocoa API it seems. Not very desirable from an implementation point of view, but it seems there is at least a possibility to handle this independent of any keyboard layouts. Best, Patric ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel