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
0answers
22 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
32 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
25 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
1answer
28 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
31 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
15 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 &...
3
votes
1answer
29 views

Key map and vector key sequence

paredit.el has the following example code for setting a keybinding: https://github.com/emacsmirror/paredit/blob/8330a41e8188fe18d3fa805bb9aa529f015318e8/paredit.el#L54 (eval-after-load 'paredit ...
0
votes
0answers
16 views

How to use C-j C-k to move window in term mode using evil?

The bindings of C-j C-k to evil-window-down[up] work well every where apart form term mode. term mode rebinds these to C-w j C-w k - this is super annoying! How can i make term use the C-j/C-k ...
3
votes
1answer
28 views

Emacs doesn't show the keymap of a keybinding

I want to unbind the keybinding C-k, which runs the command org-up-element in org mode. To do it, I first need to find out which keymap this keybinding is bound to. So I run describe-key and press C-k,...
0
votes
1answer
48 views

What is Emacs' “Hyper?” key?

QMK defines Hyper as Ctrl+Shift+Alt+GUI. XFCE4 is treating my Left super as Hyper, which also happens to be the key that was configured as Hyper in xmodmap when the shortcut was defined. Emacs doesn't ...
0
votes
0answers
27 views

Ivy Mode Swiper key binding not working

I am learning my way around Emacs. I installed Ivy/Counsel recently. I am trying to use search with Swiper but cannot get the key binding to work. I can get it to work with M-x swiper. I am not sure ...
0
votes
0answers
26 views

Possible infinite recursion when copying keymap

When trying to open vterm, I get helm-M-x-execute-command: Possible infinite recursion when copying keymap. I am using Doom Emacs. config.el: https://paste.ofcode.org/Zypm6xQgbXneyJ7LnQvyPK +bindings....
0
votes
1answer
23 views

Where does my key bind so I can unbind it in major mode

I changed my key bindings with this lines in my .init.d: (global-set-key "\C-i" 'previous-line) It works normally, but when I change to markdown-mode, key rebinds to something else, how can ...
0
votes
0answers
13 views

Can quail accept keybinding as an input?

With a global keybinding it is possible to insert a text by running a keybinding as below ‌(global-set-key (kbd "S-SPC") "blablabla") Is it possible to do the same thing with ...
0
votes
1answer
64 views

Changing font color with Key bindings?

I've been using Emacs org-mode to primarily take lecture notes for university, and I find that it is remarkably useful and I can usually type everything up fairly quickly. Recently, I've been wanting ...
0
votes
0answers
31 views

How <dd> evil keymap works?

d seems to be bound to evil-delete which requires beg and end arguments. I suspect they are somehow obtained from d motion. Let's say I have defun my-delete-line (body). What should go in body to ...
1
vote
0answers
40 views

How to set major mode localleader keybinding to both `SPC m` and `comma` in Doom

I want to be able to use both SPC m and , as major mode localleader keybinding in Doom. With my current Doom setup, I can only use , as localleader key. SPC m is undefined currently.
1
vote
1answer
25 views

How to bind a key-chord to the `C-c` prefix?

I am using the package key-chord. This package allows me to hit x x quickly instead of hitting M-x: (key-chord-define-global "xx" 'execute-extended-command) And here is another way to to ...
0
votes
0answers
21 views

Create term horizontal split that is 20% size keybinding

I'd like a keybinding that can create a term buffer in a 25 percent split. What I mean by that is, with a specific keybinding like SPC t c, I'd like to open up a terminal in a split.
1
vote
1answer
56 views

binding <tab> to company complete

I would like to always trigger company suggests. When I use: (global-set-key (kbd "<tab>") 'company-complete)) It breaks ivy's completion in the minibuffer. How can I prevent this? I ...
0
votes
0answers
19 views

What is the keycoode of C-TAB?

iTerm does not send ctrl+tab itself, so I need to configure it myself. I can't figure it what key code ctrl+tab is though.
2
votes
1answer
19 views

key binding isearch-forward with Greek keyboard

I use Emacs with various languages and have had trouble invoking isearch-forward from a keystroke when my keyboard layout (OS-level) is set to Greek. If I try the usual C-s, it says there is no ...
0
votes
0answers
12 views

How can disable TAB to execute selected line in `counsel-M-x`?

I am using counsel-M-x, it has little bit different behavior than smex, where TAB may execute the line. Is it possible to use TAB only for toggling where I just want to disable feature to execute the ...
0
votes
0answers
37 views

How can I prevent `C-s` from invoking I-search while using Smex?

While using M-x ; by default C-s was binding to next line so I used to keep pressing C-s to toggle around. When I start using smex, C-s is now it is bound to I-search in some cases as follows: M-x ...
0
votes
0answers
19 views

mapping <up>, <down> to `comint-previous-input` and `comint-next-input`

I'd like to map <up> and <down> to comint-previous-input and comint-next-input respectively. I have done this successfully for shell: (eval-after-load "shell" '(define-key ...
0
votes
1answer
53 views

Emacs org mode shortcut to create code block

When using org mode, how can I map a specific keybinding (ex. C-c s) to create an org code snippet that looks like this: #+BEGIN_SRC python #+END_SRC
0
votes
0answers
55 views

How do I type … in the TUI?

When I call describe-key and enter … (Alt Gr + .), it says M-b runs the command backward-word […] and async-shell-command (bound to M-&) is called. I'm on Linux with Xorg, the terminal emulator is ...
0
votes
1answer
116 views

Standard Mac/Windows Keybindings for Italics, Bold, and Underline in Org-Mode

Is there a simple way to get command-i, command-b, and command-u to operate in emacs org-mode on Mac in exactly the way that they operate in a typical word processor on Mac (for example, Microsoft ...
0
votes
0answers
15 views

Hotkeys in popup menus?

I want to create a popup menu, like the ones created by mouse-buffer-menu, but I also want to bind hotkeys in that context (e.g. 1 to select the first entry). I want to specifically use the x-popup-...
0
votes
1answer
27 views

Define and load a local keymap without defining a minor mode

Can I define and load a local keymap without defining a minor mode? I need to define some keybinding in latex-mode and access/list them with (describe-variable 'mycustom-map) but I don't want to ...
2
votes
1answer
360 views

Keybindings For Doom Emacs

I am trying to start using Doom Emacs, but I find it increasingly difficult to find what the new keybindings are for certain tasks, like the ones for using Org Mode. When I use vanilla Emacs, there is ...
0
votes
0answers
125 views

Adding a custom keybinding in Doom Emacs

I am using evil-mode and am very new to emacs and doom. How would I be able to map Ctrl-s to :w or save. Also, how would I be able to bind Ctrl-n to neotree-toggle? I have been searching and trying ...
3
votes
1answer
47 views

Is there a command (and ideally a key binding) to navigate to the top (or bottom) of an org table?

I have read Built-in Table Editor, and searched apropos-function org table for top, bottom, beginning, and end. I found org-table-beginning-of-field, but not anything like org-table-beginning-of-table....
0
votes
2answers
31 views

Prevent `(keyboard-quit)` from closing `*compile*` windows

After a recent update to my Spacemacs install, I noticed that C-g i.e. keyboard-quit closes *compilation* buffers that result from an M-x recompile. How can I prevent this behavior? I don't want C-g ...
1
vote
1answer
50 views

How do I bind C-x p to the project.el project-prefix-map?

Following the advice of Mastering Emacs I'm trying to use the project.el package. My problem is that C-x p isn't bound to the prefix keymap and I can't figure out how to bind it correctly. I'm pretty ...
0
votes
1answer
36 views

Binding option + arrow keys/backspace on Mac OS while still being able to enter special characters

I want to be able to bind ⌥← to move the cursor to the previous word, ⌥→ to the next word, ⌥↓ to scroll down a page etc. in Emacs on Mac OS, as in native text editing controls, but also still be able ...
1
vote
1answer
17 views

How do I use global-unset-key for non ASCII characters?

I am using QWERTZ with Czech layout and to write certain characters like { and } I have to press down option, however in my emacs (using the emacsformacosx version) the option key is bound to the Meta ...
0
votes
1answer
57 views

How to start a process with multiple arguments?

Instead running sudo su joe -s prime-run firefox in the shell I'd rather bind it to a key. Yet, nothing happens on pressing M-n (while M-i works). What am I doing wrong? (setq exwm-input-global-keys ...
0
votes
1answer
47 views

Swap TAB and Escape in all modes including evil

Escape is too far away on modern keyboards and Tab could be easily typed as Ctrl+i in terminal applications. So I found it convenient to replace them in my alacritty terminal key bindings. I am used ...
0
votes
0answers
48 views

How to unbind the key for a specific map?

I use org, smartparens and use-package altogether. Sometimes I need to delete a heading and its subheadings. Without smartparens package I use the C-k key and it allows me to delete the heading itself ...
3
votes
0answers
17 views

Look up the key bound to a definition in a specific keymap, ignoring indirect bindings

How can I look up what key(s) are bound to a particular definition in a keymap? Basically the converse of lookup-key. where-is-internal is almost the answer I'm looking for, but it doesn't seem to ...
1
vote
1answer
47 views

How can I bind F12 in serial-term mode to minicom's F12?

When I use emacs serial-term mode Can I invoke F12 or other function keys as minicom's F12? I tried below... but it doesn't work (global-set-key [f12] nil) Thank you in advance!
0
votes
1answer
23 views

Meta key sending some commands two times over Citrix VDI

I am using Emacs 26.1 on a Windows machine that I connect to via Citrix Viewer running on MacOS 11.1. I'm using left-option as my meta key. When using org-mode, the meta key is behaving inconsistently....
1
vote
0answers
38 views

How to specify that a package uses my key bindings

For example, I use M-s as isearch-forward: (global-set-key (kbd "M-s") 'isearch-forward) When I try to install isearch+ with use-package: (use-package isearch+ :straight t) I get the ...
0
votes
0answers
16 views

Temporary input-decode-map while inputting key sequence

I want all sequences like C-c C-p to be translated to C-c p and even C-x C-k C-e should become C-x k e. This is easily done with e.g. (define-key input-decode-map (kbd "C-p") (kbd "p&...
0
votes
1answer
24 views

Bindings just for text buffers created by magit?

I'm trying to create a different keybinding to abort a commit in magit. Right now, when you're editing a commit message C-c C-k is bound to with-editor-cancel, which does the trick. But I'm an evil ...
0
votes
0answers
35 views

C-^ not registering

As the title suggests, I cannot enter C-^ in emacs. It doesn't work in org-mode nor does it register anything when I try to enter it into describe-key. If it helps at all I am on mac using emacs ...
0
votes
0answers
53 views

Can I combine key-chord-mode with evil-define-key?

I like to use evil-define-key like so: (evil-define-key 'normal projectile-mode-map (kbd "M-o") 'projectile-switch-to-buffer) This is great because I can make bindings for both an emacs ...
0
votes
0answers
46 views

Bind self-insert-command in sparse keymap

I have a sparse keymap with suppress-keymap set as a parent: (setq km (make-sparse-keymap)) (setq skm (make-keymap)) (suppress-keymap skm t) (set-keymap-parent km skm) (add-to-list 'emulation-mode-map-...
0
votes
1answer
17 views

gnud-dired-attach <return> based keybinding does not work

I am on gnu emacs 26.3 linux mint 20.1 and since my last OS update I cannot attach multiple files via dired using the key-binding C-c RET C-a. The message buffer indicates that C-c <return> C-a ...

1
2 3 4 5
23