First, the window manager is just a slightly special client
to the X server: there is no such thing as a "window manager
API" you can use to listen to keyboard events (and that's
good news: I dare not imagine what an horrible kludge of
half-compatible ad-hoc routines the oh-so-numerous WM would
expose then!): if you want keyboard events, you just ask for
it to the X server using the normal X11 protocol.
But let's not be pedantic: what you propose breaks all the
good practises from the
ICMMM;
moreover, there are no right way in practise to grab the
keyboard focus reliably without breaking the too-numerous
ill-behaving clients (xscreensaver, many gtk+ applications,
...).