Translate keyboard functions

Added keyboard functions to translate the shape.
Fixed a matrix bug that had the matrices working in reverse.