You have a player inventory and you
have a chest inventory. I have a
separate UI for each of them
Put this in both:
Now the keyboard focus is wherever the mouse is.
Or, depending how you set things up - who processes the shift+click (inventory or item stack), have it in the item itself. This way, it’s the currently hovered item that intercepts shift & click.
The pertinent widget needs the isFocusable flag up, too.