Skip to main content

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
1 answer
41 views

How to use IBM's CUA for mark copy delete paste in emacs

How do I configure emacs to use IBM CUA keys for mark copy delete and paste? IBM CUA keys use C-Ins and S-Ins for copy and paste. I find M-w and C-y difficult to use and would prefer to use what I'm ...
balanga's user avatar
  • 135
0 votes
1 answer
23 views

How to keybind an org-capture template with use-package?

Suppose I bound org-capture with C-c c and a tmp template with t: (setq org-capture-templates `( ("t" "tmp" entry (file ,(concat captures-path "tmp.org"))...
crocefisso's user avatar
  • 1,363
0 votes
0 answers
24 views

Avy keybindings

I would like to define keybindings for avy - more precisely, let's say I call one of the avy-goto-... functions, now these all expect a character. I would like to be able to have a keybinding (e.g M-' ...
guibor's user avatar
  • 123
1 vote
1 answer
18 views

How to bind a tag addition with a key?

I started using notmuch and I often use the trash tag to have emails sent to Maildir\mail-account-i\Trash through a script. When in search mode, I have to do +trash RET on a mail (or a set of mails) ...
crocefisso's user avatar
  • 1,363
0 votes
1 answer
20 views

Can packages rebind keys globally?

I observe a strange behavior in "my" emacs. For some reason the <next> (aka pgdn) key and the <prior> (aka pgup) key are bound to (pager-page-up) and (pager-page-down), ...
Christian Herenz's user avatar
1 vote
1 answer
57 views

Equivalent of describe-key for prefix keys?

describe-key works for complete keys. How can I instead describe a prefix key? For example, I'd like to be able to do something like this: M-x describe-prefix-key C-x And have it describe the keymap ...
JBentley's user avatar
  • 163
0 votes
1 answer
33 views

Can't bind key for Buffer List in evil mode

In buffer list/menu, the key "f" is supposed to open the buffer the cursor is on in the same window as the buffer list. That's what help on the mode says, anyway. In evil mode, this doesn'...
Mars's user avatar
  • 101
0 votes
0 answers
27 views

Rebinding y-n-a-q-?-queries

I'd like to remap the keys used in responses to y-n-a-q-? queries like Recursively delete folder? (y, n, a, q, ?). I know that one can remap y-or-n queries by modifying the query-replace-map and I've ...
Alexander Praehauser's user avatar
1 vote
1 answer
71 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. It installs emacs with window system in addition to the terminal one. I have the classic META key problem. ...
sçuçu's user avatar
  • 295
1 vote
1 answer
72 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
15 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
49 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
36 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
57 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
87 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
48 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
40 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
67 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
38 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
12 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
2 votes
1 answer
142 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
  • 213
0 votes
1 answer
37 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
26 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
30 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
54 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
65 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
126 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
  • 431
1 vote
1 answer
64 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
156 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
88 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
  • 325
0 votes
1 answer
45 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
48 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
81 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
35 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
51 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
44 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
102 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,890
2 votes
1 answer
89 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
  • 686
0 votes
1 answer
25 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,662
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
72 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
78 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
85 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
70 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
57 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
  • 831
0 votes
1 answer
71 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
58 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
188 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

1
2 3 4 5
29