doomemacs / doomemacs

An Emacs framework for the stubborn martian hacker
MIT License
19.34k stars 3.05k forks source link

Alternate evil initial key (M-SPC) clashes with default krunner keybinding (kde plasma desktop) #4412

Closed bhankas closed 3 years ago

bhankas commented 3 years ago

What did you expect to happen? For irc mode, default initial key is changed from SPC to M-SPC. I would expect it to work, but on KDE Plasma desktops, default keybinding for krunner is M-SPC, which overrides it.

What actually happened? Instead of operating on doom and emacs specific functions, M-SPC opens krunner

Additional details: It would be better to change alternate evil initiator key from M-SPC to C-SPC (or something similar, but not M-SPC) so as to accommodate plasma desktop defaults better.

Steps to reproduce:

  1. KDE Plasma 5 deskatop with default keybindings
  2. In doom-emacs, open irc mode
  3. Try to invoke other doom-emacs functions eg. ibuffer with M-SPC b i
  4. krunner opens instead of ibuffer

System information:

```
SYSTEM  type       gnu/linux
    config     x86_64-pc-linux-gnu
    shell      /run/current-system/sw/bin/fish
    uname      Linux 5.9.12 #1-NixOS SMP Wed Dec 2 07:52:03 UTC 2020 x86_64
    path       (/nix/store/7hvlpf56c7kss3j5p89gx6xw25p1p1v7-emacs-packages-deps/bin ~/.emacs.d/bin/ /nix/store/1877qq6ihpaxb72lv4ih5b9wx9n3a0ib-kitty-0.19.2/bin /nix/store/z03kbwmd3g5y4y4v5dnbx8kwpxlz02k6-imagemagick-6.9.11-29/bin /nix/store/sljzbgacwzzark9wvvsc6kp4bsdshal5-xsel-unstable-2020-05-27/bin /nix/store/01rrgsg5zk3cds0xgdsq40zpk6g51dz9-ncurses-6.2-dev/bin /run/wrappers/bin ~/.nix-profile/bin /etc/profiles/per-user/$USER/bin /nix/var/nix/profiles/default/bin /run/current-system/sw/bin /nix/store/c65gij7i8xaw37hc69l3aa0j6kfbyphz-emacs-27.1/libexec/emacs/27.1/x86_64-pc-linux-gnu)
EMACS   dir        ~/.emacs.d/
    version    27.1
    build      Dec 12, 2020
    buildopts  --prefix=/nix/store/c65gij7i8xaw37hc69l3aa0j6kfbyphz-emacs-27.1 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft --with-cairo CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200
    features   XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER GMP
    traits     (batch server-running envvar-file)
DOOM    dir        ~/.doom.d/
    version    2.0.9
    build      HEAD -> develop, origin/develop, origin/HEAD febf960c4 2020-12-09 17:30:25 -0500
    elc-files  0
    modules    (:completion company ivy :ui deft doom hl-todo indent-guides minimap modeline nav-flash ophints (popup +all +defaults) treemacs unicode window-select :editor (evil +everywhere) file-templates fold multiple-cursors snippets :emacs dired electric ibuffer undo :term vterm :checkers syntax :tools direnv lookup magit pdf taskrunner :lang emacs-lisp latex nix (org +babel +capture +roam +hugo +deft) python (sh +fish) :app calendar irc :config (default +bindings +smartparens))
    packages   (n/a)
    unpin      (n/a)
    elpa       (vterm)
```
RBckmnn commented 3 years ago

You can simply change those key sequences in your own config. See the doom-leader-alt-key and doom-localleader-alt-key variables

AloisJanicek commented 3 years ago

Alt key is a modifier, it modifies existing key functionality, provides alternative behavior or alternative access to the functionality. There is leader key functionality bind to Space in doom. Providing alternative access to leader key functionality with Alt when Space cannot function as such (in insert mode, etc.) makes perfect, logical sense.

In KDE Plasma Desktop there is no functionality bind to Space itself. Only reason why they (and many others across the different platforms) use Alt+Space for launchers is that those keys are next to each other and can be easily and quickly pressed with hand. No logic, no reason, just pure convenience.

You can easily change doom-leader-alt-key in your config.el on doom's side, but you probably want to avoid assigning it to Control+Space as that key binding provides completion on demand in doom and thus is taken.

You can easily change / disable Alt+Space global krunner keybinding on KDE Plasma side.

If anything this is a private user config issue, not the doom issue. You could as easily report it on bugs.kde.org and the conclusion would be the same.

bhankas commented 3 years ago

Thank you for quick reply. Fair enough, I have reassigned krunner shortcut on my desktop. I suppose this issue can be closed now.