Enter/Return

Zini

08-09-2007 14:18:33

A handler registered with TextBox::addOnEnterPressedEventHandler is only called, when the return key is pressed, but not when the enter key (num pad) is pressed. Shouldn't it react to both?

kungfoomasta

08-09-2007 18:14:39

Good catch, this should fix it:


case KC_NUMPADENTER:
{
KeyEventArgs args(this);
args.scancode = KC_NUMPADENTER;
onEnterPressed(args);
}
break;
case KC_RETURN:
{
KeyEventArgs args(this);
args.scancode = KC_RETURN;
onEnterPressed(args);
}
break;


Thanks a lot for reporting all these. :D