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.

4
votes
0answers
139 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 ...
4
votes
0answers
313 views

Detect keyboard layout?

Q: how can I detect the keyboard layout from Emacs? I'm writing some code that will set keybindings dynamically by selecting easy-to-reach keys (eg, those on home row). To do this, though, I need to ...
4
votes
0answers
673 views

Why can't I remap the laptop fn key modifier?

I've remapped the laptop key fn to Hyper using: (setq ns-function-modifier 'hyper) to scroll other window I set (global-set-key (kbd "H-n") 'scroll-other-window) (global-set-key (kbd "H-p" ) '...
3
votes
0answers
96 views

How to disable/ignore all key-bindings for a file-formats mode?

There are some file-type modes I mainly use for syntax highlighting (some other features may be handy - eldoc for example), however when loaded they add key-bindings that override my existing bindings....
3
votes
0answers
128 views

How to ignore Caps Lock state for keyboard shortcuts?

When Caps Lock is on, typing commands may bring surprising results, because the capital letters are used instead of what has been intended. In some modes it leads to deleting large chunks of texts, ...
3
votes
0answers
258 views

Pressing both Ctrl keys at the same time is recognized as Ctrl plus Meta

When pressing both C at the same time, the combination is recognized as C-M on a Win7 machine and Emacs 24.5. I've stumbled on this by mistake while pressing C-C-SPC. While on a Linux machine, this ...
2
votes
0answers
32 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-...
2
votes
0answers
523 views

meta key in mac for emacs

i have been working with GNU emacs on a linux server but my keyboard is for mac. i have problem with defining alt key as meta. try (setq mac-command-modifier 'meta) in ~/.emacs.el and then eval-buffer ...
2
votes
0answers
17 views

How to reliably redefine scroll wheel in isearch? [I'm using Mitsuharu Yamamoto's Mac port]

I decided to define <wheel-up> and <wheel-down> to isearch-repeat-forward and isearch-repeat-backward in the isearch-mode-map. This works, but if you scroll quickly, it reverts to ...
2
votes
0answers
129 views

How does one set input-decode-map on GUI frames in emacsclient?

I'm trying to adjust bindings in input-decode-map (to distinguish C-m and RET in GUI mode). None of the advice given on Stack Overflow, gnu.emacs.help, Reddit, or Super User seems to work. I ended ...
2
votes
0answers
51 views

Preferring org-cycle to yas-expand when hitting tab

If both org-mode and yasnippet are active, tab will expand a snippet if possible and otherwise execute org-cycle. Is it possible to reverse this priority? org mode version: 9.0.9. yasnippet version: ...
2
votes
0answers
78 views

Horizontal Scroll Wheel on Mouseover Buffer

My mouse has a horizontal scroll function, where I can tap the scroll wheel left and right to scroll horizontally. By default, it seems Emacs does nothing with that. The scroll wheel produces <...
2
votes
0answers
33 views

Record Emacs interactive function invocations

I want to optimize my keybindings, in a way that the more a command invoked interactively, the more accessible will be a key-binding for it. Is there a way to record all interactive function ...
2
votes
0answers
158 views

Dead keys not working in Emacs OSX

I created a custom keyboard layout (using ukelele) where I use F1-F4 as dead keys to input pinyin (accents for tones). Is there a way to get it to work in emacs? I tried the (require 'iso-transl) but ...
2
votes
0answers
176 views

Trace Evil-mode commands

At the moment, I only know one way to determine which Emacs functions are called by any given Evil command (e.g. a sequence of key bindings in the Normal state): read the Evil source code. Is there a ...
2
votes
0answers
68 views

Is it possible to use the mouse wheel for company mode?

I'm using the Cocoa version of Emacs. When company mode presents a list of completions you can use the mouse to select one. It would seem natural to be able to use the mouse wheel to scroll through ...
2
votes
0answers
648 views

How to disable the map from esc to meta?

I installed the oh-my-emacs configuration and try to use emacs in the terminal. oh-my-emacs configuration enables evil-mode in default, and my problem is that, I found esc is mapped to meta, while ...
1
vote
0answers
21 views

binding a minor mode's function to already defined key in global-map

(use-package anaconda-mode :defer t :config (progn (unbind-key "M-." anaconda-mode-map) (unbind-key "C-_" global-map)) :bind ((:map anaconda-mode-map ("C-_" . anaconda-...
1
vote
0answers
42 views

Using keyboard commands

I am Using Emacs GUI on Windows 10 and am having problems entering commands. I am attempting to use C-h t and I am getting the error message C-c h is undefined. What am I doing wrong?
1
vote
0answers
19 views

Unbind SLIME's slime-edit-uses (M-_)

I installed undo-tree-mode into my emacs. It does have a lot of nifty features, one of them being undo-tree-redo (bound to M-_). It so useful that I put the following code inside my ~/.emacs.d/init.el:...
1
vote
0answers
33 views

Evil keybindings in reftex-toc

I would like to bind j to reftex-toc-next and k to reftex-toc-previous whilst in a reftex-toc buffer. According to the documentation, the keymap active in *toc* buffers is reftex-toc-map. I'm using ...
1
vote
0answers
55 views

Using alt for Meta with non-US keyboards

I have a non-US Mac keyboard which requires the alt key to type certain characters. In an attempt to use alt as Meta key in Emacs, I checked Use Option as Meta key in Terminal preferences. However, ...
1
vote
0answers
82 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
vote
0answers
107 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 (...
1
vote
0answers
85 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
0answers
32 views

How to graphically represent Meta characters

Given that the variable x contains the numeric representation of the key "Control-Z", say (setq x ?\C-z), one may graphically represent its contents by issuing the command (char-to-string x), ...
1
vote
0answers
138 views

How can I disable the M-h keybinding in org-mode with evil-mode?

The problem seems to be that evil-mode translates the key chord M-<left> into M-h. Unsetting M-h by binding it to nil in the local, global or org-mode map in a org-mode hook does not help.
1
vote
0answers
130 views

How to get hungry-delete working in paredit-mode?

Using hungry-delete is really nice, see this Blog post. But with paredit activated, hungry-delete functions are not triggered. paredit defines <delete> as paredit-forward-delete and DEL as ...
1
vote
0answers
366 views

“<t> is undefined” error on first keypress

So here's a pretty weird issue. Sometimes, when I start my emacs and press a key combination, the message <t> is undefined` gets printed in the echo area, and I need to press the key combo again....
1
vote
0answers
111 views

Key bindings are not recognized with non-Latin keyboard layouts on Ubuntu

A lot of times I have to change the input language of the keyboard (from English to a different one) causing the problem of the Emacs commands to not be recognized. Normally when you press Ctrl+A you ...
1
vote
0answers
164 views

Remove all custom key bindings/Reset key bindings to default

I don't know Lisp unfortunately. I have a friend, and I really liked his color scheme/default Emacs setup. However, I hate his hotkeys and I am used to the ones that come as default with Emacs. Is ...
1
vote
0answers
86 views

Spanish keyboard set ! to ¡

I'm using emacs 26.0.50.1 in my spanish laptop and keyboard. Emacs has binding to the ! key for examle M-! => M-x shell-command In a Spanish keyboard this is impossible (at least for me) to amke ...
1
vote
0answers
13 views

What is the <select-window> key on the Apple extended keyboard?

[OS X 11.6, Emacs 25.1] Using my Apple Extended Keyboard I just stumbled on an Emacs key called <select-window>. It is bound, naturally, to select-window. I discovered the key by accidentally ...
1
vote
0answers
449 views

Ubuntu Emacs Meta Key problem related to keys

I'm using emacs 24.5.1 on ubuntu 16.04 on a Vaio x64 pc. earlier I ran the emacs tutorial and got through it completely no problem. Then I started playing with the "replace-string" command and now my ...
1
vote
0answers
62 views

Make backspace(+?) remove a level of indentation in ReST mode

I often find myself in the situation where ReST-mode has correctly identified that my last line can be followed by an idented line, but I want to continue on the next higher level of indentation. How ...
1
vote
0answers
364 views

`which-key` displays “lambda” when keybinding bound to lambda expression

I'm using the which key plugin in my emacs setup and I notice that when I set a key binding in a keymap with a lambda expression, like this (define-key my-yank-keymap "l" (lambda () "Yank whole ...
1
vote
0answers
85 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
490 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
0answers
179 views

Equivalent to vim's nnoremap?

Just began transitioning from vim to spacemacs and I can't find a way to define keymappings such as this: nnoremap N Nzz I tried defining it like this: define-key evil-normal-state-map (kbd "N") (...
1
vote
0answers
28 views

How to mark all entries for particular feed as read in newsticker?

I've got bunch of rss feeds in newsticker and it's nearly perfect but poorly documented. Sometimes people reinstall their blog software (wordpress is particular pile of crap in this regard) and as a ...
1
vote
0answers
66 views

using prefix binding along with Key-chord binding

I am using my capslock key as a prefix key and have already set "capslock-v" to 'helm-show-kill-ring. This however does not work with copying outside code into emacs so now I want a set up as such: ...
1
vote
0answers
165 views

How to keybind helm-projectile-other-file

I like using helm-projectile-find-other-file to switch between header and cpp files, for example. I tried to keybind it to C-c h with the following in my .emacs: (global-set-key (kbd "C-c h") 'helm-...
1
vote
0answers
61 views

Dragging mouse in emacs results in strange output

If I click and drag my mouse within a buffer, garbage text appears all around the mouse. I have tried (global-set-key [drag-mouse-1] 'mouse-set-region) with no effect. I have otherwise no explicit ...
1
vote
0answers
212 views

Define key chords for windmove

I'm following info found on this link, but cannot get the desired custom key bindings to work for windmove. Basically, I put the following in my .emacs file: (global-set-key (kbd "C-M-<left>") ...
1
vote
0answers
122 views

Evil mode - help with custom prefix key

I had a custom key that I used extensively in Emacs for custom editing actions: C-z. I decided to use evil mode (I came from vim originally so nothing too new) but I don't know how to rebind evil's C-...
1
vote
0answers
242 views

Remove strange keybindings from YASnippet

I have YASnippet installed in emacs 24.5, which wasn't working and after a lot of different attempts at a fix, I now have the basics working, however - somewhere along the way - I have collected the ...
1
vote
0answers
40 views

read-event read entire arrow key instead of escape

In graphical emacs on OS X, (read-event) in the scratch buffer produces left, however in iterm2 (which I configured to send esc-* for arrow keys), I get something like (read-event) 27 OD when I ...
1
vote
0answers
112 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 ...
1
vote
0answers
76 views

Simulate shift key press depending on preceding text

When writing text, I would like not to have to press "Shift" when, say, the preceding text is a sentence end (e.g., ". "). So, for example, if I have written Hi. and then I type b, a B should appear ...
1
vote
0answers
148 views

ESS major modes keybindings do not work

I am connecting from a Windows machine to a Linux server via Putty (http://blog.harang.org/?tag=putty). There I start Emacs and open a script written in the statistical language R. When I open the ...