I am running Fedora 40 which I installed a few months ago. I noticed that `F10` in my Emacs does not run the function that I have assigned to it in Emacs: in fact, Emacs does not see the `F10` key any longer (and I am pretty sure that this started happening when I upgraded to Fedora 40: it was working fine in Fedora 38 - I skipped Fedora 39).

I can tell that Emacs does not see the key by using `C-h C-k`, the help function to describe a key, and pressing `F10`. Usually, the key is echoed in Emacs's echo area and the command bound to it is reported. In the `F10` case, nothing is echoed in the echo area. Instead the `File` menu is dropped down.

That behavior seems to be somewhat general: both `Firefox` and `Thunderbird` exhibit the same behavior, which is another reason to conclude that the desktop environment is what's doing this. Not every application does this however: in `gnome-terminal` and `xterm`, `F10` apparently just generates an escape sequence: `^[[21~`.

I did `gsettings list-recursively` and found one entry using `F10`: that looked promising, so I set it to empty:

```
$ gsettings get org.gnome.desktop.interface menubar-accel
'F10'
$ gsettings set org.gnome.desktop.interface menubar-accel ''
$ gsettings get org.gnome.desktop.interface menubar-accel
''
```
but that didn't do anything AFAICT (after various levels of restarting: restarting Emacs, logging out and back in, rebooting, shutting down and starting from scratch). As far as I know, all the graphical widget thingies (Settings, Tweaks, etc.) are using the Gsettings API underneath, so this *should* have found the culprit - but no dice.

Since Emacs is built with libgtk-3.0, I also tried a GTK setting as described in [this answer](https://unix.stackexchange.com/a/40685/230615) but that also did not make any difference.

Although my main interest is to free up `F10` from whoever its current master is and allow it to be passed to Emacs, I'd also be interested in any tips/hacks/methods you have come up with to deal with similar problems. Any ideas?

Version info:

- OS: Fedora 40
- Kernel: Linux 6.9.12-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Jul 27 15:56:15 UTC 2024 x86_64 GNU/Linux
- Gnome: 46.3
- Emacs: bleeding-edge upstream, unreleased (31.0.50), but it also happens in the Emacs that comes with Fedora 40: GNU Emacs 29.4 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0) of 2024-07-16

If more information is needed, I'd be happy to supply it: please let me know.

UPDATE: in response to the comment by David G. below, `xev` does see `F10` (and so do `gnome-terminal` and `xterm` as mentioned above, and of course whatever makes the `File` menu to drop down in the case of `Emacs`, `Firefox` and `Thunderbird`). The problem is not that it is not seen: the problem is that it is grabbed before I want it to be grabbed and I don't know what grabs it. That's what I'm trying to find out in the hope that I can convince that something to keep its hands off my `F10` :)

In response to further comments by David G. (thanks for the responses and for keeping me honest!), I tried `emacs -Q` which starts Emacs without any initialization files (either site-init or user-init - I need to check early-init though - I'll do that later and update this update - I need some sleep). But the GTK suggestion is intriguing (although `gnome-terminal` also uses libgtk-3.0 and sees `F10` - but there may some option that I have not been able to find yet. I see if I can build Emacs *without* GTK and see how that goes.)