fix rectangle size and add key bindings