Hi,
I’ve added an ofxInputField<std::string>
to an ofxGui. It works except when trying to copy/paste text values from the field.
I’m running of_v0.11.2_osx_release on an M1 Macbook Pro MacOS v11.6 latest update.
I set a breakpoint in ofxInputField.keyPressed
to debug.
I notice two oddities:
- we test for
OF_KEY_CONTROL
rather than the more MacOS-nativeOF_KEY_COMMAND
for the paste action (and other command actions) - when the code runs after pressing “Ctrl-V” (not Command-V), it seems that
key == 'V'
rather than the ‘v’ that is looked for in the code
The result is that the normal “command-key” actions are not recognised in keyPressed and fail to work.
When I replace OF_KEY_CONTROL
with OF_KEY_COMMAND
inside keyPressed, the normal actions work fine.
Is this a peculiarity of my setup (vanilla except for running an M1 machine), or a deliberate decision that doesn’t match my expectation, or an oversight that might require a platform-specific change to use OF_KEY_COMMAND
instead of OF_KEY_CONTROL
when building for MacOS.
Thanks,
Steve
2 posts - 2 participants