Can Ruby do this?

Is it possible to use Ruby to write a program that runs on Windows 7 such that it monitors keypresses so that if the “Caps Lock” key is pressed (even when user is in another Windows 7 program) then Windows should do perform a “copy to clipboard” instead of the usual “Cap Lock”?