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
0 answers
6 views

Org-mode-map key doesnt change to nil

My go to method for changing a key in a major mode is to do this: (eval-after-load "org" '(progn (define-key org-mode-map (kbd "C-k") nil))) But for C-k which is bound to ...
0 votes
1 answer
33 views

Why does C-x C-e work in foo.txt but C-M-x does not?

Create a new file foo.txt and type this code in it: (+ 1 2) Move the cursor to the end of the line (right after the close-paren) and press C-x C-e. The expression is evaluated. Move the cursor to ...
0 votes
1 answer
27 views

How do I use a while loop with a macro?

This works when I remove the loop but with the loop it does not work. (defmacro my/def-key (state map) (let ((x '( (kbd "<leader>z z") (lambda nil (interactive)(message ...
  • 141
1 vote
1 answer
37 views

lowercase `s` as prefix in `describe-bindings`

[MacOS, running 28.2 from emacsformacos.com] When I do describe-bindings I see that the "Global Bindings" includes a bunch of bindings with the prefix s - not S for "Shift". What ...
  • 113
0 votes
1 answer
24 views

how to unbind M-1 in spacemacs?

I used spacemacs for my work, now I need to unbind M-1 with following, but not work (global-unset-key (kbd "M-1")) I checked binding, it looks M-1 was used by winum-select-window-1.anyone ...
  • 3
0 votes
1 answer
23 views

Removing a binding from evil-collection

evil-collection is mostly quite useful - but occasionally the default settings shadow my global bindings and I seem to need to restart emacs to remove the binding. I bit up against this problem with ...
  • 661
0 votes
1 answer
71 views

How to define Shfit+Ctrl keybinding?

I can't seem to press S-C-c - it gets registered as C-c... Why? I can't even think of any reason why this type of situation would come about? UPDATE: it seems like evil vim keybindings are to blame......
1 vote
1 answer
43 views

Swapping Escape key and backtick key in all modes

I'm using Emacs 27.2 (2021-07-22) and for years have mapped Escape to Backtick key (Ok, I did this after the industry moved the Escape key to the location it is in now, next to F1). The keyboard I ...
  • 155
0 votes
0 answers
26 views

Doom Emacs kill-word binding

My keybindings say I can hit C-<delete> to run kill-word. This does not seem to work for me. When I hit C-<delete> it only delete a single character to the right of my cursor. How can I ...
  • 157
0 votes
1 answer
21 views

Is there a way to make the left alt key apply a sticky meta modifier?

I'm using vanilla emacs and since I'm using a nonstandard keyboard layout, I've used dual-function-keys to modify the left alt key so it sends left alt if it is tapped and right alt if it is held. I ...
0 votes
1 answer
29 views

Which-key like in doom emacs: Symbol's value as variable is void: some-map

I would like to integrate which-key like doom emacs with "space" in my configuration, but I get the error: Symbol's value as variable is void: some-map ;; shows shortcuts, when clicking C-x ...
  • 279
0 votes
0 answers
31 views

Keybindings without a prefix key?

In my emacs, tide-mode has a key for jump-to-definition of g d I would like to define keys like this where i do not need a prefix (I use evil, so it would be in normal mode). When I try this: (global-...
0 votes
1 answer
22 views

I can't bind a key to specific commands for some reason

Why can't i remap my keys with the following command in my spacemacs init.el file? (global-set-key (kbd "C-+") 'frm-zoom-in) For some reason,it gives me the following error: Wrong type ...
0 votes
2 answers
64 views

how to bind recentf-mode to C-u C-r

When I try to do that it is given me the prefix error. Can someone tell me how to still achieve this please? Using both bind-key and bind-keys* did not work for me
  • 543
0 votes
1 answer
49 views

How do I unbind the SPC key from a pdf-viewer window and use evil leader key instead?

How can I unbind the SPC keybinding from a pdf-view-mode window and use the evil leader key instead? This is what I have currently: (use-package pdf-tools :ensure t :config (pdf-tools-...
0 votes
1 answer
38 views

Defining Spacemacs/Doom-like bindings with general.el and which-key, how to use :wk on all levels?

I'm trying to put together a config of my own after having used Spacemacs for a few years. To customize keybindings, and make them a bit Spacemacs-like, I'm trying out general.el. So far it seems to ...
  • 259
0 votes
1 answer
35 views

How do I unset all key bindings defined in persp-mode-map and persp-key-map?

I want to unset all key bindings defined in persp-mode-map and persp-key-map. As usual, I tried the following but the bindings remain effective sticky. This is a behavior that I have never experienced ...
0 votes
1 answer
21 views

Unset key binding to tmm in aquamacs

I use aquamacs on mac and the latest version apparently maps M-` and M-' to tmm functions (which I don't use and don't care to). This is annoying since these are used for accented letters, in all mac ...
  • 1
0 votes
0 answers
12 views

evil-mc binding shadowing my binding?

I use the binding grr for my own command in evil (along with lots of bindings started with gr standing for refactor). I recently enabled evil-mc and which stopped grr from working like it did before. ...
  • 661
0 votes
1 answer
29 views

S-<right> (org-agenda-do-date-later) is mapped to windmove-right [duplicate]

I moved to a new machine with my identical emacs configuration and all of a sudden S-<right> (which used to work as org-agenda-do-date-later) is responding bound to the command windmove-right (...
  • 145
0 votes
1 answer
25 views

Capital M is behaving weirdly in insert-state of evil-mode

I am observing a strange behavior in evil-mode that I'm unable to figure out what is causing it: In insert-state, pressing "M" does not insert a capital m as expected, but instead gives me ...
0 votes
1 answer
21 views

How to move out of a python string with C-M-u

I'm used to using backward-up-list to go to the front of a string in most every programming mode, but for some reason it doesn't work in python-mode. python-mode rebinds C-M-u to its own python-nav-...
  • 233
0 votes
1 answer
20 views

Spacemacs keybinding not behaving as expected

The following keybindings work when simply moving. However, when pressing d and then one of these keys, the behavior is not as expected. When pressing dL it will delete until the end of the page. When ...
0 votes
0 answers
19 views

How do I map cdlatex-math-symbol-prefix to F14?

I'm using cdlatex, which uses two settings to choose math symbols, cdlatex-math-symbol and cdlatex-math-symbol-prefix. Both are mapped per default to the same key. I would like to map them to F14, ...
0 votes
1 answer
43 views

In Dired, How to disable (or unmap) SPC from executing dired-next-line?

What I want: While in dired, want to disable/unbind <SPC> from dired-next-line Reason: I use j or <C-n> to dired-next-line in dired, I never use <SPC> as to go next line. I use &...
  • 357
0 votes
1 answer
27 views

Ctrl-Alt-Enter: Add a new top-level heading and the current date

I'm trying to configure Ctrl-Alt-Enter to insert a new top-level heading and the current date in the following format: * [2023-02-07 Tue] This is what I've come up with: (defun heading-date () (...
0 votes
0 answers
39 views

Evil Mode: How to get 'q' to kill Occur buffer + window

I recently started using Doom Emacs. I'd like to use Occur mode more frequently (via occur, multi-occur, etc.), but every time I open an Occur mode buffer in a split window, the only way to kill the ...
  • 11
0 votes
1 answer
31 views

How can I get the Msys2 CLI to recognise the emacs ctrl + h key chord?

OK, I hope this is in the right department because I think although this is a problem with using emacs it may be the console window settings causing the problem. In emacs in most console or GUI ...
-1 votes
1 answer
35 views

How to remap A-m? It is currently bound to μ

For some reason, pressing A-m (i.e. typing m while holding the Alt modifier key) inserts the μ character. I want to remove this binding so that I can then bind this key sequence to some interactive ...
  • 187
1 vote
2 answers
47 views

Alt+(left/right) arrow doesn't indent in Org mode anymore

I just installed Arch (Arcolinux) and everything works fine except emacs which refuses indentation in Org mode files with the Alt-left-arrow (M-<left>)or the Alt-right-arrow (M-<right>) ...
  • 11
0 votes
1 answer
61 views

Advanced key reconfiguration under Linux

I'm transitioning to Emacs and trying to reconfigure the layout in a way that reduces the strain on my fingers. One thing I would like to have is the following behavior, which I was told is impossible ...
0 votes
1 answer
34 views

C-M-... bindings in emacs -nw [duplicate]

I have an issue when I run emacs with -nw: all my C-M- bindings stop working, as C (control) doesn't register, and only the M- binding is executed. E.g: (global-set-key (kbd "C-M-.") '...
0 votes
1 answer
114 views

How to visit an org-roam node from a link without using the mouse

This seems like a silly question, but how can I visit an org-roam node from a link without using the mouse? I have been looking all over the place and can't seem to find an answer. Some context: I'm ...
0 votes
1 answer
27 views

Call different functions based on buffer mode

I annotate my reading with org-remark and pdf-annot. They work with EPUBs and PDFs respectively, and are not interchangeable, with inconvenient consequences. What I would like to do is to bind a ...
  • 755
0 votes
1 answer
30 views

Problem with key bindings in Emacs in the terminal on WSL

The key binding problem happens only when using Emacs in WSL terminal. For example: I can not add priorities on headings with shift+arrow key I can not collapse all headings with shift+tab I have a ...
  • 35
0 votes
1 answer
21 views

How to unbind a key bound by org-mode-map? [duplicate]

I'd like to bind jump-to-register with C-', like this: (global-set-key (kbd "C-'") 'jump-to-register. However, C-' is already bound to org-cycle-agenda-files. I tried to unbind C-' with (...
2 votes
2 answers
27 views

Can I bind a key as buffer local but not in the active keymap?

So I'm writing some custom functions to help me editing some guitar chords using LaTeX's songs package. I find convenient to rebind isearch-exit, so that when I press RET, the cursor is left at the ...
2 votes
0 answers
40 views

How do I completely re-define the menubar in 28.2

I have been using XEmacs for years and have completely redefined the menubar for my productivity. I would like to replace XEmacs with Emacs 28.2. I have tried several ways to redefine some menubar ...
0 votes
1 answer
46 views

Stop later modes from clobbering a "global" keybinding

I use ace-window to change windows, with M-o as my key-binding. However, when I enter a window that is in HTML mode, this gets clobbered to "set face." I'm now stuck in this window, and can'...
1 vote
1 answer
68 views

How to change M-v to use cut-paste?

I am switching from Aquamacs to Emacs on OSX v28.2 and trying to setup my preferred key bindings. I set '(ns-alternate-modifier 'alt) '(ns-command-modifier 'meta) '(ns-control-modifier 'control) '(ns-...
  • 123
1 vote
1 answer
15 views

How to switch Ctrl-a and Home in Eshell?

I tried the following, but it does not work: (add-hook 'eshell-mode-hook (lambda () (local-set-key (kbd "C-a") #'move-beginning-of-line) (local-set-key (kbd ...
  • 1,266
0 votes
2 answers
46 views

Hyperbole mode overrides org mode C-c / binding

I'm trying to use Hyperbole mode while also using Org mode. Org mode has a C-c / binding which is what I wish to do, but Hyperbole mode wants to redefine it. From reading of the hyperbole mode code, ...
  • 319
1 vote
3 answers
80 views

Seamlessly replace a keyboard input key sequence

I need something like abbrev, just without any extra spaces, including spaces which trigger the replacement. I experimented with keyboard shortcuts, like this: ;;(general-auto-unbind-keys) (global-set-...
0 votes
1 answer
37 views

Rebind key to a different character in a specific mode?

I already tried some different ways of doing this, but never got it quite right, so I put it here. When working in buffers using some specific modes (lisp-mode, emacs-lisp-mode) I want to make it so a ...
  • 179
1 vote
1 answer
38 views

delete backwards until indentation

In my config I have (bind-keys* ("C-<backspace>" . (lambda () (interactive) (kill-line 0)))) which deletes the entire line backwards until column position 0. I would like to only ...
  • 543
0 votes
1 answer
20 views

ctrl + pgdn doesn't work with ssh

my .emacs.d/init.el has this : (global-set-key (kbd "C-<prior>") 'backward-page) (global-set-key (kbd "C-<next>") 'forward-page) It works fine on my machine but when ...
  • 207
1 vote
0 answers
26 views

What is Emacs <select> key?

I'm running Emacs 27.2 inside Ubuntu 16.04 in terminal mode inside a Bash version 4.3.48 shell. Normally the describe-key for the end keyboard key shows that it's <end>. However, when Emacs is ...
  • 724
1 vote
0 answers
26 views

Stop translating M- commands to lower case?

In order to for me to be able to use meta + shift + v as a keybinding, I have to tell emacs to pass (kbd "M-V") to global-set-key - if I try and use (kbd "M-S-v") then this ignored,...
0 votes
0 answers
34 views

Mapping Command key to Control key not working for mac

I am trying to map Command key to Control key, and Option key to Meta key in Emacs for mac. I installed using macports. I located the init file using describe-variable and user-init-file. I copied ...
0 votes
0 answers
29 views

`general-def` is not defined when used in `pre-` or `post-command-hook`

I have a function hooked to the pre- and post-command-hook, with the following code: (when (window-minibuffer-p) (when (featurep 'general) (if (or (derived-mode-p 'prog-mode) (...

1
2 3 4 5
27