How does onKeyUp work?

I want stuffs to happen when a key on the keyboard is released, but I dont know how this command works. ._.