I would like to set an item that when right clicked would press a specific key bind set in the control menu.
For context, I am using the mod Xaero's maps for navigating the minecraft world but one thing that I wish I could do is that instead of pressing a keybind to load up the map, I would instead hold a "World Atlas" or some item that when right clicked would instead load up the map.
I looked into generating a datapack to add an item that would press the keybind but looking through the documentation, most actions to be performed are using the game commands and not keybinds. And as Xaero's maps is not open source, I can't dig through the code and find the specific call to load up the map.
This question has been asked before on other forums but answers were never provided or they assumed some level of knowledge about something.
I tried to use ChatGPT to provide some avenues into finding answers but it keeps spitting out nonsense.
Currently I am checking to see it if is possible to use Modern Keybindings to do this but I am still researching.