Re-add keyboard shortcuts and fix maximize function