Questions tagged [key-bindings]

Keyboard shortcuts, key chords, key sequences, hotkeys, or any association between key combinations and corresponding actions in Emacs.

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

Default yank keyboard shortcut does not work

I am using Emacs 27.1 (GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian). When I hover the mouse pointer over the "copy&...
1
vote
0answers
23 views

On installing a handler for SIGUSR1

The documentation quoted in this answer mentions two different way of installing a handler for a SIGUSR1 signal, namely: (define-key special-event-map [sigusr1] 'sigusr1-handler) and (global-set-key [...
0
votes
2answers
29 views

funcall inside local-set-key

Programming Perl in cperl-mode I often use _ symbol, so I decided to remap it with / symbol, so I could type faster. I created the following functions: (defun add-underscore () (interactive) (...
1
vote
1answer
56 views

I want when "C-w" is pressed, execute delete-backward-char when no region is selected and kill-region when the region is selected

Similarly, I want to delete word backward when C-u C-w is pressed. I would also value recommendation on cut/paste/kill conventions. I tried to bind C-w to delete-backward-char, but kill-region stopped ...
0
votes
1answer
32 views

general.el error Key sequence starts with non-prefix key

I am having a problem with general.el package. I have SPC set as a prefix and then other keys as sub-prefix, then some other keys as actions, like how Doom Emacs has. (nvmap :states '(normal visual) :...
0
votes
1answer
41 views

How to lists all shortcuts available for currently active major mode? [duplicate]

I simply want to get the list of shortcuts. For example, when my cursor is in Treemacs, I press '?' and then mini-buffer opens which show all available shortcuts. But same thing isn't true for other ...
0
votes
1answer
52 views

How to use Ctrl-C on WSL (key binding conflict)

I'm learning Emacs, using WSL-1 in cmder shell on Windows 10. C-c seems an essential key binding yet on Windows this combination is tied to copy from buffer. Same applies for Ctrl-v - right from the ...
0
votes
0answers
29 views

`C-M-SPC` is not working anymore for `mark-sexp`. It has changed to `C-M-@`. Why did that happen?

I have been using mark-sexp often because I am working with Common Lisp. Until now, the binding C-M-SPC has worked out pretty well. For some reason that I do not understand, the binding has changed. ...
0
votes
1answer
28 views

How to set keybinding to `C-c C-t` in sh-mode?

By default C-c C-t has sh-tmp-file binding in sh-mode, which I want to change.: C-c C-t runs the command sh-tmp-file (found in sh-mode-map), which is an interactive compiled Lisp function in ‘sh-...
1
vote
1answer
322 views

How can I unbind (C-M-x) globally?

I was trying to bind (C-M-x) to er/expand-region but I checked the key combination with (C-h k) and noticed that it was binded to eval-defun. So I tried to unbind it with any of the following commands:...
2
votes
1answer
54 views

What does the `@` mean in key-shortcuts?

For beginners it is sometimes hard to understand the description of key-shortcuts. I found a @ sign in this context; e.g. C-c @ C-f What does it mean? More examples here: https://elpy.readthedocs.io/...
0
votes
1answer
26 views

In Magit, the command `magit-status` opens the buffer with the status buffer. Is there some similar command to do the same but with the Slime's REPL?

I am using Emacs powered with Slime to write code on Common Lisp (SBCL). In addition, I am also using magit. Magit has a handy command called magit-status (C-x g). I use it a lot and I tend to have 2 ...
0
votes
0answers
13 views

find-tag M-. vs Windows 10 emoji [duplicate]

Recent Windows update kills my M-. (Meta-dot) binding, it intercept the keystroke (Windows Key+.) and display the emoji windows. I already try this link https://techcult.com/how-to-enable-or-disable-...
0
votes
0answers
22 views

Using with-editor and custom key bindings

I am trying to use the with-editor package with the kubectl edit command in the kubernetes-el package. I proposed a patch for the same. I am trying to understand how to create custom key bindings like ...
1
vote
1answer
36 views

Bind function key when in python-mode

I want to bind f5 to launch pdb, but the minibuffer always says <f5> is undefined. (use-package python-mode :bind (:map python-mode-map ("<[f5]>" . realgud:pdb)) :...
0
votes
1answer
20 views

How do I bind C-x <someKey> to a key in god-mode?

I really like god-mode (https://github.com/emacsorphanage/god-mode), but one thing that bothers me about it is that i use commands such as C-x k, C-x b, C-x 1 ect. all the time. It doesnt feel ...
1
vote
1answer
21 views

Mollyguard specific functions (delete-frame)?

I have recently started using multiple frames regularly. I keep accidentally hitting C-x 5 0 instead of C-x 5 o. I do want to still be able to close frames, but I want an "are you sure? (y/n)&...
0
votes
2answers
87 views

How can I override an OS keybinding in Emacs?

One of my major modes defines the keybinding C-M-t, but every time I use it, my operating system (Ubuntu Linux) intercepts the keybinding and opens a terminal. The OS keybinding overrides the Emacs ...
0
votes
1answer
49 views

How to override org-mode-map key bindings?

I would like to override the C-c C-j keybinding. I put this in my init file (global-set-key (kbd "C-c C-j") 'counsel-org-goto) However, it won't override the command org-goto (found in org-...
2
votes
2answers
63 views

Wrap all emacs key-bindings ... override command loop?

---+ 1: BRIEF: How can I wrap all or almost all key-bindings? Both those already defined, and those that will be defined in the future? E.g. can you point me to code that overrides the command loop ...
1
vote
1answer
40 views

Create a function that deletes word on point and replace with the yank register on Evil-emacs

I want to emulate this vim remap in evil-emacs (doom emacs). nnoremap <leader>mpp ciw<C-r>0 I want to change the word on point (I don't mind word or Word, just want the evil-change with ...
9
votes
1answer
302 views

How to make `C-x 9` the same as `C-x 8 "`

For typing german text with an english keyboard layout the binding C-x 8 " is very valuable. After typing it I can insert umlauts easily. Here is what which-key shows me after typing C-x 8 " ...
0
votes
0answers
60 views

How to override evil-org-mode keybindings

Here is the evil-org pachage I am using: https://github.com/Somelauw/evil-org-mode. All I want to is be able to demote/promote a subtree by pressing M-L/H. I have tried using the way the repo ...
3
votes
4answers
349 views

Which key prefix is left for user defined bindings?

C-h b shows the key bindings. But I can not see, which prefix is left for my own functions. Is any prefix reserved for user bindings?
0
votes
1answer
78 views

How to prevent `Text is read-only` when in minibuffer

It's about deleting minibuffer input without trying to also delete some of the minibuffer prompt (which is read-only). When I do C-x C-f for find-file and delete all the way of the given path. Now, I ...
2
votes
1answer
62 views

How to define global keybinding for `C-c >` and `C-c <` using defhydra

I am trying to apply following solutions's keybinding to overwrite all mode's keybindings for C-c > and C-c <. From the answer for Can we do C-c > and > and > to continue indentation: (...
0
votes
2answers
31 views

Looking for a better way to test whether the current Emacs process is running under GNU Screen

NB: For the sake of this question, please assume that the underlying OS is some flavor of Unix. If more specificity is required, then please assume that it is either Darwin or some flavor of Linux. ...
1
vote
1answer
24 views

Can't unbind mouse button from keymap

This is more of an academic question than a practical one, as I've already worked around it. However, the curiosity / mystery is killing me. I'm about 10 days into emacs, so new to a lot of this. As I'...
1
vote
1answer
15 views

How to resolve key-binding conflict between Icicles and `super-save-mode`?

I noticed that if Icicles is loaded then super-save-mode doesn't save a buffer when you switch to another buffer, though switching frames works. Icicles seems so technically advanced, yet there is no ...
0
votes
0answers
28 views

use-package keybind only works with eval-buffer

The following init.el keybind doesn't work after starting emacs, only when I eval-buffer init.el (otherwise C-c C-d just goes to its default bind in python-mode): (use-package python-mode :ensure ...
1
vote
1answer
37 views

Why is my keybinding not working?

I am trying to customize my settings on Paredit. Instead of using the default C-right and C-left, I would like to do C-< and C->. I tried with this code inside my init file: (eval-after-load '...
0
votes
0answers
44 views

How to change keybinding for yas-expand?

TAB has multiple keybindings in different conditions. I want to change the keybinding for yas-expand from TAB to M-TAB. How can I do it? Basically I want TAB to run indent-for-tab-command in all ...
2
votes
1answer
68 views

New line and indent without electric mode

I have come to hate the inconsistency of the electric indent mode and I haven't much of a clue about how it works anyways, so I've disabled it and am trying to get the desired behavior from scratch. I ...
3
votes
2answers
150 views

Are the Control & Meta "digit argument" bindings duplicates?

As far as I can tell the Meta and Control digit-argument bindings (C-1, C-2, C-3, M-1, M-2, M-3) are duplicates. There are so few single-modifier, single-key bindings available, it seems like a ...
0
votes
0answers
16 views

OSX Paredit Keybindings iTerm

I am trying to get paredit to work on iTerm on mac. I am trying to paredit-forward-slurp-sexp which is bound to <C-right> and C-). But <C-right> does nothing, and C-) prints out 9. It ...
0
votes
1answer
22 views

windmove doesn't recognize S-<up> and S-<down> on Macbook Air

GNU Emacs 27.2 in Mac OS terminal (11.4 Big Sur). Started with (windmove-default-keybindings) and found that S-<up> and S-<down> behaved just as <up> and <down>, as if the ...
0
votes
2answers
30 views

C-i combination doesn't work with lowercase i [duplicate]

I've configured Doom emacs to run an interactive evil-ex command in visual mode, the reaconfiguration is as below: (defun evil-insert-into-lines () (interactive) (evil-ex "'<,'>norm I&...
0
votes
2answers
68 views

Stop major modes from overwriting my keybinding [duplicate]

By default C-x n is a prefix keymap used for narrowing. I want to bind C-x n to windmove-down. (global-set-key (kbd "C-x n") 'windmove-down) This works fine for Text mode. But many major ...
1
vote
1answer
44 views

Why this "keybinding conflicts" message keeps appearing? How can I fix it?

After pressing M-x sly, I keep receiving this message: [sly] SLIME detected in 'lisp-mode-hook', causes keybinding conflicts. Remove it for this Emacs session? The odd thing is that SLIME is not ...
0
votes
1answer
27 views

How can I show timestamp in natural date format in minibuffer?

I am working quite a lot with Unix timestamps. I installed the ts package, but I am not able to create a key-binding to show the conversion of a timestamp to natural date format. I would like to be ...
1
vote
0answers
18 views

Mac OS and possibly other GUIs: Why is default "s-g" behaving differently from "C-s" in isearch-mode

I don't really want s-g to exit the Isearch minor mode but it does. The reason this is happening to me is unclear, because investigation of the binding of s-g reveals it is supposed to be a standard ...
8
votes
1answer
174 views

Difference between [mouse-1] and [down-mouse-1]

I noticed two keys: [mouse-1] and [down-mouse-1]. When I use describe-key with a single click, it shows: There were several key-sequences: <down-mouse-1> at that spot runs the command evil-...
0
votes
0answers
22 views

How to advice on a prefix keymap

I want to perform some action before a prefix keymap is invoked. Seems to me prefix keymap command is something different from normal commands that I cannot advise on it. The following code gives ...
1
vote
1answer
43 views

mwheel-scroll bindings between GUI and terminal?

Using an Emacs daemon (28, pgtk branch) switching between GUI and terminal, I can't get mouse scrolling to work on both. They work on each individually, but the issue is with the mouse-wheel-{up,down}-...
0
votes
0answers
29 views

Assign a keybinding with "C-[" [duplicate]

I want to set shortcuts for the following functions: python-indent-shift-left and python-indent-shift-right. I can do the following and it works. (bind-keys :package python :map python-mode-map ...
2
votes
1answer
53 views

How show corresponding key binding of command during M-x completion?

Linux Mint 20 Emacs 27.2 ido-mode When I press M-x then show (ido-mode) the list of functions. Nice. But sometime it is not enough. I need to know what is keybinding for this functions. Is it ...
0
votes
0answers
28 views

emacs -nw set key-bindings similar to those of emacs-gui

In emacs -nw, many shortcuts are bound to something different from the "classical" emacs-gui. For instance: \C-_ is bound to DEL (classically it is undo) backspace is \C-h thus opens help ...
2
votes
2answers
67 views

Keybinding for pipe in ESS

I am trying to define keymapping about %>% for ess R mode. Code 1 is my init.el based on How to implement the piping operator %>% in ESS mode?. After evaluation of the code, I get the keybinding ...
3
votes
3answers
39 views

Rebinding M-q in `define-minor-mode`

I'm trying to define a minor mode that rebinds M-q to a modified version of fill-paragraph. What I've written so far: (defun myfun () (message "myfun called")) (define-minor-mode mymode &...
0
votes
0answers
22 views

How to use Ctrl+K as evil escape?

I understand that the way to rebind the "escape" function while using the eVil mode is something on the lines of (setq-default evil-escape-key-sequence "jj"). But I want to set my &...

1
2 3 4 5
24