New flexible control mapping code, screen rotation modes