If you want to change a inventory key of the Fivem Esx (es_extended) framework, you should open es_extended/client/main.lua file and adjust row 442 (this may vary depending on the Esx version).
This would be the row, which you should change:
if IsControlJustReleased(0, 289) then
adjust (289 = F2) to the ohter key and restart server. 😉
You will find FiveM Key mapping here:
https://docs.fivem.net/docs/game-references/controls/