Stack Exchange Network

Stack Exchange network consists of 175 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.

2
votes
2answers
117 views

How to modify bindings to match ECB window numbers?

ECB windows display their number: W-0, W-1, etc. Is there a way to define bindings so that I can get to these windows using bindings such as C-c . w 0, C-c . w 1, rather than using C-c . g d to go ...
5
votes
1answer
443 views

What does “less-than” key “greater-than” mean in terms of keybindings?

I'm trying to define a prefix keymap for a minor mode, but I'm getting a result I've not seen yet: `link-grammar-mode' Minor Mode Bindings: key binding --- ------- <C-.>...
28
votes
3answers
5k views

Problems with keybindings when using terminal

I have the following line in init.el: (global-set-key [(control \;)] 'comment-region) It works very well in GUI window, but if emacs is invoked with the -nw option then C-; doesn't comment region, ...
13
votes
4answers
406 views

Differences between setting major mode keys with a hook versus adding them to the mode map

Assume that I have downloaded a major mode called magical-mode, and it has its own magical keymap called magical-mode-map. This mode also provides a hook magical-mode-hook which is run each time ...
16
votes
2answers
4k views

Shift+Up isn't recognized by Emacs in a terminal

Very often I use Shift+Up/Down to select a region in Emacs. It works fine in GUI mode, but when emacs is invoked with -nw option I can select lines only with Shift+Down. The Shift+Up doesn't work, I ...
7
votes
1answer
662 views

Simulating mouse operations with keyboard

Is there a way, via some command that can be invoked by the keyboard, of making Emacs think that I clicked at a particular point (so that it does whatever it would have done if I clicked there, e.g. ...
28
votes
4answers
4k views

Show unbound keys

I want to define some key bindings for my new found usage of helm, amazing mode btw, and I want to do it without overwriting the usage of other keys. I realize that the number of different key ...
4
votes
2answers
112 views

Trigger a function when a key is held down after X seconds?

I have highlight-symbol enabled with the delay set to 0. It's great, but unfortunately when I navigate by holding down j or k (evil-mode), the feedback is not great. So I was wondering if it's ...
5
votes
1answer
126 views

Why does local-key-binding return a 1 for a key with no local binding

When I evaluate (local-key-binding key) for any arbitrary key that does not have a local binding, I expect a return value of nil, but I almost always get a 1. If the key actually does have a local ...
5
votes
2answers
239 views

Detect when a key is rebound to another command

First, some context: I am in the process of debugging a strange interaction between smartparens and Org Speed Keys: After editing an .org file for a while, specific speed keys for navigating the ...
26
votes
6answers
10k views

How do I list all key-bindings available in a given buffer?

I am trying out a new major mode, how can I take advantage of Emacs' documentation system to get a listing of key bindings available in that specific buffer?
58
votes
17answers
28k views

How do I switch buffers quickly?

In vanilla Emacs, I have to do C-x b and then manually type out the buffer name to switch. If I forget the name of the buffer, I have to hit TAB to list possible completions. Is there anything I can ...
59
votes
4answers
6k views

How can I find out in which keymap a key is bound?

I have rebound a the 'd' key in gnus-article-mode, but its old behavior is still active when the point is on an attachment. I can see that the rebinding did not take effect there by doing C-h k d, but ...
5
votes
1answer
210 views

Inadvertent paste when correcting spelling mistakes using flyspell

When I click with the middle mouse button that usually inserts the primary selection at the point where I clicked. However, the same button opens flyspell's context menu when I click on a misspelled ...
10
votes
2answers
2k views

Key bindings specific to a buffer

Is it possible to set key bindings specific to buffer? I have the following in one of my org files: # Local Variables: # eval: (local-set-key (kbd "<f10>") 'some-custom-defun-specific-to-this-...
35
votes
4answers
7k views

How to override major mode bindings

Sometimes my global keybindings are overridden by a major mode. An easy example is the following setting in my init file (global-set-key (kbd "C-j") 'newline-and-indent) But annoyingly this ...
19
votes
7answers
1k views

Dired “quick-view” key to preview the file at point

I would like to create a function that does a "quick view" of a file the is under point in dired. The way that I would like for this to work is that I hold down a function key, which then makes the ...