In FSX/P3D, the menu is handled completely through Simconnect itself, including reading the keyboard, it's black box for us.
This is different than MSFS, where the keys in the menu are read by the Toolbar menu instead, because the function to create menus has been removed in MSFS, but in FSX/P3D, it's handled by the sim itself.