[Help] Call a menu from another ESX resource

As title i need a menu button. when i select the value it will press the key on the keyboard such as IsControlPressed(0, Keys['B']) any solution?

elseif data.current.value == 'wave' then
                IsControlPressed(0, Keys['B'])

this is my code