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
2answers
24 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
0answers
21 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
11 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
15 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
34 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
29 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
41 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
14 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
37 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
21 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
34 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
13 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
23 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
44 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
34 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 ...
0
votes
2answers
66 views

How can I bind a command to the F1 key?

If I change: (define-key org-mode-map (kbd "C-c d") 'org-toggle-todo-and-fold) to eg: (define-key org-mode-map (kbd "F1") 'org-toggle-todo-and-fold) This doesn't work. Is there a ...
0
votes
1answer
40 views

Emacs ignore \n in buffer

I would like to change the default behavior in emacs when '\n' meta-characters are encountered by the cursor. The default behavior is such that at '\n', (1) right-key sends the cursor to the beginning ...
0
votes
0answers
43 views

Copy/Paste&Cut with Spacemacs on Terminal

I'm new with emacs, and I'm a developer that uses IDE to develop, and I want to learn emacs. I choose Spacemacs as customization because I think has a good keybinding for me, but now I miss a feature ...
1
vote
0answers
12 views

How to write an interactive function which repeats when the last key in the keybinding is repeatedly pressed? [duplicate]

I want to repeat a function when the last key in the key binding is repeatedly pressed. For example, say the keybinding is C-n for next-line, what I want to happen is that next-line is repeated when I ...
0
votes
1answer
33 views

Key binding of a function interferes with global key binding

The key binding \ of the function w3m-show-source interferes with the function with the same key binding hydra-master-body (which I set up in the init file). I have used the function global-set-key ...
0
votes
0answers
9 views

Flyspell overwrites C, C. ; modifying local-set-key after flyspell-mode-hook fails to change behavior

Flyspell sets the keys C-. and C-,. I prefer to have other binds living on these keys. I would have assumed locally setting keys in flyspell-mode-hook would have fixed this: (add-hook 'flyspell-...
0
votes
0answers
40 views

importmagic for python

I have the following in my .emacs.d/init.el, along the lines of what is suggested here: (require 'importmagic) (add-hook 'python-mode-hook 'importmagic-mode) (define-key importmagic-mode-map (kbd &...
0
votes
1answer
36 views

Emacs' C-tab seems without effect on my server through ssh

(Emacs 27.1) On my local machine <C-tab> is linked to other-window and works well: .emacs.d/init.el: (global-set-key (kbd "<C-tab>") 'other-window) When I install Emacs on a (...
0
votes
2answers
36 views

function that takes a command and a mode-map returning the bound string

Is there a command ie: get-bounded-string that is available that performs this? (defun no-op () nil) (define-key dired-mode-map (kbd "C-c C-7") 'no-op) then (get-bound-string dired-mode-...
0
votes
1answer
22 views

The `org-set-effort` fn has changed behavior on Emacs 28? How to select an effort by index typing 1, 2, 3 etc.? instead type the entire value?

I was using Emacs 26 and put this line on top of my org-mode file: #+PROPERTY: Effort_ALL 0:25 0:50 1:15 1:40 2:05 2:30 2:55 3:20 3:45 4:10 4:35 5:00 5:25 5:50 6:15 6:40 7:05 7:30 7:55 8:20 This ...
1
vote
1answer
49 views

Enable OS X keys in Emacs

I installed Emacs via homebrew using this Emacs bundle, https://github.com/railwaycat/homebrew-emacsmacport This bundle has some nice OS X features but it doesn't have the OS X keyboard shortcuts ...
1
vote
1answer
23 views

Switch desktops hotkey on Windows is not ignored by Emacs

The following keys: Ctrl-Win-Left Ctrl-Win-Right are used to switch desktops on Windows. If Emacs is the active window when you use either of these keys, you get the following in the minibuffer: If ...
2
votes
2answers
54 views

Is it possible to ignore paste operation during `C-x C-x` to jump back?

This question is related to Is it possible to bind C-u C-x C-xs behavior into C-x C-x. My main goal is to jump top of the file, type import and paste a package name and jump back where I was. ...
0
votes
1answer
55 views

Bind multiple keys to a command using `global-set-key` interactively

I want to bind multiple keys interactively to a single function using global-set-key. For example, let M-. g bind to project-find-file function. How to achieve this?
0
votes
0answers
9 views

Map maximizing window and frameset-to-register/restore frame configuration to C-x 1

Currently C-x 1 maximizes the current window. What I wish to have is to use C-x 1 to maximize the current window (if there are more open) AND store the current frameset to an arbitrary register (eg. ...
0
votes
2answers
84 views

Make Evil Mode “s” key behave like Vim

Doom Emacs' s key does not behave like Vim's implementation. In Vim, s deletes the character under the cursor and puts you into insert mode whereas Evil Mode performs a search, similar to f and t. Is ...
0
votes
1answer
62 views

How can we get input using emacs?

In order to compile my lua code i use this config (defun lua-main-compile () "use lua to compile my lua code" (interactive) (compile "lua main.lua")) In my lua code ...
0
votes
0answers
11 views

Can't run command using C-. keybinding with Evil

I'm trying to use racket-mode for programming Racket. One of the racket-mode commands is bound to C-c C-. (control c, control period). However, whenever I try to press C-c C-., it appears to get ...
0
votes
1answer
77 views

Leave evil's insert state with Control + c

I would like to be able to leave the insert state (I think that's what it's called in emacs?) using the Ctrl+c combination I know from vim. I'm using doom-emacs in case that's important, and I'm ...
1
vote
1answer
46 views

Understanding emacs keys

I'm vim user and I've just started using emacs with evil. But one thing I'm finding really hard to understand is when do we use <C-x>, <M-x> etc. I want to understand when to use Control ...
0
votes
1answer
23 views

I need a key binding of: “M-x compile” then in Compile commant type the “Compile command: love2d /home/huseyin/Documents/Programming/Lua/”

I need a key binding of: M-x compile then in compile command type like Compile command: love2d /home/huseyin/Documents/Programming/Lua/ I am tired of doing that again and again.
0
votes
0answers
37 views

How to set leader-key-like chord sequence in Evil mode?

I am using Spacemacs with evil mode and this works: (define-key evil-normal-state-map (kbd "m") 'set-input-method) However, I would like to use something like this: (define-key evil-normal-...
1
vote
1answer
57 views

Why do these two different use-package declarations (for the same package) have different effects?

What I want to accomplish is to add a keybinding C-<backspace> to the eshell-mod-map that calls func. That can be done like this, (use-package eshell :init (defun add-func-keybinding () (...
1
vote
1answer
71 views

How to bind a keybinding to add `\textit` or `textbf` for the word, where the cursor is pointing?

I am working on a LaTex file. Is it possible to bind a keybinding to add \textit or textbf for the word, where the cursor is pointing? For example, cursor is on top of word hello: hello converted ...
0
votes
1answer
39 views

How can I bind `C-c C-j` to always do `org-journal-new-entry`?

I did: (use-package org-journal :ensure t :defer t :config (setq org-journal-dir "~/org/journal/" org-journal-date-format "%A, %d %B %Y" org-journal-time-...
1
vote
1answer
170 views

Can I use Right Alt/Ctrl Keys as Alt/Super/Hyper modifier keys of Emacs in Windows 10?

I noticed that I've rarely used Right Control Key and Right Alt Key in my keyboard, so I'm wondering if I can use them as Alt/Super/Hyper modifier key in Emacs. Is such a thing possible in Windows 10? ...
0
votes
0answers
31 views

setting C-, and C-. key bindings

I am unable to set the C-, and C-. key bindings! I tried adding the following, (global-set-key (kbd "C-,") 'forward-char) (global-set-key (kbd "C-.") 'forward-char) In various ...
0
votes
1answer
50 views

Any way to remap the meta key with evil?

Function modifiers in Emacs conflicts with many hotkeys I have (for example, conflicts with i3wm). By using evil I could use evil to avoid most of conflict hotkeys. However, I do still need to use ...
3
votes
1answer
60 views

Can we do `C-c >` and `>` and `>` to continue indentation

I am using following answer to handle indentations Emacs bulk indent for Python C-c > or C-c C-l shifts the region 4 spaces to the right C-c < or C-c C-r shifts the region 4 spaces to the left ...
1
vote
1answer
27 views

Defining keyboard shortcuts from an argument in a function

I would like to write a command that defines key bindings for me, so that I can feed in key y (for example) and have it define key bindings for M-y, C-y etc. I'm trying to concat the command argument ...
0
votes
1answer
32 views

How can I stop iso-transl running

I have run the macport emacs 27 on macOS. The bindings of my keys as as per mac-keys-mode (and aquamacs) and have Command key acting as alt. Thus all my key bindings are A-key This normally works. ...
2
votes
1answer
71 views

Binding XF86Cut and XF86Copy to Emacs Commands

I have a keyboard with dedicated keys for XF86Cut, XF86Copy, XF86Paste. I want to bind these to Emacs commands. The goal is get the usual behavior for cut-and-paste between Emacs, my terminal, and my ...
0
votes
0answers
14 views

How to prevent M-TAB to print “;9~”

I have defined a key-binding for M-TAB , as follows: (global-set-key (kbd "M-TAB") 'suspend-frame) This works fine but once in a while it prints ;9~. I am not sure the main cause of this. ...

1
2 3 4 5
22