This code seems to be pretty hacky, it works by injecting a dynamic library into the program and then looping on a timeout to rescan every window and attach a key handler: https://github.com/p-e-w/plotinus/blob/master/src/Keybinder....
Newer Gtk apps that use app menus with GAction and GMenuModel should work fine, and will be forward-compatible with other similar tools, since those will export the menu over d-bus.