handle in a better way keys when using open_window_params