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
1 vote
1 answer
39 views

Setting a META key for Emacs in Terminal on MacOS while still able to access special characters

I am using Emacs version 29.3 on macOS 14.4.1. I have installed it with home-brew from casks. I have the classic META key problem. I need to have a META without using ESC. Since I am not used to ...
sçuçu's user avatar
  • 295
1 vote
1 answer
58 views

Is it okay to rebind C-i and C-m?

I came across this snippet which stops emacs from converting C-i and C-m into <tab> and <ret> respectively: (dolist (k '("C-i" "C-m")) (define-key input-decode-map (...
temp10april0412's user avatar
0 votes
1 answer
16 views

How to investigate the overriding of a keymap?

In the magit commit message buffer, I once was able to get the previous commit message using M-p in evil edit mode. Exactly how it's expected. Now I'm required to enter into evil insert mode hitting i ...
jjk's user avatar
  • 744
0 votes
0 answers
10 views

How to bind common Info-mode navigation to single keys in spacemacs?

I wish that more keys were bound in Info mode in spacemacs. For example: Info-next doesn't seem to be bound (n instead is evil-ex-search-next, which I never use) Following a reference requires two ...
Croad Langshan's user avatar
0 votes
1 answer
45 views

Is there a keybind prefix that is reserved for personal use?

I always was apprehensive about defining custom keybindings because it's so easy to run into conflicts. And lo, when I finally bound org-agenda because it's just too useful not to have it bound, I run ...
Reverent Lapwing's user avatar
0 votes
1 answer
33 views

Is there a way the CAPS LOCK key can perform its normal text function of toggling uppercase letters off and on for fiction writing in EMACS?

I'm a new Emacs user and New to LINUX. I only use EMACS for screenwriting using fountain mode. As such, the CAPS LOCK key is a hugely-used key in screenwriting. From some googling, I see EMACS uses ...
Captain Create's user avatar
0 votes
1 answer
38 views

Opening file in emacs using a shortcut

So, I was wondering if I can somehow(with a keyboard shortcut) open a file using the default system dialog, the same way that the big open button does at the top of the window. I didn't find a way to ...
Stigl's user avatar
  • 3
0 votes
2 answers
43 views

What to do when a major mode overides keybindings set in doom emacs?

[Edit: I should specify that there are many keybindings in the major mode that overide the desired keybinding. They all start with a whereas I would like a to do something else. I already thought ...
userrandrand's user avatar
0 votes
0 answers
45 views

How to find out which key Meta is bound to in a Windows virtual desktop accessed from a Mac?

I am trying to configure GNU Emacs 26.3 which runs in the following setup: There is the Macbook. From this Macbook I connect to a virtual desktop which runs under Windows 10. Emacs runs inside this ...
PravlesRedneckoff's user avatar
0 votes
2 answers
38 views

Bind M-x and ESC-x to separate functions

Is it possible to bind left Alt-x (currently evaluates as M-x) and escape key-x to separate functions?
mankoff's user avatar
  • 4,226
0 votes
0 answers
45 views

How to make all key combinations insert themselves into vterm?

I'd like to create a keymap vterm-insert-map for vterm that self-inserts all or at least all currently bound key combinations, except for one, which acts as an escape key. I can use set-transient-map ...
Alexander Praehauser's user avatar
0 votes
1 answer
32 views

C-c c does not activate Org Capture after upgrading to Emacs 29.2

After upgrading to Emacs 29.2 I can't activate Org capture using 'C-c c'. In the mini buffer it says 'C-c c is undefined' I can activate Org capture using 'M-x org-capture', but I preffer the 'C-c c' ...
lloowen's user avatar
0 votes
0 answers
10 views

bindings set by general-define-key only work after entering insert-state

;; emacs -Q (emacs version 29.1, emacs-mac) (package-initialize) (unless package-archive-contents (package-refresh-contents)) (package-install-selected-packages) (setq use-package-always-ensure t) (...
user615536's user avatar
1 vote
1 answer
119 views

`Shift + ESC` in key binding

I would like to bind #'window-toggle-side-windows to the key combination shift and escape. That is hammered into my muscle memory by decades of using Intellij. The obvious (global-set-key "s-ESC&...
jmg's user avatar
  • 203
0 votes
1 answer
35 views

Calling the command associated to a keybind in another command

I'd like to use avy by writing a command that does the following: first, it should ask for a key combination. Then it should call interactively, say, avy-goto-line to select a position, where it sets ...
Alexander Praehauser's user avatar
0 votes
0 answers
25 views

Ivy tool tips and ctrl-d brining up unwanted documentation

Using emacs 30, I have an issue where when an ivy tooltip pops up, pressing ctrl-d causes documentation to show up instead of the expected deleting of a character. I've not been able to determine how ...
Silfheed's user avatar
  • 203
0 votes
0 answers
29 views

Problem with undo-tree-visualizer keybindings

What I want I use general, use-package and evil. I want to use evil keybindings in undo-tree-visualizer-mode to jump between nodes and branches using "j", "k", "h", "...
c3f0's user avatar
  • 1
0 votes
1 answer
50 views

modify some binds in a package's hydra

I use a package that comes with a handy hydra (and install it with use-package at the moment), but i want to change only some of the keys from that hydra. the hydra looks like : (defhydra indent-tools-...
John Doe's user avatar
  • 169
0 votes
1 answer
63 views

Remap [C-]n/p keys in all modes

I am trying to rebalance/distribute the workload from my index and pinky to other fingers but I keep finding modes/contexts in which I still need to use n/p or their modified version C-n/p in order to ...
pgpb.padilla's user avatar
0 votes
0 answers
82 views

eglot mode map keybindings not showing

I'm trying to setup bindings for eglot to show when eglot-mode-map is activated, but the keys never seem to be available after the lsp attaches. im defining my leader key using general: (general-...
Simon's user avatar
  • 421
1 vote
1 answer
57 views

How to unbind all keybindings that start by a specific prefix?

I want to fully define my own C-c keymap, but some modes add default keybindings under that prefix. For example, I have C-c C-c for rustic-mode bindings and C-c & for yasnippet bindings. How can I ...
Haf's user avatar
  • 115
0 votes
2 answers
43 views

Is it reasonable for a mode-writer to bind keys relative to other keymaps?

Suppose, that I am writing an Emacs mode for some language. I am creating a corresponding keymap to bind various keys. I want to provide some kind of help/documentation function. I can bind it (within ...
Artem Yu's user avatar
  • 185
4 votes
1 answer
112 views

How do I learn which key prefix a keymap is bound to?

Suppose, I have some keymap bound to a key prefix, e.g. help-map bound to C-h. However, suppose also that I don't know what the prefix is. It might be C-h, it might be C-x h, it might be just C-? or ...
Artem Yu's user avatar
  • 185
1 vote
2 answers
85 views

How to solve alt-tab keybinding clash between flyspell and global keymap/org-mode?

This is about GNU Emacs 29.1 (build 8, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0): The keybinding C-M-i, equivalent to <escape><tab> or to M-Tab (the latter often ...
pglpm's user avatar
  • 301
0 votes
1 answer
40 views

Using both `event-apply-meta-modifier` and `event-apply-super-modifier` for the same shortcut

I use the commands event-apply-meta-modifier and event-apply-super-modifier to have keys I can tap that apply the meta and super modifier to the next typed shortcut. But when I first apply the meta ...
Alexander Praehauser's user avatar
0 votes
2 answers
45 views

general.el definer send universal-argument

Given a definer, for example: (general-create-definer test-def :states '(normal insert motion emacs) :keymaps 'override :prefix "SPC") (test-def "" nil "f"...
user615536's user avatar
0 votes
0 answers
59 views

How to bind the Super key in Emacs (non Windows)

Running xev | awk -F'[ )]+' '/^KeyPress/ { a[NR+2] } NR in a { printf "%-3s %s\n", $5, $8 }' results in 133 Super_L when pressing my Windows key (there is only one). How do I make use of ...
balanga's user avatar
  • 135
0 votes
0 answers
34 views

How can I bind a prefix key to escape term-line-mode?

I've figured out how to get out of char mode, but not the other way around;) #+begin_src elisp (with-eval-after-load 'term ;Terminal Orientation ;(define-key term-raw-map (kbd "C-M-e o l"...
Jason Hunter's user avatar
0 votes
0 answers
46 views

How to bind Windows key in Emacs on FreeBSD

How do I bind the Windows key to a function in Emacs 29.1 on FreeBSD
balanga's user avatar
  • 135
0 votes
0 answers
43 views

Minibuffer and ido keybindings with ergoemacs-mode

I'm struggling to get the same hotkeys in the latest ergoemacs-mode (as they were in ergoemacs 5.3.7): In the M-x (execute-extended-command) command prompt I want M-i to act as previous-line-or-...
Max Arnold's user avatar
0 votes
1 answer
85 views

How add Evil keybindings to Magit, without removing all Magit prefix-keys

In magit status of a Git repository, you usually press f u to fetch from upstream (these keybindings in Magit will call magit-fetch-from-upstream). With Magit keybindings I have noticed the letters ...
ReneFroger's user avatar
  • 3,880
2 votes
1 answer
76 views

Configuring Key-bindings from Org-Table

I use init.org file to configure my emacs, and then tangle it into init.el. Now, I would like to configure my keybindings from org-table (for more readable and printable). Basically, I'd like to only ...
Garid's user avatar
  • 641
0 votes
1 answer
24 views

query-replace, add a "skip to next" in lambda function

I have this function: (defun fix-mult-punct-before-footnote () "Scope: FOOTNOTE Description: Fixes repeated/multiple punctuation before the \\footnote macro." (interactive) ;; "..\...
Gabriele's user avatar
  • 1,564
0 votes
1 answer
32 views

Safe way to rebind a key for only the duration of a function

I am working on some code that does keyboard macros and minibuffer recursive edits. As a result, sometimes you need to exit a macro's recursive edit before the minibuffer. This can be confusing for ...
Surgo's user avatar
  • 3
0 votes
1 answer
70 views

How do I assign Ctrl-C Ctrl-D to menu Python/Debugger in my ~/.emacs file?

With a .py file open in my buffer, and the major mode being Python, there is a menu called Python. There is a item in it called Debugger. It has no associated keyboard shortcut. What is the lisp ...
MMM's user avatar
  • 115
0 votes
2 answers
64 views

Emacs calling unbound key sequence `C-c @` a "non-prefix key" [closed]

Emacs won't let me bind C-c @ TAB to outline-cycle in outline-minor-mode. It complains "Lisp error: (error "Key sequence C-c @ TAB starts with non-prefix key C-c @") -- but C-c @ is ...
Jeffrey Benjamin Brown's user avatar
0 votes
1 answer
82 views

Why doesn't my key binding work?

I tried adding this code to interactively clear the echo area (or mini-buffer not sure??) during Vertico's find-file. (defun my-kill-line () "Remove text from the echo area by killing backwards&...
Mikef's user avatar
  • 175
1 vote
0 answers
69 views

Why can't I ignore the right Meta key in Emacs 29.1 on MacOS?

I'm using GNU Emacs for MacOSX 29.1 under macOS Ventura, & I need to enter accented letters (é, à, &c.). Following the manual, wiki, & several articles, I used (setq ns-alternate-modifier '...
CoffeedAlice's user avatar
0 votes
1 answer
54 views

How can an interactive function detect that it is invoked via an hydra?

Assume there's an interactive function foo. Assume it is bound in various keymaps and is also bound inside an hydra as a simple key, let's say "a". How can foo's code detect that it was ...
PRouleau's user avatar
  • 796
0 votes
1 answer
69 views

Why does Emacs when started with 'no window' delete a character when I press C-h?

I've recently started to see the following behavior: when I run Emacs via emacs -nw -Q, and hit C-h, it runs BACKSPACE, deleting the characters. But if I run the same Emacs version in GUI mode, that ...
Emre Sevinç's user avatar
0 votes
0 answers
57 views

Rebinding navigation keys when using isearch

I've rebound most of my navigation keys using bind-keys* and am trying to create a uniform layout. But I have the problem that when I trigger isearch, point is not actually placed in the minibuffer ...
Alexander Praehauser's user avatar
3 votes
3 answers
178 views

Binding a key in another package's yet undefined map in use-package?

I'm using use-package for my configuration in init.el. How can I bind a key to a map that has not yet been defined? As a specific example, I'm using the following configuration of (use-package latex-...
Henry DeYoung's user avatar
0 votes
0 answers
47 views

Key sequences that are translated to ESC

I understand from the FAQ that Escape is supposed to be the same as C-[: https://www.gnu.org/software/emacs/manual/html_node/efaq/Basic-keys.html However, I could rebind C-[ without any problems ...
Alexander Praehauser's user avatar
2 votes
2 answers
107 views

Rebinding RET without rebinding <kp-enter>

My Emacs translates C-m as RET like here: https://stackoverflow.com/questions/7235381/unbind-c-m-from-ret. I'd like to use C-m though, and I have a multilevel keyboard-layout in which <kp-enter> ...
Alexander Praehauser's user avatar
0 votes
1 answer
55 views

Changing key binding definitions

I read somewhere that emacs v29.1 has changed the way that you can define key bindings... ie previously you would write:- (global-set-key (kbd "<f2>") 'save-buffer) now you can write:-...
balanga's user avatar
  • 135
1 vote
2 answers
77 views

How to create a general and specific key binding

How do I bind a key for general use, but differently for a specific mode, such as dired? eg how would I resolve this? (define-key dired-mode-map (kbd F12) #'dired-up-directory) (global-set-key (kbd ...
balanga's user avatar
  • 135
0 votes
2 answers
56 views

Using TAB to flip between two windows

I have set TAB to flip between two windows using:- (global-set-key (kbd "TAB") 'other-window) This works sometimes, but not always. How should I define it?
balanga's user avatar
  • 135
0 votes
1 answer
51 views

Bind LEFT to goto parent directory in dired mode

How do I bind the LEFT key to go to parent directory in dired mode? I tried (define-key dired-mode-map (kbd "<left>") #'dired-up-directory) but that didn't work.
balanga's user avatar
  • 135
1 vote
1 answer
167 views

Why does BACKSPACE generate C-h?

When running emacs (v29.1) -nw on a ThinkPad X61 under FreeBSD 13.2, pressing Backspace generates C-h. The key is not bound to anything. Running C-h k BACKSPACE does not show DEL but C-h-h. Entering ...
balanga's user avatar
  • 135
0 votes
2 answers
57 views

AucTeX: Keybinding for compiling document

Is there a command, for which I can set a keybind for compiling the document? The command (TeX-command-master, bound to C-c C-c) gives you a list of options but it's rather inefficient. I'm looking ...
AmberWing's user avatar

1
2 3 4 5
29