How to open menu / change UI mode like via keybinds
From ESOUI Wiki
In the ESOUI code you wil find the keybinding functions of thegame's keybinds here "esoui/esoui/ingame/globals/bindings.xml":
https://github.com/esoui/esoui/blob/a34599f2cba93196976512d71f3b850cc9975ed9/esoui/ingame/globals/bindings.xml
The keybind for the UI mode (switch between mouse and non-mouse mode)change will be "TOGGLE_GAME_CAMERA_UI_MODE"
and it calls this function:
ZO_SceneManager_ToggleUIModeBinding()
The keybind to show the game menu will be "TOGGLE_SYSTEM"
and it calls this function:
ZO_SceneManager_ToggleGameMenuBinding()
Both of these functions are defined here "esoui/ingame/scenes/ingamescenemanager.lua":
https://github.com/esoui/esoui/blob/a34599f2cba93196976512d71f3b850cc9975ed9/esoui/ingame/scenes/ingamescenemanager.lua#L623