Keybinding not working

I am unable to use cmd in a key map.

  • super (S ): Windows key, Command key

(define-configuration buffer
  ((override-map (let ((map (make-keymap "override-map")))
                   (define-key map
                     "S-w" 'delete-current-buffer)))))

Try running nyxt --system-information so we can have an idea of what system you’re running.

For added context the arch linux VM is running in Parallels on a M1 system.

[johnny@myhostname ~]$ nyxt --system-information
Nyxt version: 2.2.4
Renderer version: GI-GTK
Operating system kernel: Linux 5.19.4-1-aarch64-ARCH
Lisp implementation: SBCL 2.2.2 (Dynamic space size: 3221225472)
 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6
 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12
 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF
 :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42
 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56

ASDF version: 3.3.1
Critical dependencies: (/build/nyxt/src/nyxt/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd

Guix version: 

What program are you using to run the virtual machine? Could it be intercepting that key?

I should also mention that, while that achieves your goal, it is not recommended.

The override-map is the almighty keymap that takes precedence over all the others.

From Nyxt, you can consult the built-in manual (C-space manual). Search for the section that mentions *my-keymap*. Does that help?

Are you running under X11, Wayland, or even XWayland? If X11, you can run xinput test and see if it even sees the key combo…

I am thinking it is emacs is intercepting the s-w keys. Thoughs-t is working and can see s-t when I run describe-key in nyxt.

I am using Emacs Window Manger (exwm) in Linux.

That key in bound by default in EXWM when you have the following (exwm-config-example) in your Emacs init file.

Regardless, this a topic orthogonal to Nyxt :slight_smile:

1 Like

HA. I just found that before seeing your comment.

After un-binding the s-w in exwm all is working!

Here is my working config:

(define-configuration buffer
    ((default-modes (append '(emacs-mode) %slot-default%))
     (override-map (let ((map (make-keymap "override-map")))
                   (define-key map
                       "S-w" 'delete-current-buffer ; this doesn't seem to be working
                       "S-t" 'make-buffer-focus
                       "S-f" 'nyxt/web-mode:search-buffer)))))
(define-configuration browser
    ((session-restore-prompt :always-restore)))

See, this is one of the reasons I chose not to use EXWM - I’d hate to have overlapping keybindings with my OSglorified text editor… glad you could figure it out, though!

EXWM accounts for all of that.