TODO: new shape matrix
fixed most of the key events