filter_result _BAlertFilter_::Filter(BMessage* msg, BHandler** target) { if (msg->what == B_KEY_DOWN) { char byte; if (msg->FindInt8("byte", (int8*)&byte) == B_OK) { for (int i = 0; i < fAlert->CountButtons(); ++i) { if (byte == fAlert->Shortcut(i) && fAlert->ButtonAt(i)) { char space = ' '; fAlert->ButtonAt(i)->KeyDown(&space, 1); return B_SKIP_MESSAGE; } } } } return B_DISPATCH_MESSAGE; }