How to track the pressing of a key on OSX

I agree not overloading the UI is nice.
I am thinking about a command to move windows around taking care of the openings. So I was hoping I could use the arrow keys to indicate one of the 4 directions. I would not like to add 4 other buttons to my toolbar.
Of course there would be instructions in the status bar.
Some native commands do that when usibg keys; ctrl, opt, cmd …
but… maybe those cmds are not pure ruby coded.