No, this is not possible and that’s a damn good thing. We don’t need random websites to act as keyloggers.
Any browser plugin allowing a website to do that would actually be malware or at least open a gaping security hole and thus end up on the plugin blacklists of browser vendors really soon.
solved Capture Global Keystrokes in Browser