While writing this post I was not aware of the Shift+T shortcut, aka. the “Pick Layer” command, which does pretty much the exact same thing I described in this post, therefore rendering it pointless. Sometimes I can’t keep up with PM’s numerous features!
The idea is simple, similar to how quick color picker works by holding down ctrl, I’d like a quick layer picker, which would immediately set the current working layer to whichever part of the sprite I click on.
It could be bound to any other key, like alt. For example, if I have a sprite which has seperate layers for things like head, arms, legs, etc., it’s more convenient to be able to switch between those layers by clicking on the head, arms, legs, respectively. Especially considering that in fullscreen mode you can’t see the layers tab.
For overlapping layers the topmost one should be prioritized, regardless of opacity, i guess.
I give credit for this idea to Aseprite, in which this functionality is available via the ctrl key.