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

Keybinding causes only a cursor blink ('\C-t') and no command is executed

This article is about the keyboard key combination 'Control + t' (smallcase 't') This problem is exclusive to the GUI version and does not come up while using the terminal. I am using Wayland Control+...
1
vote
0answers
11 views

Autocomplete when editing file links

When I insert a link into an org-file using C-c C-l (Doom Emacs, if that matters) and select file:, it show me the files in the current directory to autocomplete from. However, when editing such a ...
0
votes
2answers
21 views

How to loop over keymaps and assign keys?

If I have a key binding I want to apply to multiple keymaps, for example. (evil-define-key 'visual c-mode-map (kbd "C-M-?") 'c-comment-from-c++) (evil-define-key 'visual c++-mode-map (kbd &...
0
votes
0answers
13 views

Is the Hyper modifier key usable on non-X11 platforms?

I have a hyper modifier setup, however I was wondering if it's possible to use this on any windowing systems besides X11, for example: macOS Wayland Win32 The terminal.
1
vote
2answers
32 views

Implement modal interface in a major mode

I am creating a major mode, and would like to have modal interface (such as vi) on it. I want to have a special key that toggles the behaviour on arrow keys. So, for example, if the special key is hit,...
2
votes
1answer
29 views

Cannot bind Meta + Shift + Character

I am not able to bind Meta + Shift + any character. I do not experience these problems with other key combinations (such as Control + Shift + Key). Below is the specific case that I cannot get to work:...
0
votes
0answers
12 views

Make ido-completing-map override minibuffer-inactive-mode-map

I'm trying to bind a key in ido-completing-map, and I want it to override the key-binding with the same key from minibuffer-inactive-mode-map. But the latter seems to take precedence. How can I remedy ...
0
votes
1answer
32 views

How to track down where Emacs message “<Scroll_Lock> is undefined” comes from?

I am using Emacs 25.5 and now am getting the message: "<Scroll_Lock> is undefined" appearing regularly in the Messages buffer. If I turn on debug-on-error, it doesn't stop on it and ...
0
votes
0answers
16 views

keybinding behavior and smartparens

I am using a german keyboard layout and because it is very annoying to type curly brackets I have remapped them to C-7 and C-0 in addition to the default binding AltGr-7 and AltGr-0. I also want to ...
0
votes
0answers
11 views

how to get out of a (R) repl’s multi-line (multiple-line) / line-continuation mode

My question: In (an R-repl from ESS layer) in spacemacs, I can’t end a multiple-line after I start it myDf %>% # here i hit RET so then the REPL goes into multi line mode: + myDf %>% myDf %&...
2
votes
1answer
32 views

Umlauts in Emacs on Mac

Sorry for the newbie question. I have been using Aquamacs more many years. As it is not as actively developed as it used to and became increasingly buggy in the past two years I want to make the ...
2
votes
2answers
155 views

Inserting timestamp in mini buffer in Emacs

I keep on saving various org files in their respective folders using Filename as YYYY-MM-DD.org files . So I ended up typing C-x C-w 2020-10-06.org at least thirty times today. Can this process be ...
0
votes
0answers
12 views

Evil and adding a binding for evil-ex-define-cmd globally for tabbar mode

I’m using spacemacs: •  How can I (globally —ie, permanently) bind a new command :tabe to open a new tab in the emacs built-in minor mode TabBar? •  Right now, :tabnew works. But I want to make :tabe ...
0
votes
0answers
22 views

Don't understand the keybinding for auto-yasnippet

I am looking to use auto-yasnippet but I don't understand the keybindings they are suggesting such as H-w and H-y. I haven't seen any keybinding that starts with H so I am not sure what that is. I ...
4
votes
1answer
53 views

Why my minor mode bindings do not get precedence over global/major mode bindings? BUG?

EDIT: ANSWER The cause for the problem in this question was pointed out in the Emacs mailing list. It is due to the (kbd ...) forms not getting evaluated because the keymap in the define-minor-mode is ...
3
votes
2answers
56 views

How to specify prefix argument in key binding

The description of C-x C-e mentions: ...Interactively, with a non '-' prefix argument, print output into current buffer. I understand this to mean this logic is triggered when I issue C-u C-x C-e, ...
1
vote
1answer
94 views

Remap lsp-mode prefix with use-package

How do I remap the lsp-mode prefix key to "s-k" using the use-package package? I tried the following (use-package lsp-mode :ensure t :init (setq lsp-keymap-prefix (kbd "s-k") ...
0
votes
0answers
49 views

How can I make emacs interpret tilde ~ as a literal tilde (never to modify letters like Ã, Ñ)

I want to always have tilde insert a literal tilde (~). How can I ensure this in emacs? This also happens when I start emacs with -q or -Q! Version info: GNU Emacs 27.1 Copyright (C) 2020 Free ...
0
votes
1answer
32 views

How to remap the search backwards evil-ex-search-previous command of evil?

I want to remap evil-ex-search-previous to some other key than ,. I tried (define-key evil-motion-state-map "," 'evil-avy-goto-char-in-line) (evil-define-key 'normal magit-mode-map ",&...
1
vote
1answer
63 views

How to disable remapping by a package

I recently used a package that overwrote C-x C-s to something other than save, causing me to lose a lot of work. Is there a way I can advise emacs to check for a blacklist of keybindings that it ...
1
vote
0answers
38 views

How to remap meta-arrow keys in org-mode

Say I want ctrl-shift-arrows to do what meta-arrows normally do in org-mode. How do I do this? I tried (define-key org-mode-map "C-S-<up>" 'org-meta-up)) (and so on for down, left, ...
1
vote
2answers
88 views

Is there a better way of writing this with use-package?

I feel like there is a better way of writing this with use-package but I just can't get the usual way to work. (use-package eshell :hook (eshell-mode . (lambda () (define-key ...
1
vote
3answers
59 views

Super-s: How to express it? Is some escaping needed in the syntax?

This code binds "Super-c" to lambda: (global-set-key (kbd "s-c") (lambda () (interactive) (jump-to-register 'q))) How can I bind Super-s? They are both denoted as "s&...
1
vote
1answer
18 views

Add separator to main toolbar

How is a separator added to the main toolbar? I have no trouble adding an icon/item with tool-bar-add-item but can't find a way to add a separator.
0
votes
2answers
56 views

How can I exit emacs without saving any changes

I would like to be able to exit emacs without saving changes. I might have started editing some configuration file, then decided that I don't want to save the changes. In vi I would issue the q! ...
0
votes
1answer
43 views

Recreate spacemacs' ivy/projectile 'SPC P SPC' binding for helm/projectile

I recently switched from ivy to helm in spacemacs as my project search/management package. In ivy, there is a keybinding for SPC p SPC that does a search for files in the project (by file name). There ...
0
votes
1answer
173 views

Break key as a shortcut — what am I doing wrong?

I would like to define a keyboard shortcut in my .emacs file so that the Break (a.k.a. Pause) key does a C-x C-s C-x C-c. As a warmup, I thought I would try something simpler, so as a test I did this, ...
0
votes
1answer
38 views

Hardline Wrap and Emacs Keybinding

The terminal interface to Emacs is marvelous and I like how it handles parentheses. I have two questions as I'm trying to move to Emacs as both a writing and coding environment. I installed a minimal ...
1
vote
1answer
44 views

Global `C-x C-f` binding is overridden

I don't like ido-find-file, which seems to be the default response to C-x C-f in my Emacs 23.1.1 installation on Centos. I tried to change it in my .emacs file: (global-set-key (kbd "C-x C-f"...
0
votes
1answer
42 views

Faster way than `C-u C-c C-l` to create an org link to a file opened in another buffer

Suppose I am am writing an org file /path/to/foo/bar/notes.org and I have in another window opened at the same time another file say /path2/to2/foo2/bar2/file.tex (living on a totally different path ...
0
votes
1answer
17 views

Set keys in org-columns after startup

I would like to set (or unset in this case) keys in the org-columns-map at startup but when I use "org-columns" nothing happens. If I use "org" instead I get errors that org-...
0
votes
1answer
42 views

Switch to *scratch* buffer (global-set-key)

I am reading the Intro to Lisp Programing and got to the chapter where switch-to-buffer is introduced. I tried to bind (switch-to-buffer "*scratch*") via global-set-key But this does not ...
1
vote
1answer
31 views

How to disable “/” 's default behavior on the F interactive mode?

I use interactive mode with Ivy and Dired for interactively creating new files, like so: (evil-local-set-key 'normal (kbd "t") (lambda (file) (...
0
votes
2answers
59 views

How rebind one keybinding to another?

Emacs 26.1 I has keybinding ‘C-a C-SPC C-e M-w’ copies the current line without the newline. But it's to long shorcut. I want to change it to C-c So as result when I press C-c to copies the current ...
0
votes
1answer
69 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
35 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-...
1
vote
0answers
32 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
42 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
35 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
60 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
18 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
28 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
24 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
93 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
68 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
33 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
17 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
44 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
440 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
2 3 4 5
21