UV Window Not Responding to Input

Hi, apologies in advance if there is an easy fix for this that I’ve somehow missed.

I’m making a model which I’m in the process of UV mapping. I’ve accidentally pressed a key and now the UV window isn’t responding to input. I can use the toolbar at the bottom, and the N and T keys open the sidebars, and I can zoom and pan using the scrollwheel of the mouse. However I cannot use the mouse to select anything, and the window also isn’t responding to any hotkeys. (such as using A to select/deselect all).
I’m reasonably certain I’ve accidentally pressed some hotkey or enabled some option as this only has any effect on the file that I had open at the time, but I cannot find any way to reverse it so that I can continue to work on the model. I’ve tried pressing all of the keys, and I’ve searched through the menus to find anything that looks out of place, but so far haven’t had any luck.

Probably enabled UV sculpt mode, hotkey Q.