Questions tagged [keystrokes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

Why does Emacs when started with 'no window' delete a character when I press C-h?

I've recently started to see the following behavior: when I run Emacs via emacs -nw -Q, and hit C-h, it runs BACKSPACE, deleting the characters. But if I run the same Emacs version in GUI mode, that ...
Emre Sevinç's user avatar
0 votes
0 answers
21 views

How to see if a keybinding is used in any mode? [duplicate]

For example, I once set <C-j> as <C-x>, only to find out <C-j> is used for org-forward-heading-same-level in org-mode. I know <C-h> k shows a keybinding's usage in current mode....
Lai Yu-Hsuan's user avatar
0 votes
0 answers
37 views

Keypress is not registered sometimes

I'm using evil mode and I've bound C-g to switch to normal state: :bind (:map evil-insert-state-map ("C-g" . evil-normal-state)) (:map evil-visual-state-map ("C-g" . ...
tap349's user avatar
  • 101
1 vote
1 answer
113 views

C+X C+; not working

I work in emacs 27.1, Ubuntu 22, Terminal. I need to comment out a block. I press Ctrl+XCtrl+;. However, the ; button is not accepted properly. It only makes an underlined e appear (only on screen, ...
Viesturs's user avatar
  • 825
6 votes
2 answers
375 views

Insert multiple minus ('-') characters using the universal argument (C-u)

I was manually creating a table in my source code's multiline comments and inserting horizontal separators using - and =. E.g. C-u C-u C-u = as expected and inserts 64 =s at the point. But - is used ...
loonatick's user avatar
  • 217
0 votes
0 answers
30 views

Best way to get man to open in emacs by default

I currently have: man () { emacs -nw --eval "(man \"$1\")"; } in my .zshrc. However, this has the problem of not working with something like read(2) or command-line arguments to ...
user129393192's user avatar
0 votes
1 answer
101 views

Understanding of Emacs way of managing user input events

As an Emacs newbie (with two weeks of Emacs experience) I am in the process of understanding the way Emacs manages user input events. My current understanding of how it works is that the way Emacs ...
Claudio's user avatar
  • 420
0 votes
1 answer
53 views

Which command handles keys used to edit text in a buffer?

I have just (yesterday) installed emacs and am in the process of learning the very basics of its usage (I have never used emacs before, but I am maybe on the way to switch from SciTE and lua to emacs ...
Claudio's user avatar
  • 420
1 vote
1 answer
54 views

Plain ordered list keystrokes do not work properly

The keystrokes M-<up>, M-<down>, M-RET etc. do not work as described in the manual in an ordered list, but they change all the plain list into an unordered list. What could have happened? ...
Marcello's user avatar
1 vote
0 answers
40 views

What is Emacs <select> key?

I'm running Emacs 27.2 inside Ubuntu 16.04 in terminal mode inside a Bash version 4.3.48 shell. Normally the describe-key for the end keyboard key shows that it's <end>. However, when Emacs is ...
PRouleau's user avatar
  • 786
0 votes
1 answer
36 views

Diacritic marks in emacs for macOS

I've run in a problem when I wanted to use diacritic marks (ąęśćłóżź) in the emacs for mac. Usually, to get them I use the right option key ⌥ along with the character I want to enter (⌥+aesclozx ...
user1146081's user avatar
0 votes
1 answer
94 views

Let a function do a keystroke

Often there is a function which then asks for another keystroke to determine how to act. Examples for this are the cdlatex functions cdlatex-math-modify, cdlatex-environment, or the reftex function ...
Sinthoras's user avatar
0 votes
0 answers
24 views

C-; not detected on GUI Emacs (weird behavior instead) [duplicate]

My issue is that Emacs 28.1 (from snap) or 27.1 (from apt) on Debian/sid Gnome 42.1 (on wayland) is not detecting the C-; keychord. Instead a bubble appear with already an e in it : It used to work, ...
learner's user avatar
  • 121
1 vote
1 answer
32 views

Display define-key output in echo area

This is my function, (define-key global-map (kbd "µ") (display-message-or-buffer (message "`%s'" (eval '(solar-sunrise-sunset-string (calendar-current-date)))))) But, when I ...
BuddhiLW's user avatar
  • 267
1 vote
0 answers
108 views

Iterm2 use Control + Option keys for C-M- key sequences

I usually use iTerm2 as a terminal emulator because of its tmux integration, which is extremely handy, but I haven't been able to find a way to get the Control + Option keys to work as a C-M- key in ...
Sarah Roberts's user avatar
0 votes
0 answers
25 views

briefly holding shift+arrow results in "runaway" selection

When I try to select a region using shift+arrow, if I hold the key combination down for a second or two it will continue selecting the text after the keys are released. It appears to enter an ...
user34516's user avatar
3 votes
1 answer
300 views

How to get immediate visual feedback of keys I type?

I would like to get some immediate strong visual feedback for the commands I enter in emacs. For example, I would be happy if any key sequence (beginning with a modifier key) that I type appeared in ...
Communicative Algebra's user avatar
0 votes
1 answer
1k views

What is Emacs' "Hyper?" key?

QMK defines Hyper as Ctrl+Shift+Alt+GUI. XFCE4 is treating my Left super as Hyper, which also happens to be the key that was configured as Hyper in xmodmap when the shortcut was defined. Emacs doesn't ...
Latex_xetaL's user avatar
0 votes
0 answers
40 views

C-^ not registering

As the title suggests, I cannot enter C-^ in emacs. It doesn't work in org-mode nor does it register anything when I try to enter it into describe-key. If it helps at all I am on mac using emacs ...
Cole's user avatar
  • 141
3 votes
1 answer
123 views

Like pressing "q", but from the other window

I run a command that takes over another window, and maybe resizes it a little, but doesn't focus it. Let's say C-h e or C-x C-b. I can go to that window and press q there, and everything goes back to ...
angus's user avatar
  • 593
2 votes
1 answer
225 views

Partly delete a key sequence?

I'm relatively new to Emacs, so apologies if I'm using any terminology incorrectly. I have installed Doom Emacs in Evil mode, so command shortcuts are commenced with SPC instead of Meta. When entering ...
JBentley's user avatar
  • 123
1 vote
1 answer
259 views

Forward, backward etc sexp not working

I want to use the forward-sexp function in Emacs, which on my Spacemacs for Mac is bound to C-M-f. Similarly for the backward-sexp. However, upon pressing C- for Control, and then the Meta key, which ...
zendevil.eth's user avatar
1 vote
1 answer
410 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, ...
user avatar
5 votes
2 answers
361 views

Display keybindings typed in a buffer

On this video stream, the window on right displays the keybindings typed with its corresponding command bound. Is there any package that does that, or a way to achieve it?
nephewtom's user avatar
  • 2,249
3 votes
1 answer
2k views

"Backspace" key sometimes also deletes forward in python-mode

Start Edit 1 To answer questions. Emacs Versions: GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 2017-09-22, modified by Debian GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-...
Gabe's user avatar
  • 51
1 vote
0 answers
58 views

Get time since last keystroke

I would like to know how many seconds have passed since the last keystroke (or character that showed up in the screen, whatever is easier). Is there a timer that is associated to self-insert-command? ...
scaramouche's user avatar
  • 1,772
0 votes
1 answer
57 views

`Alt-f` or `Alt-b` then `d` deletes the forward word rather than putting character 'd' in front of the word. Why does emacs behave in this way?

I was doing some editing in Emacs. I was using Alt-f and Alt-b to traverse by word. I wanted to add the character d in front of a word. So I pressed Alt-b to get to the front of the word and then ...
Ashfaq's user avatar
  • 103
2 votes
0 answers
224 views

Emacs on Windows randomly stops recognizing the Caps Lock state

I'm running GNU Emacs 26.1 on Windows 10, with minimal customizations (custom shortcuts and command names, theme, (ido-mode 'buffers).). At the start of the session, the Caps Lock state is recognized ...
Arry's user avatar
  • 203
1 vote
0 answers
54 views

Shift key does not fully work in Juypter Notebook's terminal

The Shift key sometimes does not seem to work in emacs, when emacs is launched in Jupyter Notebook's terminal (in non-window mode). Other meta keys such as Ctrl and Alt on a PC keyboard work as usual. ...
tinlyx's user avatar
  • 1,314
0 votes
1 answer
187 views

How do I do the key strokes `C-M-c` in spacemacs?

I'm using spacemacs but trying to use ediff-regions-linewise to compare a couple regions of text. In order to confirm the selection, I need to do C-M-c. This is probably a silly question, but how do ...
harumphfrog's user avatar
1 vote
1 answer
76 views

Function to reprogram muscle memory

I've switched from emacs to spacemacs, but my muscle memory still uses the standard emacs keybindings -- despite attempts at avoiding key chords. As an example, to save a file, I continue to use Ctrl ...
Jeff Bauer's user avatar
1 vote
1 answer
188 views

M-P: M-p is undefined

I noticed something odd. If I press M-P I get the message M-p is undefined rather than M-P etc.. Is there a reason for this? Version 26.2. Using Arch Linux and the X window system.
Toothrot's user avatar
  • 3,254
1 vote
1 answer
138 views

Configure echo time for input of key-sequence prefix keys

I am writing latex code with AUCTEX. I very often highlight text in bold or italics. For instance, AUCTEX comes with the command C-c C-f C-e, wich can be used to emphasize text in an active marked ...
user64060's user avatar
2 votes
2 answers
118 views

suppress command echoes from menu-bar items

When selecting items from the menu-bar, then the echo area echoes the selected menu item. Test this by selecting menu-bar -> file -> new window below, when you clicked this menu-bar item, then ...
jue's user avatar
  • 4,501
0 votes
0 answers
42 views

`M-%` is interpreted as `M-5` (prefix arg of 5)

On one of my machines the query replace key sequence (M-%) isn't recognized, and is instead recognized as M-5, which acts as a numeric prefix argument of 5 (e.g. inserts 5 copies of the next character ...
ipsnicerous's user avatar
5 votes
2 answers
374 views

How to play back an edit session in emacs?

The book Clean code says emacs can play back an edit session (page 13): You could work for an hour and then play back your whole edit session like a high-speed movie. When I did this, the results ...
Alaneuler's user avatar
  • 277
0 votes
5 answers
119 views

How to define action to happen on triple key press?

I'm using evil mode. I'm looking for a convenient way to type German language Umlaut characters (ä, ü, ö, Ä, Ü, Ö, ß) while using an English US keyboard layout. One idea that came to mind was to ...
andreas-h's user avatar
  • 1,559
2 votes
3 answers
95 views

is there a keybinding to save curor position for returning after viewing other section of same buffer?

when i am editing a large file, often need to view other sections of the same buffer only once. But after that I need to go back to the position I was editing at. Is there a key for doing that?
Alvaro Martinez's user avatar
12 votes
1 answer
806 views

decrease time until "C-x-" shows in echo area after pressing the keys

When I try enter commands via C-x, it takes 1-2 seconds until the echo area shows this prefix key, as C-x-. I'm quite new to Emacs, so this often confuses me, and I get lost. The ESC key acts ...
kai-dj's user avatar
  • 427
4 votes
1 answer
370 views

OA and OB inserted by emacs

What are the OA and OB inserted by emacs? It happens, I think, when I press ESC several times. I use emacs in the -nw mode. I would rather do without these insertions.
Viesturs's user avatar
  • 825
4 votes
1 answer
230 views

Process unread-command-events and redisplay

(defun pretend (keys) (dolist (e (reverse (listify-key-sequence (kbd keys)))) (push e unread-command-events) ;; (mystery-function) (redisplay t) (sleep-for 0.1))) (pretend "M-x my-...
Sean Allred's user avatar
  • 6,871
1 vote
1 answer
105 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), ...
Ruy's user avatar
  • 839
3 votes
2 answers
178 views

Convert bitmap vector keys into a human readable string

If you run (kbd "M-r") you'll get back the bit vector [134217842]. But what if I want to go the other way around: start with [134217842] and return M-r. How does one do that? I Have looked at the ...
rocky's user avatar
  • 888
4 votes
1 answer
73 views

Making sure that a pair of functions is executed even if C-g is pressed in the middle

Based on the documentation, I am trying the following: (let ((inhibit-quit t)) (my-fun) (y-or-n-p "Prompt") (cancel-effects-of-my-fun)) Here, my-fun performs changes to configuration and ...
AlwaysLearning's user avatar
4 votes
2 answers
728 views

Regex search: Why C-M-s does not seem to work like other keystrokes?

The purpose of this question is primarily to serve my curiosity, but it can maybe save some time for others who may press C-M-s (isearch-forward-regexp) just like they would press C-s (isearch-forward)...
Giuseppe's user avatar
  • 455
2 votes
1 answer
98 views

Abbreviation expansion without spaces

I would like to set up things so that when I type Iuulius, the sequence uu is seamlessly replaced by ū (and a few more such pairs), as soon as I type the second u. I.e. the keystrokes and buffer text ...
melissa_boiko's user avatar
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 ...
achalk's user avatar
  • 579
1 vote
1 answer
80 views

Injecting keystrokes on console

I normally use emacs (on Linux) running in windowing mode. I have bound a number of functions to special keypresses such as <C-return> and <kp-add>. Ocasionally, I'm forced to run emacs ...
oz1cz's user avatar
  • 145
5 votes
1 answer
462 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 ...
achalk's user avatar
  • 579
10 votes
1 answer
2k views

How to get keystrokes displayed in the echo area immediately?

How do I get keystrokes displayed in the echo area immediately? For example: when I enter the key sequence C-u j, it will not display in the echo area immediately, but then I press key k, and I ...
jimmy's user avatar
  • 103