Linked Questions
48 questions linked to/from Problems with keybindings when using terminal
8
votes
1
answer
6k
views
What does S mean in emacs keybinding notation (org-mode) [duplicate]
Looking at the keybindings here http://orgmode.org/guide/Structure-editing.html#Structure-editing, it asks us to use
M-S-<RET>
to add a TODO at the same level. What does the S here mean? I ...
3
votes
1
answer
2k
views
Why doesn't "C-;" "C-,", or "C-." work in a terminal emulator? (OS X Terminal, Iterm2) [duplicate]
I have bound "C-;" to 'other-window in my config like so.
(global-set-key (kbd "C-;") 'other-window)
When I run emacs outside of a terminal, this keybinding works as I would expect. Inside Iterm2 ...
0
votes
1
answer
579
views
Weird keyboard behaviour by Emacs in a terminal [duplicate]
I am having problems to configure my EMACS in -nw mode using linux thorough ssh. I am trying to map Ctrl+Shift+z to redo using undo-tree-redo. I tried the following code
(defalias 'redo 'undo-tree-...
0
votes
1
answer
421
views
The shift is useless when I am in the iterm2 with emacs -nw [duplicate]
GNU Emacs 24.5.1 (x86_64-apple-darwin14.5.0
Org-mode version 8.2.10 (release_8.2.10
For example, when I use C-q M-Return. It shows ^[ .
But when I use C-q M-S-Return. It still shows ^[ . It seems S:...
0
votes
0
answers
520
views
Paredit slurp hotkey doesnt work [duplicate]
I'm having a real hard time getting the paredit slurp key to work. I know it is bound to C-), and by describing the paredit-slurp-forward-sexp it confirms that.
When I fire up M-x describe-key and ...
1
vote
1
answer
354
views
C-RET not recognized by Emacs in terminal [duplicate]
Attempting C-c C-RET gives me the following:
C-c RET is undefined
Any thoughts on what is happening here?
2
votes
0
answers
394
views
C-S-Backspace not working [duplicate]
When using emacs, C-S-Backspace seems to only delete one char and not the whole line.
After reading Here I see the text:
"C-S-backspace (kill-whole-line) kills a whole line including its
newline,...
0
votes
1
answer
161
views
Key binding in terminal emacs [duplicate]
I started to use Linux Mint. On the Terminal, I can use emacs -nw and emacs. I can't get the same key behavior about the following two configs. In particular, these settings work in emacs, but not in ...
0
votes
1
answer
36
views
C-M-... bindings in emacs -nw [duplicate]
I have an issue when I run emacs with -nw: all my C-M- bindings stop working, as C (control) doesn't register, and only the M- binding is executed.
E.g:
(global-set-key (kbd "C-M-.") '...
0
votes
0
answers
46
views
C-S-n and C-= not working in emacs if running within terminal [duplicate]
I am running emacs inside tmux within iterm2 on OSX. For some reason these key bindings do not work properly
C-S-n
C-=
C-+
C-;
And some others too that are similar.
All of these work when running ...
0
votes
0
answers
25
views
Meta+Shift-Return in iTerm2 on Mac not working [duplicate]
Have you met the case that Emacs in iterm2 on Mac does not recognize M-S-RET (Meta(Option)+Shift+ Return key)? I guess it's related to the modifier key conversions in terminals.
M-S-RET is used in ...
1
vote
0
answers
22
views
Return key when Emacs running inside a terminal [duplicate]
I have re-assigned the RETURN key to exit the insert state in Evil mode.
(define-key evil-insert-state-map [return] 'evil-normal-state)
But this does't work with emacs -nw in terminal. Any way to ...
0
votes
0
answers
22
views
C-C C-SPC not working in RHEL 6.7 GNOME 2.28.2 [duplicate]
The key C-SPC is not working in RHEL 6.7 GNOME 2.28.2.
When I try C-h k and then hit C-SPC I see the following message on the mini-buffer:
C-@ is undefined
That is, SPC is mistaken for @.
22
votes
3
answers
26k
views
emacs on terminal does not recognise option as alt-key on mac
I am on a mac and I am running emacs 24.4.1, but I have the same problem also with 22.1.1. When I open mac on a terminal on the remote host, it does not recognise option key (alt) like the meta key. I ...
19
votes
2
answers
3k
views
How to bind C-i as different from TAB?
I want to make Control-i perform indent-region (basically since Xcode has built that muscle memory already).
I realise that Control-i and tab are indistinguishable in the Ascii sense, but they are in ...
17
votes
1
answer
14k
views
How to use a Mac's Command key as a Control key?
I'm new to Emacs, and am using a Mac. I want the Mac command key to act as a control key for Emacs.
How do I do that? I tried (setq mac-command-modifier 'control).
Besides, how do I find key ...
15
votes
3
answers
6k
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
4
answers
3k
views
Use the command key in Terminal on OSX?
Is there a way to use the Apple command key in Emacs in the terminal? It would be nice to expand the set of easy to get at key bindings I can use.
4
votes
5
answers
1k
views
What linux terminal app is compatible with emacs keybindings?
I am using terminal Emacs (emacs -nw). Gnome terminal doesn't behave well with it (key bindings break), and KDE's Konsole is even worse. Surprisingly, when I ssh from a windows machine the behavior is ...
6
votes
3
answers
1k
views
Keycode for `Shift + Return` on OS X iterm2
I'm currently trying to learn org-mode in OS X. And I found there's a keymap M-S-RET. But S-RET is not recognized in the iTerm2.
It seems like terminal interpret S-RET and RET as same.
iTerm2 can ...
5
votes
1
answer
3k
views
Emacs inside Tmux problem
This might have an obvious answer but I've been trying to fix this issue with no luck. (I'm new to Emacs)
Whenever I start Emacs within a Tmux pane, it ignores some of my .emacs settings. These are ...
4
votes
3
answers
1k
views
Custom C-M-; key binding
I have a custom comment-dwim-line command that I want to bind to the key combination C-M-; (in other words, control, meta and ; buttons pressed simultaneously). The built-in comment-dwim command is ...
4
votes
3
answers
2k
views
OS X Terminal.app C-M-commands
So, in Mac OSX, I'm trying to switch to using Emacs in Terminal.app, but things like C-M-SPC and C-M-% don't work. After a bit of googling I came across this (mostly) unanswered question
https://...
3
votes
2
answers
1k
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
1
answer
2k
views
Fixing keybindings of Emacs inside Putty on Windows
I have regularly tried, over the years, to run emacs through putty to get rid of the need to install a local X server. I remember the putty+emacs combination being abysmal in the past; and right now ...
2
votes
2
answers
1k
views
How to bind CTRL-<home> and CTRL-<end> to beginning/end-of-buffer in Emacs?
Using PuTTY to connect to Linux from Windows and running Emacs: How do I bind CTRL-<home> and CTRL-<end> to beginning-of-buffer and end-of-buffer respectively?
I've been searching the web ...
2
votes
2
answers
510
views
how to map <C-M-left>, <C-M-right> etc to the correct hex codes in iterm2
I'm looking to configure iterm2 to output the correct hexcodes that correspond to in emacs.
There's a whole bunch of mappings predefined but it's very cryptic.
I'm a little bit lost as to how these ...
3
votes
1
answer
1k
views
Making command act as super in iTerm2
I've bound cmd-P in emacs to some function. It is working in emacs when I start the cocoa version but I can't make it work in console mode when running in iterm.
I made iTerm2 ignore the keystroke ...
2
votes
1
answer
636
views
Map a key to act like a combination of modifiers
I've got a keyboard, where pressing M-C-S is uncomfortable (Meta and control are under the thumbs and Shift is on the far end of the keyboard). However, PageUp, PageDown, Home and End are in a very ...
1
vote
1
answer
1k
views
How to remap shift-arrow in term-mode?
Is there a way to map Shift-left or other arrow keys to custom functions in term-char-mode?
I tried, but without luck:
(define-key term-mode-map [s-left] 'sandric/term-switch-line-mode)
Entering ...
2
votes
1
answer
808
views
how to substitute SUPER keybindings in Emacs terminal mode?
In GNU Emacs GUI, I use the Mac Command key ⌘ as super: (setq mac-command-modifier 'super)
However, the ⌘ key does not send input to Terminal or iTerm2. Given this, is there a way to simulate the ...
7
votes
1
answer
290
views
binding M-[ causes mouse focus to insert characters
I have bound M-[ to backward-paragraph. This causes a problem in terminal mode, whereby every time the mouse enters or leaves the frame (i.e., Emacs gains or loses focus), the characters I and O are ...
1
vote
0
answers
787
views
single escape to quit helm in terminal
This blog post on migrating from vim to evil-mode in emacs gives code to make a single ESC quit/cancel helm instead of 3. It worked on Emacs.app (OS X) but doesn't work from Terminal.app (both emacs ...
1
vote
0
answers
649
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 ...
0
votes
1
answer
487
views
global-set-key not working in terminal
I have the following line in my .emacs.d/init.el file
(global-set-key [(control tab)] 'other-window)
;; remap f1 to undo
(global-set-key (kbd "<f1>") 'undo)
When I use the full X-window GUI ...
0
votes
1
answer
468
views
Unable to remap key bindings involving meta under iTerm2
I'm using iTerm2, and I would like to remap some of the meta keys. In my .emacs I have
(global-set-key (kbd "M-g") 'goto-line)
And in my iTerm2 settings I have both "option" keys set to send +Esc. I ...
2
votes
1
answer
464
views
'C-M--' on Emacs Terminal on OSX fails with "C-M-_ is undefined"
I'm trying to execute C-M-- from Emacs on Terminal (iTerm2) running on OSX, but I keep getting an error saying C-M-_ is undefined. Any ideas how to workaround this?
1
vote
0
answers
263
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
1
answer
150
views
Is it possible to bind CTRL-SHIFT-xxx and CTRL-num combination?
I'm very new to emacs and essentially came from vim where it is not possible to bind CTRL-num combination like (CTRL-1, CTRL-2, etc) which as well as CTRL-SHIFT-xxx like CTRL-# which essentially works ...
1
vote
2
answers
175
views
windmove doesn't recognize S-<up> and S-<down> on Macbook Terminal
GNU Emacs 27.2 in Mac OS terminal (11.4 Big Sur).
Started with
(windmove-default-keybindings)
and found that S-<up> and S-<down> behaved just as <up> and <down>, as if the ...
0
votes
1
answer
136
views
What is the keycode of C-TAB?
iTerm does not send ctrl+tab itself, so I need to configure it myself. I can't figure it what key code ctrl+tab is though.
0
votes
0
answers
170
views
How do I type … in the TUI?
When I call describe-key and enter … (Alt Gr + .), it says M-b runs the command backward-word […] and async-shell-command (bound to M-&) is called.
I'm on Linux with Xorg, the terminal emulator is ...
0
votes
1
answer
96
views
Emacs' C-tab seems without effect on my server through ssh
(Emacs 27.1)
On my local machine <C-tab> is linked to other-window and works well:
.emacs.d/init.el:
(global-set-key (kbd "<C-tab>") 'other-window)
When I install Emacs on a (...
0
votes
0
answers
145
views
C-M-% not works in MacOS terminal
I'm fresh to emacs and following manual to practice Query-Replace operation. But I find it not work at all. Type C-h l where it shows ESC 5 seems my OS swallow some key input or emacs parse input ...
0
votes
0
answers
97
views
Xmodmap modifier used for meta
I would like to set my Alt_L to trigger a meta key in emacs.
I've tried using xmodmap to set Alt_L as Mod1, Mod2, Mod3. But in emacs, when i try to type Alt_L + x (expecting M-x) it only prints "...
0
votes
1
answer
72
views
how can a command be bound to Ctrl-' or Ctrl-<NUM> in the terminal
I want to bind a command to C-', C-` and C-0 through C-9 keys. It's not working in the terminal
Is there a way to do so?
0
votes
0
answers
36
views
setting C-, and C-. key bindings
I am unable to set the C-, and C-. key bindings!
I tried adding the following,
(global-set-key (kbd "C-,") 'forward-char)
(global-set-key (kbd "C-.") 'forward-char)
In various ...
0
votes
0
answers
23
views
C-c C-, not working in SSH terminal but it is bound
The function org-insert-structure-template is bound to C-c C-,. I can confirm that when search that function via M-x and seeing the shortcut behind the function name.
But I use Emacs (from Debian 11) ...