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 [prefix-keys]

The tag has no usage guidance.

1
vote
0answers
5 views

How to setup Meta key when using VNC from Mac to Centos 6?

I'm running emacs 26.1 on a Centos 6.9 machine displaying via TightVNC server to a client running on my Mac OS X 10.14.2. To make things tricky, I'm also using Dvorak keyboard layout. When I run ...
1
vote
1answer
44 views

“ESC” no longer works as meta; how can I restore functionality?

I mistyped some command sequence and ESC stopped working as a meta prefix in Aquamacs (it still functions as usual in the command-line emacs, including both Apple's system version and the command-line ...
2
votes
2answers
51 views

Change prefix key for compose-character (C-x 8)

According to the documentation, the key C-x 8 can be used to insert non-ASCII characters. For example, C-x 8 ' a will insert "á". Is it possible to change the prefix key to another (shorter) value, ...
0
votes
1answer
35 views

Spacemacs redefine main prefix `M-m`

I am trying Spacemacs with emacs keybindings, so the commands starting with SPC, like SPC f e d, can be invoked by replacing SPC with M-m. Since M-m is bound to back-to-indentation in stock emacs, I ...
2
votes
0answers
27 views

Get keymap that called function

I am trying to write a function that can be used to make a keybinding "remember" the key sequence that led up to the function being called. (defun modal-function (func) (funcall func) (set-...
1
vote
2answers
82 views

Spacemacs: change prefix key from `SPC-b` to `SPC-v`

I use buffer (SPC-b) prefix key very often, and would like to move its keymap to a more convenient key (e.g. SPC-v). Is there a way to achieve this without redefining the entire map? so I would like ...
1
vote
0answers
68 views

Why can't I bind to “M-s” prefix in global-map?

Running the following code: (global-set-key (kbd "M-s s") 'forward-char) Then using the command M-s s outputs M-s s is undefined. I have to bind to override-global-map for it to work: (define-key ...
-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
0answers
75 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 ...
1
vote
1answer
54 views

Binding a key to (MAP . CHAR)?

According to the define-key docstring, binding a key to a cons (MAP . CHAR) should cause that key to act as CHAR in MAP. However, I cannot get this to work. For example, evaling this and trying to use ...
0
votes
1answer
246 views

What is the difference between global-set-key and local-set-key?

I want to make a prefix key. So which command is better for making a prefix key? REF: https://www.emacswiki.org/emacs/PrefixKey
3
votes
2answers
154 views

Binding <ESC> <ESC> to have <ESC> <ESC> <ESC> functionality

I'm not a fan of hitting escape 3 times so I am trying to have the same functionality with two key presses. I have tried the following: (define-key key-translation-map (kbd "<ESC> <ESC>")...
2
votes
1answer
333 views

Proper way to change prefix key for minor-mode map?

The package HideShow (hs-minor-mode) defines some key bindings with prefix key C-c @. What is the proper way to change this prefix key to C-c h? The new key binding should also replace the old key ...
6
votes
1answer
272 views

What does `(fset SYMBOL KEYMAP)` do?

I was reading through the projectile source file and they do the following: (defvar projectile-command-map (let ((map (make-sparse-keymap))) ; define-keys map) "Keymap for Projectile ...
0
votes
1answer
430 views

Normal C-c in ansi-term

In ansi-term, it automatically rebinds C-c to have the same keybindings as C-x. I want to turn this behaviour off, so I can access the keybindings I have behind C-c. (I know about C-c C-j, but that's ...
1
vote
1answer
384 views

How to make emacs recognise C + SHIFT combinations in terminal mode?

Emacs cannot currently pick up C-SHIFT sequences in terminal mode. For example, C-) and C-( are instead just read as 0 and 9 respectively. I'm aware that using GUI mode is one way around this, but I ...
2
votes
1answer
29 views

Relocating an anonymous prefix keymap

ibuffer uses / as a prefix key for filter commands, like ibuffer-filter-by-name (/n). As an evil user, I wanted to use a different prefix, since evil uses / for searching. I use space as a leader-...
3
votes
1answer
168 views

C-) not recognized on Windows 10

In my init file, I have C-) bound to a smartparens "slurp" command. This works great on linux, but when I try to use the same keybinding on my Windows machine, nothing happens. To troubleshoot on my ...
6
votes
2answers
198 views

When does Emacs treat keymaps as functions?

Emacs' source code contains multiple instances of using fset with a keymap. For example, in ediff-util.el: ;; Allow ediff-mode-map to be referenced indirectly (fset 'ediff-mode-map ediff-mode-map) ...
1
vote
0answers
80 views

How do I run a function upon pressing a prefix key?

Trivial example of what I would like to do: (define-prefix-command 'my-prefix-map) (defun populate-my-prefix () (define-key my-prefix-map (kbd "a") #'move-beginning-of-line)) (define-key global-...
1
vote
0answers
458 views

Map ESC to keyboard-escape-quit

I like Emacs but I hate the default shortcuts. I'm trying to make them more like Sublime Text, Atom, ... Most shortcuts I can change without a problem, but ESC seems to be more difficult. I don't wont ...
1
vote
2answers
82 views

How can I redefine a key that is currently used as the start of a key sequence?

I want to redefine C-w to run one of my commands. evil has already defined a number of key sequences that start with C-w to run its commands. So my command does not run, Emacs just waits for me to ...
5
votes
2answers
168 views

Find out the purpose of a Prefix Command listed in describe-bindings

Is there any easy way to determine the purpose of a prefix key shown in the output of (describe-key Chk? I walked through my (kbd "C-x <key>") and (kbd "C-x C-<key>") combinations to ...
7
votes
3answers
532 views

how to add a prefix key to all keybindings of a specific mode?

i am using a mode, but am not used to its key-bindings: some of them conflict to the emacs global ones. so, i want to add a prefix key-binding to all its existing keybindings. for example, if my-mode ...
3
votes
1answer
153 views

Bind function to the prefix key of Workgroups2 [duplicate]

I'm trying to make Workgroups2 more convenient by displaying a list of workgroups in the mini-buffer on pressing the prefix key (C-c z), e.g.: This makes it convenient to use the index 0-9 to switch ...
5
votes
3answers
121 views

Displaying bindings for prefix keymaps

I have a tree of deeply nested keymaps, with many possible leaves (commands), too many for a human to remember. For simplicity, let's say each command is associated with a given file name. I would ...
4
votes
0answers
67 views

Can the prefix of a key-sequence have an effect? [duplicate]

I am writing a small window navigation and manipulation package. Windows are numbered very much like WindowNumberingMode. To make this concrete I have a series of commands: "C-, 1" ; Move focus ...
11
votes
7answers
2k views

What packages are available for modal editing?

What packages are available for modal editing in Emacs? What do you use and why? Let's try to post one package per answer. I propose mention advantages and shortcomings of every package. Here is my ...
1
vote
0answers
107 views

How to bind a keycode to hyper key in Aquamacs

I am using Aquamacs. I have used Seil to change my caps lock key to emit key code 110. I would like to bind that code to super/hyper/another modifier so that I can create more key combinations. How ...
7
votes
3answers
1k views

Why I can't bind Shift-<backspace>?

My system is debian wheezy, I tried to do the following (global-set-key (kbd "S-<backspace>") 'evil-shift-left-line) (global-set-key (kbd "<S-backspace>") 'evil-shift-left-line) (define-...
7
votes
1answer
219 views

How can I globally replace C-c with another key binding?

The key combination C-c is not convenient to type in the keyboard layout I use, and I'm trying to do change it globally. The goal is to replace every occurrence of C-c with another binding <apps>...
5
votes
3answers
337 views

Undefine prefix binding

I've become accustomed to using C-x p for switching to the previous window. And, I recently had to start including a company-wide startup.el file that defines the prefix C-x p-. I don't use any of ...
1
vote
2answers
337 views

How to properly change defcustom prefix key

In a library I use a prefix key defined like this: (defcustom ensime-mode-key-prefix [?\C-c] "The prefix key for ensime-mode commands." :group 'ensime-mode :type 'sexp) In my config file I've ...
1
vote
1answer
523 views

How to use global prefix command key in define mode-map keybinding?

I have a global prefix command key define like following: (unless (boundp 'help-document-map) (define-prefix-command 'help-document-map)) ;; (define-key my-programming-prefix-k (kbd "h") 'help-...