There used to be an achievement that you could use to detect if someone opened their inventory. This achievement was however removed when the achievements got switched out for advancements. I would...
If you hold an item in your hand and Alt-click on a container, instead of opening the GUI it would just insert all the items that you are holding into the container. there is enough room of course.