Yes or no. IOW, sort of, depending what you plan to do.
You can physically hook as many keyboards as you want, but Windows joins all the inputs from them into one unit. IE, pressing an 'A' key on one keyboard looks the same as pressing an 'A' key on any keyboard to mame (and all other apps, AFAIK).
Under no Windows OS does directInput give direct/raw access to individual keyboard inputs. This is windows
bug "security feature" microsoft
doesn't want to fix "intentionally included".

There is a way around the
limitation sorry, "feature", recode mame to use RawInput to read the keyboard info, instead of directInput (or win32 API). Which would only work in winXP. As I hinted earlier, I don't know of any (non-demo) application that does, ATM. Zip, zero, zilch.
Aside: shouldn't "directInput" provide direct access to the inputs, not the filtered & combined indirect access to the keyboard inputs? Or it shouldn't be called directInput? (I feel the same with winXP & mice, for those who don't know me.

)
Any way, what everyone else said, BUT you still
cannot have two players using two normal non-hacked keyboards hooked into the same computer, and both use the arrow keys to move their own character. If that was close to what you were planning, . . . either plan to also edit mame's source or pray I get off my behind, update analog+, and add rawinput keyboard support to it. (The later does not look likely in the near future

.)
edit -- spelling