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
1answer
40 views

create new keybinding for command mode in evil mode

I am using doom emacs and would like to create a keybinding to run the following line so that I don't need to write it every time I want to run a block of code of python :w !python The above line ...
0
votes
1answer
30 views

How to disable keybinding (`\C-o`) in ido-find-file?

I want to disable key-binding \C-o on ido-find-file. If I press it generates ^J and completion does not completed so I want to disable it. I have tried following but it did not work. (defun ido-common-...
0
votes
0answers
25 views

Ignore meta key when inputting unicode on OSX

I'm a newbie running emacs 26.3 (9.0) on OSX in the graphical mode (i.e. not in the terminal) and am writing a document with Devanagari (sanskrit text). Some of the letters in the inbuilt devanagari ...
0
votes
0answers
33 views

Bind Meta key to Command on Mac Without Altering its System-wide Behaviour

To switch between tasks on an unaltered MacOS Mojave (OS X 10.14.6), one uses command-tab, which is convenient when done with the thumb finger. Now, in order to turn on the meta key inside Terminal (...
0
votes
1answer
34 views

Keybindings with Shift key does not work when CAPS is on

I have this mnemonic keybinding which I placed in my config ;; Switching window backwards (global-set-key (kbd "C-x O") (lambda () (interactive) ...
0
votes
0answers
23 views

When C-c C-c on a block in my org buffer, it collapses the whole buffer

How to avoid this behaviour? I use Prelude. If I have a source block I want to evaluate, it will do so, but also it will collapse all the headings in the buffer, which is annoying. Thanks for any help ...
0
votes
1answer
55 views

Custom Keybindings not working

I had to reinstall emacs and completely redo my config file, but for some reason, some of the custom keybindings that used to work with "move-dup" package from Melpa. Here is what i have: #+...
0
votes
0answers
13 views

ido-find-file key-binding `Ctrl-b` and `Ctrl-f` to move around in the list

From Mickey Petersen' blog Find files faster with the recent files package: (require 'recentf) ;; get rid of `find-file-read-only' and replace it with something ;; more useful. (global-set-key (kbd &...
1
vote
1answer
24 views

How can I access Mac menu bar help via keyboard?

I'd like to be able to search Emacs's Mac menu bar entries using the keyboard, as you normally do in most other Mac applications using s-? (this answer suggest that it should be possible?). I've ...
0
votes
0answers
23 views

spacemacs search and replace - rebind keys to emulate classic emacs

I started using Spacemacs on a Mac recently and to my horror discovered the M-% doesn't bind to query replace, but takes a screenshot instead. How can I reconfigure Spacemacs to behave like classical ...
0
votes
3answers
82 views

How to wrap / intercept commands bound to a given key?

I am trying to have a global override for a binding, where I am checking for some specific conditions to hold. If they don't, I would like that binding to do whatever it was going to without my ...
0
votes
3answers
50 views

How to list a key binding in any modes?

For a given command, lets say C-c C-k, how to list the bindings of this key for all modes ? C-h k KEY show bindings only for the current mode. It's the same for invert commands like C-h f and C-h b. ...
1
vote
2answers
32 views

Is there a more convenient way to find out what keys do in org-agenda than looking it up or just pressing them?

Sometimes just pressing keys until one does what I want works, but this feels rather unelegant. Is there an easier way of finding out what keys do what?
1
vote
1answer
16 views

icicles: How set set Ctrl+p for [up] and Ctrl+n for [down]

In the minibuffer for Icicles when I press C-p or C-n the minibuffer says beginning of the buffer, end of the buffer respectively. Instead want to move around the found candidate using C-p and C-n ...
0
votes
2answers
42 views

How to set keybinding to `C-c C-n`?

I want to set keybinding for C-c C-n rather than C-c n. Is it possible? (global-set-key (kbd "C-x C-s") 'func) ;; Works (global-set-key (kbd "C-c n") 'func) ;; Works (global-set-...
4
votes
3answers
262 views

How to bind key in use-package

I added a section binding to my config, but one key doesn't work. :bind (("C-c a" . org-agenda) ("<f6>" . org-capture) ("<M-S-return>" . org-...
1
vote
1answer
33 views

Which keymap variable contains the bindings for `M-x`?

The Help for key M-x key says M-x runs the command execute-extended-command (found in global-map), which is an interactive compiled Lisp function. It is bound to <execute>, <menu>, M-x. ...
1
vote
0answers
40 views

Show custom key-bindings in the list of commands

I'm using merlin in Emacs, and in my init.el file I have the following : (global-set-key (kbd "C-c t") 'merlin-type-expr) But when I press M-x and type merlin to show the list of commands (...
2
votes
2answers
49 views

How to interpret the org-mode-map key binding?

From the docs https://org-roam.readthedocs.io/en/master/ecosystem/, org-mode-map has binding for s-Y (use-package org-download :after org :bind (:map org-mode-map (("s-Y" . org-...
0
votes
0answers
32 views

Restarting search in a quick way

In Firefox I can hit Ctrl-f to start a search and Ctrl-g to search the next occurence of the string searched. If I would like to search for a different term, I simply hit Ctrl-f again and type in the ...
0
votes
1answer
35 views

Remapping the `g` prefix key for all modes (Evil, org and outline minor mode), assigning a single function to `g`

The question is quite intricate. I am using doom-emacs and evil and I am customizing the keys. Usually, something like (define-key evil-normal-state-map "g" 'evil-paste-after) would work. ...
3
votes
1answer
77 views

Assign a function with universal argument to a key (org-timer-start)

I would like to assing the function org-timer-start with a univeral argument (Ctrl-u) to its own key. I read here, that one should look into the source code of a function to find out how to pass a ...
0
votes
1answer
40 views

Is it possible to bind `C-u C-x C-x`s behavior into `C-x C-x`

I have adviced to use C-u C-x C-x to jump back to latest position I jumped before. For example, if I do M-< and C-u C-x C-x, first I jump beginning of the file and come back to point I jumped. When ...
0
votes
2answers
49 views

Call org-mode code block by name?

Is there a keybinding (or way to define one) to call a source block by its name in the current org-mode buffer? Currently, I move mouse pointer inside the code block and then press C-c C-c. But this ...
0
votes
1answer
22 views

F3 key does not switch to TMB mode in AD Studio

I am trying to become familiar with Template Model Builder TMB and AD Model Builder ADMB in AD Studio which uses Emacs. I have been working through the user's guide AD Studio: Statistical modelling ...
0
votes
0answers
26 views

\C-o firing twice in Emacs 26.3

I usually add a keybinding C-o to call other-window (in addition to default C-x o), by adding (global-unset-key "\C-o") (global-set-key "\C-o" 'other-window) in my .emacs. However, on one machine (...
1
vote
1answer
57 views

How can I add my own key-bindings to magit transient state?

Magit defines a transient state (transient-define-prefix magit-dispatch () "Invoke a Magit command from a list of available commands." ["Transient and dwim commands" [("A" "Apply" ...
1
vote
1answer
54 views

Org-mode: different key bindings for different types of code blocks

Is is possible to define key bindings for org-mode that: Only work inside code blocks; Are specific to the programming language of the code block. For example: if my source code block is for Python, ...
0
votes
0answers
35 views

emacs -nw & gnome-terminal or xterm: can't distinguish C-M-v and C-M-S-v

emacs (v.26.3) can distinguish, out of the box, C-M-v (scroll-other-window) and C-M-S-v (scroll-other-window-down). On the other hand, emacs -nw, when run in either gnome-terminal, mate-terminal or ...
1
vote
1answer
58 views

How to “remove” a remapping so that I can access the underlying (remapped) command?

I use projectile and helm-projectile. Sometimes I like to use helm-projectile-grep to explore the code dynamically, and sometimes I know what I am looking for and I want the speed, and persistence of ...
1
vote
1answer
43 views

How do you handle a key sequence inside a function?

I want to run a function and do different actions based on the next key sequence. I have this. (defun ask-for-C-b-or-M-b (key-sequence) (interactive "KPress Key") (cond ((seq-set-equal-p ...
0
votes
0answers
24 views

How to launch projectile mode with default configuration

I looked at the quickstart here: https://github.com/bbatsov/projectile#installation https://projectile.readthedocs.io/en/latest/usage/ And have this in my init.el: (require 'projectile) (define-key ...
0
votes
0answers
22 views

Is there a configuration of Latex files which can change my key-bindings?

I am observing what I believe is an odd behavior in Emacs. I have a Latex file which, when opened, changes the keybindings in my Emacs. For example, C-x s does not save the file anymore, and Emacs ...
1
vote
1answer
23 views

How to bind C-h to delete-backward-char when doing isearch?

I use C-h as an alias for delete-backward-char everywhere. But when I do isearch it exits the search instead of deleting the character before the cursor. I tried binding C-h in isearch maps, but ...
0
votes
0answers
22 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
33 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
1answer
46 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
26 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
35 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
58 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
90 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
55 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
36 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
70 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
26 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
118 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
45 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
40 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
60 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
32 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
2 3 4 5
21