THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/02/2008 at 16:51, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Howdy,
What I'm trying to do is, in a non-modal dialog with a "Setup" button have the pressing of the Enter key perform the same action as the "Setup" button. But, I'm having trouble detecting if the Enter Key was pressed. I tried this in GeDialog::Command()
> \> BaseContainer res; \> if(GetInputEvent(BFM_INPUT_KEYBOARD, res)) \> { \> GePrint("A key was pressed"); \> LONG key; \> res.GetLong(BFM_INPUT_CHANNEL,key); \> if(key == KEY_ENTER) \> { \> GePrint("Enter key was pressed"); \> } \> } \>
This code prints "A key was pressed" but never prints "Enter key was pressed". In fact it prints "A key was pressed" even when I click on the "Setup" button or any of the other option gadgets. :o(
How do you detect when the enter key was pressed so that it would perform the same action as clicking on the "Setup" button?
Adios,
Cactus Dan