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
18 views

Problem with Emacs 26 on Fluxbox Windowmanager

I have installed antiX Linux with fluxbox WM. Many of the keybindings seem to be disabled. Like M-; for commenting region, or M-F for regioning next word. Doing C-h k and M-; returns M-, runs the ...
1
vote
1answer
23 views

Change C-z from Minimise to Toggle Evil Mode

I am a fairly new emacs user and would appreciate any help you could offer. I have recently installed the evil mode package onto my emacs. The package itself works perfectly, however, the default ...
0
votes
0answers
18 views

compose key stopped working

im running emacs 26.1 on debian with xfce, and have no alternative input methods installed. my compose key recently stopped working in emacs. i get the dreaded <Multi_key> is undefined error. ...
1
vote
1answer
19 views

How may I completely disable all Emacs' default bindings to the Fn keys (F2 - F12)?

I'm willing to allow help to remain on F1, but I don't want any of Emacs default bindings on any of the other Fn keys. If you must know why, it's because all keyboards made in the last 20 years are ...
0
votes
1answer
17 views

Spacemacs - What does C-c do (what things are inside this menu)?

I'm learning emacs/spacemacs right now and I'm slightly confused about the C-c binding. Pressing it opens a menu with many helpful things that I cannot reach otherwise (it seems like it at least). I'...
0
votes
1answer
35 views

How could I assign keybinding for “<M-tab>”

I would like to use Meta + Tab or Meta + ; keybindings in emacs to correct a spelling instead of using the ispells default one. Please note that I am open emacs in terminal. I have tried following ...
5
votes
1answer
76 views

How to rebind “special meaning” of C-u to a different key?

Excerpt from GNU Emacs manual: C-u alone has the special meaning of “four times”: it multiplies the argument for the next command by four. C-u C-u multiplies it by sixteen. Thus, C-u C-u C-f moves ...
0
votes
1answer
41 views

How could I assign keybinding for `C-=`

In general I have keybindings as follows: (define-key isearch-mode-map (kbd "C-h") 'isearch-del-char) Now I want to generate a keybinding for C-= (Control plus equal sign, which is next to Backspace ...
1
vote
1answer
35 views

How to change keybinding for all similar functions across all modes?

Suppose I rebind C-e (move-end-of-line) to C-o in the global-map. How can I make C-o the corresponding function in all modes (if it exists). So, for example, in org-mode C-o should be org-end-of-...
0
votes
2answers
57 views

How to type a backslash in emacs “\”

I'm on Prelude, and there is no way I can type a \. I was thinking maybe I should create a keybinding but I don't know how to create it to output a character such as \. Any help welcome! Thank you!
0
votes
1answer
22 views

How to redefine key binding for “C-m” without clobbering <return>? [duplicate]

I am trying to remap "C-m" but it seems to prevent from working. It actually seems to make the same as "C-m". I have no idea why. I have tried this, which causes the problem: (bind-keys :map ...
1
vote
1answer
28 views

error Key sequence starts with non-prefix key

After trying to define a custom binding: (global-set-key (kbd "g l") 'evil-end-of-line) I get: (error Key sequence g h starts with non-prefix key g) because g is the start of navigation for many ...
1
vote
1answer
26 views

Set multiple keys at once with global-set-key?

Is it somehow possible to set multiple keys with global-set-key without having to repeat the statement, like setting multiple variables with setq?
0
votes
1answer
37 views

Finding org-mode bindings

I sometimes want to insert a new heading without first jumping to the end of the current tree. It was fairly simple to guess that this could be achieved by calling (org-insert-heading), but from C-h ...
0
votes
2answers
55 views

How to get to my day page with one key

To get to my day page (agenda), currently I have to type in the following keys C-c a (binded to (org-agenda)) a (Agenda for current week or day) d (to switch from week-view to day-view) C-c C-...
1
vote
1answer
25 views

Unmapping Treemacs `<prior>` and `<next>` (Page up and Page down)

I'm trying to unmap the <next> and <prior> key-bindings from Treemacs, because I find counterintuitive that it's the only place where they scroll a different window instead of the current ...
1
vote
1answer
32 views

Binding `S-mouse-1`

I'm trying to bind S-mouse-1 which doesn't seem to be as easy as I thought. So far I'm using: (define-derived-mode foobar-mode nil "foobar") (define-key foobar-mode-map [S-down-mouse-1] (lambda () ...
0
votes
0answers
26 views

Replace normal state keymap in Evil with another

I don't like Evil collections or the Evil keybindings in the dired-mode. I would like to re-map only few keys in the normal state like j, k, and a few more keys with g prefix and I would like to keep ...
0
votes
1answer
49 views

Mac `option` key works as `meta` key in terminal Emacs but does not work in GUI Emacs

I checked the option key as meta in terminal preference. Now the option key works as meta in terminal. Once I open Emacs through terminal option key doesn't work as meta anymore. If i type Option-v ...
2
votes
3answers
50 views

make local map bindings available through a global prefix

I am trying to set up something like Spacemacs, but fully under my control. I have already created a tree of my own keymaps with global commands, and it is available on M-SPC. But now I'd like to ...
2
votes
2answers
57 views

Zoom with mouse-button + scroll wheel?

I'd like to enable changing the font size by holding down the right mouse button and using the scroll-wheel. Emacs does however treat mouse buttons as keys, so this obviously cannot be achieved ...
0
votes
1answer
69 views

EMACS mode for Microsoft Word

Every time I move to a new Microsoft Word installation, I spend 10-20 minutes setting up all of the various keybindings. This time would probably be better spent creating a Microsoft-word plug-in that ...
0
votes
0answers
14 views

In spacemacs, how can I override a default prefix?

I am trying to redefine the C-c C-w shortcut which is the leader key for eyebrowse by default. How can I rebind it to org-refile? I have tried the following without success: (spacemacs/set-leader-...
1
vote
1answer
28 views

translating kp-NUM keys

I am migrating from GNU/Linux to Mac. I am using an MS Windows numeric keyboard (Logitech K200), and I cannot seem to map the keypad keys (kp-N) into anything (I had been doing that using global-set-...
0
votes
1answer
36 views

Org mode export dispatcher nil and key binding

I have two questions for exporting org file to PDF: I would like not to open Org Export Dispatcher when my org file export to pdf through LaTeX. I checked the manual, then I found the following: ...
3
votes
1answer
155 views

Is there a way to use CTRL and SUPER key modifiers together in a keybinding?

I would like to be able to use CTRL and SUPER key modifiers together in a keybinding. Since I'm on Mac OSX I use Command key for SUPER modifier. I tried this: (global-set-key (kbd "C-s-i") 'move-...
0
votes
3answers
131 views

How can I use Emacs and iTerm for the same keybinding?

In my .emacs file I have also set ctrl-o to delete a word: (defun backward-delete-word (arg) "Delete characters backward until encountering the beginning of a word. With argument ARG, do this that ...
2
votes
1answer
70 views

eval and quotes

I am trying to execute the code here, which I copy below (defun buffer-local-set-key (key func) (interactive "KSet key on this buffer: \naCommand: ") (let ((name (format "%s-magic" (...
0
votes
0answers
17 views

Copy/Paste in terminal with Evil mode is confusing

In GUI emacs if I have two lines: 1.test 2.test And I did yy on the first line. when moving to the second line and doing p, the end result is: 1.test 2.test 1.test However in terminal mode, ...
0
votes
0answers
30 views

add-hook for local-set-key in shell-mode not working

I have been using define-key global-map "\C-x\C-n" 'cmd-clear-and-rerun) for ~ 20 years where cmd-clear-and-rerun is a simple function I wrote long ago (see below). I only use C-xn in term-mode and/...
2
votes
1answer
69 views

Confirm command by pressing same key that invoked it

I have <f5> bound to projectile-run-project. When pressing <f5>, the minibuffer displays the command to run and you need to press RET to confirm it. How can I add the behavior that when &...
0
votes
1answer
31 views

Keybinding to issue another keybinding

Is there a way to configure emacs so that a keybinding will just issue another one? In particular, I want to configure it so that C-t replicates (or even better replaces) backspace. I couldn't find a ...
2
votes
1answer
118 views

“Backspace” key sometimes also deletes forward in python-mode

Start Edit 1 To answer questions. Emacs Versions: GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-09-22, modified by Debian GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-...
0
votes
0answers
36 views

Binding “<down-mouse-3> x” to a command (Mouse buttons as prefix or modifier keys)

On my laptop, mouse buttons are right under my thumb. I would like to use them as prefix or modifier keys. For example, holding mouse-3 and pressing x launches helm-M-x. I tried the followings, ...
0
votes
1answer
24 views

Customizing f6-key for fast “M-x imenu” + “Pr” + Enter

I wish to customize my f6key so it corresponds to a fast way of doing M-x imenu, then Pr RET. I've added the following to my ~/.emacs: (global-set-key [f6] 'imenu) Then I've tried to add different ...
0
votes
1answer
51 views

Using ctrl-n and ctrl-p inside the box for suggessted words to auto-complete

By default to move up (ctrl-p) and to move down (ctrl-n) key bindings are used. When I am using auto-complete mode, a box with suggested words is pop up. On there when I press ctrl-p or ctrl-n ...
3
votes
1answer
92 views

Bind keybord shortcuts to a MIDI keyboard?

I'm exploring the possibility of using a programmable keybord like this one: https://storefront.expertkeys.com/startseite/28-expertkeys-ek-20-usb-tastatur-0700587547911.html to expand and simplify ...
0
votes
1answer
102 views

Unbind key in org-mode (with evil-mode)

I cannot unbind the key M-l in org-mode. When the cursor is in an org-mode buffer, I tried to eval (M-:) (unbind-key "M-l" org-mode-map) ;; ^^^ from bind-key.el (define-key org-mode-map (kbd "M-l") ...
1
vote
1answer
52 views

What's the difference between ‘global-set-key “\M-…’ and ‘define-key esc-map ”…’?

Same for global-set-key "\C-x … and define-key ctl-x-map "…. I prefer (global-set-key (kbd "M-KEYS") #'COMMAND) because it's more readable, but I would like to know if the two kinds of binding -- ...
0
votes
1answer
60 views

Run current line or selection in shell then insert result in Emacs buffer (Acme workflow)

Given lines like these: pwd echo "Hello \ World" in a buffer, I would like to do the following: Put the cursor to the first line, then press C-` Select lines 3-4 then press C-` to send the line ...
0
votes
1answer
45 views

auctex and pdf-tools reverse search change keybinding

Inverse search from pdf-tools to auctex uses Ctrl-click on the pdf file to go to the corresponding part of latex file. Is it possible to also assign Alt-click to do inverse search? I am using ubuntu ...
0
votes
1answer
22 views

Getting a dialogue box of custom scripts

I have a bunch of scripts for managing files/directories that I use on a regular basis. Would it be possible to assign a key binding such that whenever I hit this key binding I get a dialogue box that ...
0
votes
0answers
35 views

Unbind SPC from org-agenda

I would like to unbind the space key in the org-agenda. Currently it is scrolling the org-mode file to the currently selected item in the org-agenda (org-agenda-show-and-scroll-up). I am currently ...
0
votes
0answers
17 views

Get time since last keystroke

I would like to know how many seconds have passed since the last keystroke (or character that showed up in the screen, whatever is easier). Is there a timer that is associated to self-insert-command? ...
0
votes
0answers
75 views

C-c c c to invoke org-capture

In my doom-emacs, "C- n n" will invoke org-capture, I want to change it to "C-c c c" as (global-set-key "\C-c c c" 'org-capture) However, it does not work as expected. How could set C-c c c to ...
0
votes
1answer
17 views

Remove image & link related keybindings in eww

I'm using xah-fly-keys which provides a few custom keys for easy navigation. u = backward-word o = forward-word i = previous-line ... Unfortunately, my keybindings are overshadowed when point is on ...
0
votes
0answers
29 views

How to create a prefix key for the hybrid state in spacemacs?

Prefix key can be created in Emacs as described here. The way to define a key for the hybrid state in spacemacs can also be found in the spacemacs document. However, I don't know how to define a ...
3
votes
2answers
60 views

How do I add a keybinding to use during an interactive isearch, `C-s …`

Can I assign a key binding starting with C-s such as: (global-set-key (kbd "C-s C-w") 'isearch-forward-symbol-at-point) but I want to keep (kbd "C-s") for i-search. I am having following error: ...
0
votes
2answers
101 views

How to Redefine Meta Key to Use Esc Key Only and Allow Using Alt Key for Another Purpose

I am using ubuntu 18.04. The Esc-v scrolls up by a page as expected (classical Emacs command with Esc being the meta key). But I want to use Alt-v as a "paste command". In other words: can I decouple ...
7
votes
1answer
1k views

What are these prefix commands that start with s-l?

I'm using lsp-mode, and I see these weird prefix commands that start with s-l. How do I type them? `lsp-mode' Minor Mode Bindings: key binding --- ------- s-l ...

1
2 3 4 5
20