If you mean when a key is pressed in the typing area of a chat window, there's an event provided by Plus!, named OnEvent_ChatWndEditKeyDown. More information about this event can be found in the docs (Events Reference > Messenger Events)
If you mean when a key is pressed while a PlusWnd is focused, you'll need to register some notification and respond to it. However, this requires some knowledge of how to use the Win32 API and may turn out difficult. I already tried something similar, but failed because I couldn't catch any message.
If you mean when a global hotkey is pressed (like Ctrl+Alt+Delete to open Task Manager and can be used in any program), you'll need to use some DLL to register the hotkey for you and respond on it. I've seen this in HopperLive where it's used to bind "hops" to a global keyboard shortcut, but I have no idea how it's been done.