With help of Adam, in this SO thread - https://stackoverflow.com/questions/72884882/shift-f6-as-menu-shortcut/7291119 - I managed to make it work as I wanted:

  MenuItem runFileItem = new MenuItem("_Run file", (MenuItem mi) => pm.runFile(), "activate");
  runFileItem.addAccelerator("activate", accelGroup, GdkKeysyms.GDK_F6, ModifierType.SHIFT_MASK, AccelFlags.VISIBLE);

It would be nice if MenuItem constructor accepted int instead of char, so that we can pass GdkKeysym constant if needed, or char, so we do not have to call addAccelerator()...