Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [key-bindings]

Keyboard shortcuts, key chords, key sequences, hotkeys, or any association between key combinations and corresponding actions in Emacs.

0
votes
0answers
33 views

How to support marking EMMS playlist tracks like in Dired's [m] mark operation?

RT. I want to know does EMMS has built-in functions support this? If not, then how to implment it?
0
votes
1answer
109 views

Enter does nothing in NeoTree

I have NeoTree installed. When I navigate through folders and files in it and when I press enter, nothing happens. I don't get into a directory. I've tried TAB also -- nothing. M-x describe-key ...
1
vote
0answers
89 views

`<dead-grave> is undefined`

for a few month, I use Emacs for Latex, and I am French. today (for the first time) when I use C-c ` to see my errors, Emacs answers <dead-grave> is undefined I try to add in my .emacs (...
0
votes
0answers
57 views

define Shift and Space for save-buffer [duplicate]

for saving buffer I tried the following but neither worked (global-set-key (kbd "S SPC") 'save-buffer) (define-key global-map [(shift space)] 'save-buffer) The default works: Ctrl-x s but I need ...
2
votes
1answer
133 views

How do I create a fully customized keymap, so that I can use that instead of the default global one?

My .emacs file is over 1500 lines long mainly because of unbinding a ton of global keybinds. I've searched all over and could find no tutorials for making a fully customized keymap from scratch. I ...
0
votes
1answer
62 views

Why can't I bind tab to multiple spaces? [duplicate]

I'm trying to bind tab to either a tab or multiple spaces in Latex/ESS-noweb mode but I can't get it to work. I tried (local-set-key (kbd "<tab>") 'self-insert-command) which didn't work, and ...
1
vote
2answers
138 views

Making Keys Pass Completely Through Emacs

An Autohotkey remapping script I'm using uses the function keys F13-F24 to keep track of layers. This means that {F13 Down}, for example, may get sent as a virtual key code. This works fine for most ...
0
votes
0answers
28 views

Mode dependant key binding

I wrote an elisp function which I would like to bind to the key "C" but only in dired-mode; otherwise it should be the capital letter C. However I am not very familiar with elisp and I did not manage ...
14
votes
3answers
4k views

What is the longest known key sequence in Emacs?

Qt supports Emacs-style keybindings, however for only up to four keys. To make a point why this limit should be increased it would be useful to show examples of Emacs-style keybindings with even more ...
1
vote
1answer
96 views

Jump to where a keybinding is defined?

It is possible to jump to the function that a keybinding is mapped to (via describe-key). Is it possible to jump to where the keybinding itself is defined? Example (define-key my-mode-map "a" 'my-...
1
vote
1answer
160 views

Bindings for source code when debugging in gdb/gud

We can define a bunch of bindings for gud-mode through gud-mode-map. But it seems these bindings only hold when the active window is one of the dedicated gdb windows (or simply the comint window if ...
4
votes
1answer
239 views

Which is a faster argument to pass: kbd, string, or vector?

When specifying a key sequence you have the option of using a kbd, string, or vector. Which one of these is faster? More efficient? Optimal in particular situations? Any trade-offs? Please list your ...
3
votes
1answer
248 views

evil (vi) keybindings for customize-mode

A recent convert to Spacemacs and I'm having trouble trying to change the keybindings in customize mode. From a customize buffer I can change the state with M-m SPC evil-evilified-state and then it ...
4
votes
0answers
122 views

How to make Emacs not intercept Command-Ctrl-Space, used for Special Characters on macOS?

On macOS the CommandCtrlSpace shortcut opens an Emoji picker which can be expanded into a Special Characters picker. But when I type this shortcut on Emacs in order to input a character, instead of ...
3
votes
2answers
457 views

How to create Spacemacs keybinding starting with “SPC”?

I'm trying to add a keybinding by doing the following: (global-set-key (kbd "SPC-;") 'spacemacs/default-pop-shell) but it gets interpreted as the separate keys S, P, etc and produces the error: ...
0
votes
1answer
165 views

Emacs shortcuts in Mac are worse than in Ubuntu?

I just moved from Ubuntu to Mac. Maybe I'm wrong but I found the shortcuts in Mac Emacs is harder to use than in ubuntu. Such as I have to frequently use the "Arrow" in Mac to select texts while in ...
3
votes
1answer
46 views

How to “swap” only the numerical row of a keyboard inside Emacs?

My question is: when I am editing (La)TeX code, regularly I need to type the famous dollar signs in order to put mathematical code ($x^2+y^2=z^2$), a very frequent thing indeed. Therefore, I would ...
0
votes
0answers
41 views

Can't customize xah-fly-keys

I've read the documentation about customizing but I think my knowledge of Lisp is limiting things a bit. I want to bind a in command mode to move-beginning-of-line and QWERTY q (Dvorak) to move-end-of-...
2
votes
0answers
142 views

Interactive lambda functions

How do I create interactive lambda functions? (use-package general :ensure t :config (general-evil-setup t) ;;(setq general-default-keymaps 'evil-normal-state-map) (general-define-key :...
1
vote
1answer
89 views

What does emacs want for non-ASCII keys

Under Debian-Jessie, Emacs recognizes qualified special keys, e.g. C-<home>, in an X terminal (e.g. mate-terminal) but in TTY it does not. I have corrected this by making a replacement keymap, ...
4
votes
1answer
61 views

What's the difference between C-u C-u C-u <Command> and C-u 64 <Command>?

In org-mode, C-u C-u C-u Tab expands all trees. When I wanted to check what it's bound to, I wasn't able to do that using C-h k as it quickly told me what C-u is bound to. From experiments, I know ...
2
votes
1answer
173 views

Customize Xah Fly Keys

I am using Xah Fly Keys. How should I change the function one of Xah Fly Keys key bindings calls? For example when in Xah Fly Keys command mode space c . calls the find-file function but I would ...
2
votes
1answer
48 views

Define widget key bindings

The following code: defines a major mode my-mode where C-d binding is redefined; opens a my-mode buffer inserting an editable-field widget. (require 'widget) (require 'wid-edit) ;; Define ...
1
vote
1answer
31 views

Why do I have to double-press alt/option to get a meta key?

I'm using Aquamacs 3.3 GNU Emacs 25.1.1 under MacOSX 10.12.6 (Sierra). It's a fresh install of the operating system and aquamacs. Instead of just doing option-g to get meta-g like I used to, I now ...
1
vote
1answer
76 views

Matching key-bindings between modes

I'm new to emacs, and I'm trying to set it up as my editor for both python and R. Elpy and Ess are both great, and I'm relying on them a lot. However, I'm used to the Ess key-bindings, and would like ...
2
votes
1answer
139 views

rebind C-RET in cua-mode to a different key?

I use column editing in cua-mode (cua-selection-mode) a lot. A main issue I have is that the most frequently used keybinding, C-RET (Control + Return), doesn't work in most terminals (Ubuntu 16.04, ...
0
votes
0answers
31 views

Simple and quick keybinds that are easy on the hands

I'm currently starting with emacs and trying to make my config fit my use case. It so happens that I despise the standard keybinds and want to replace them. However, defining every single keybind ...
0
votes
2answers
92 views

Emacs Prelude key binding for bury-buffer

Does Emacs Prelude provide a key binding for bury-buffer, which I use very frequently?
0
votes
3answers
95 views

Dired+ key binding issues in terminal emacs

Using the Dired+ library, and running Emacs in a terminal, all arrow keys in dired buffers invoke M-O (which is bound to diredp-chown-this-file) instead of correct <left> <right> <up&...
3
votes
1answer
173 views

Priority of keymapping commands

In another question (IDO rebind C-j to C-<RET>), Seraph asked about defining the <C-return> key for ido-mode. It turned out that the key was already bound in cua-global-keymap, which ...
2
votes
1answer
159 views

Key binding to a sequence of commands

I'm trying to define a key binding that executes a sequence of commands. I add this code to my ~/.emacs file (require 'origami) (defun open-close-node () "Open/Close node origami mode" (...
0
votes
1answer
114 views

Custom keybinding for jumping down 2 lines on spacemacs (evil-mode)

What I want is to have the option to scroll faster. Currently when in evil-mode normal state when I press j evil-next-visual-line is called. If I hold jthen the cursor moves down. What I want is ...
1
vote
2answers
95 views

IDO rebind C-j to C-<RET>

How to set it? I tried (add-hook 'ido-setup-hook (lambda () (local-set-key (kbd "C-<RET>") 'ido-select-text))) and (define-key ido-common-completion-map (kbd "C-<...
1
vote
1answer
29 views

next-line-add-newlines breaks history browsing by cursor arrow keys

I've always hated "end of buffer" errors, so my .emacs contains (setq next-line-add-newlines t) Recently, I've noticed that when browsing a history by cursor arrows (up/down for previous/next), e.g. ...
0
votes
1answer
170 views

Overriding a magit Keybinding using evil-mode and bind-map

I am using evil-mode, magit, evil-magit, and bind-map. I have defined a map with bind-map using SPC as my :evil-keys similarly to what spacemacs provides. Magit defines SPC as magit-diff-show-or-...
1
vote
1answer
51 views

Emacs triple click handler

What handler is called when I make triple click ? For me, it select whole line. I want this behavior to be binded to C-l, how to do it ? EDIT: I tried to bind this to key, but not works, how to fix ...
0
votes
1answer
54 views

Ignored keybinding

I have a problem with following key binding: (global-set-key (kbd "C-/") 'comment-or-uncomment-region) Actually, it is ignored by Emacs so undo is executed instead. I'm running Emacs in gui mode.
0
votes
1answer
234 views

How to remap shift-arrow in term-mode?

Is there a way to map Shift-left or other arrow keys to custom functions in term-char-mode? I tried, but without luck: (define-key term-mode-map [s-left] 'sandric/term-switch-line-mode) Entering ...
0
votes
2answers
59 views

Unable to supply macro name to edit-kbd-macro when M-x is bound to smex

When I M-x edit-kbd-macro, it prompts saying: Keyboard macro to edit (C-x e, M-x, C-h l, or keys): Here, I would hit M-x. It will then allow me to enter the name of the macro. I have several named ...
-1
votes
1answer
88 views

how bind `C-c g g` to `vc-git-grep`

How can I bind C-c g g to vc-git-grep ? So far I tried ;; in scratch buffer (global-set-key (kbd "C-c g g") 'vc-git-grep) ;; then M-x eval-region ;; then switch to another buffer ;; C-c g g
1
vote
1answer
107 views

key binding to invoke more than two commands

I'm in org-mode and would like to have C-c C-c ' run org-edit-special then mark-whole-buffer then indent-region then org-edit-special to get back out again. I've tried (defun my-run-org-babel-...
2
votes
2answers
68 views

Keybinding in Julia minor mode

I am unable to change keybinding in a minor mode. Initiaton of minor mode: (add-hook 'julia-mode-hook 'julia-repl-mode) I tried a view variatons for the keybinding: (add-hook 'julia-repl-mode ...
1
vote
0answers
77 views

how can i thoroughly change (key “C-x”) in ivy-minibuffer-map?

one thing very interesting, i tried to (define-key ivy-minibuffer-map (kbd "C-x") 'ivy-kill-line) ..well then i restart my emacs, the first time i use the ivy to complete something, i type C-x ...
0
votes
0answers
98 views

Compose key in emacs on macOS

I've been attempting to get a compose key working in Emacs on a Mac (Sierra). I've set up a ~/Library/KeyBindings/DefaultKeyBindings.dict that works elsewhere on the system (e.g. Chrome), using F13 as ...
0
votes
1answer
118 views

All arrow keys in dired+ buffer mapped to M-O

For some reason when I press Up, Down, Left or Right keys on keyboard in dired+ mode, emacs reads them all as M-O key, which I found out by describe-key command in dired+ buffer. I have no config ...
0
votes
0answers
17 views

C-d in java-mode not being overwritten by .emacs file

So I have a custom .emacs file that I have a series of key strokes bound to. The specific key stroke that I'm speaking of is C-d which I have bound to left-word via the line (global-set-key (kbd "C-d"...
2
votes
1answer
71 views

keybinding to switch to specific application

I'm running Emacs in a GUI, and I like having a keybinding that quickly switches me to a terminal. Yes, I know there's eshell, term, and shell in Emacs, but I still prefer a dedicated terminal ...
0
votes
1answer
34 views

Binding key to save in specific directory?

I want to bind a key to save a timestamped backup of the current buffer to a specific directory. For example C-§ will save my current buffer to ~/Org/Backups/2017-01-01-foo.org. Unfortunately every ...
1
vote
1answer
85 views

How to group key bindings in which-key?

I have binded Winum functions to SPC 0 - SPC 9. In which-key minibuffer I see each key by its own (10 labels), which occupies a lot of space. It would be great if I could group all winum keys labels ...
1
vote
1answer
37 views

`which-key` or similar, to show doc strings of commands bound to keys?

which-key package is very useful to show the list of command names. Could it (or any other package) also show the doc string of those commands?