Viewport and ESC button event handling corrections for PC version