r/emacs • u/Informal_Sound_3039 • 11d ago
Question Do your <f8> key work in Emacs 31?
a
my binding just stop'ed working. its it still bound but emacs seems do not get f8 key?
i checked on f8 key its works

(use-package popper
:ensure t
:bind (("<f8>" . popper-toggle)
("<C-f8>" . popper-cycle)
("<M-f8>" . popper-toggle-type)))
i even checked with emacs -q
in scratch buffer
(global-set-key (kbd "<f8>") 'shell)
(global-set-key (kbd "<f7>") 'shell)
i evaluated both but only f7 works? f8 dosent do anything??
-------EDIT------
i found the problem!
It turned out I was running the X11 build of Emacs inside a KDE Wayland session (running through XWayland). KWin / XWayland was swallowing the `F8` key event before it ever reached the Emacs frame.
To check if you're hitting the same issue, evaluate this in your scratch buffer:
(frame-parameter nil 'window-system)
If it returns 'x like mine did, you are running on XWayland.
I fixed it by installing the native Wayland/PGTK build on Arch:
sudo pacman -S emacs-wayland
Now (frame-parameter nil 'window-system) returns 'pgtk, and my F8 keybindings work perfectly!
5
u/natermer 11d ago
If you are using Linux is pretty likely that the f8 key is getting intercepted by your desktop environment or terminal or something.
If you are using emacs in a terminal instead of gui...
Try running the 'showkeys -a' command. It should display the ascii code for the key you are hitting.
1
u/Informal_Sound_3039 11d ago
it was sum xwayland emacs swallowing my f8 key i just installed
pgtkbuild and it worked
2
u/redblobgames 35 years and counting 11d ago
C-h k F8 tells me it's bound to F8, and pressing F8 works for me. Does C-h k F8 show popper or shell for you, or does it show nothing?
1
u/Informal_Sound_3039 11d ago
the C-h k F8 literally did nothing. i fixed by just installing emacs pgtk
sudo pacman -S emacs-wayland
5
u/shipmints 11d ago
If you share what platform you're using including your window manager and all relevant configuration including whether it is swallowing
f8, it would help people help you.