Thank you guys for your comments.
I just forgot to mention one thing. Actually, Cakewalk can detect the two midi keyboards.What I did is:
1. Start up Cakewalk.
2. The error message pops up.
3. I go to "Edit > Preferences > Devices".
4. Check the 2nd keyboard (see pic).
With this I can play the two keyboards with no problem. But the problem is I got the message every time I start up Cakewalk and I have to check the 2nd keyboard.