Questions tagged [keystrokes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
142 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-...
1
vote
1answer
41 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 ...
0
votes
0answers
22 views

How to change the value of timeout for key sequences?

I have a key sequence for M-<SPC>: (global-set-key (kbd "M-<SPC> a") 'foobar) I would like to increase the timeout between keystrokes M and <SPC> for building M-<SPC>. How ...
1
vote
0answers
23 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. ...
0
votes
1answer
33 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 ...
1
vote
1answer
60 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 ...
1
vote
1answer
49 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.
2
votes
2answers
33 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 ...
0
votes
0answers
38 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 ...
11
votes
9answers
3k views

Typing quickly when Control, Alt and Esc are hard to reach

I'm very new to Emacs and I'm trying the built-in tutorial. After I went through the basics, I found it really hard to reach the Ctrl and Alt or Esc keys. I'm trying to type faster but since all the ...
5
votes
2answers
123 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 ...
4
votes
1answer
71 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 ...
0
votes
5answers
47 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 ...
3
votes
1answer
1k views

How to use the Insert key to toggle `overwrite-mode` when using a PC keyboard in OS X?

By default, when using a PC keyboard attached to a Mac, OS X treats presses of the Insert key as presses of the Help key that appears on the extended Mac keyboard. How do I map that keypress to have ...
2
votes
3answers
75 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?
10
votes
1answer
467 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 ...
3
votes
2answers
95 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 ...
4
votes
1answer
249 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.
1
vote
0answers
36 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
2answers
319 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)...
1
vote
1answer
67 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 ...
1
vote
1answer
606 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 ...
1
vote
1answer
39 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 ...
4
votes
1answer
224 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 ...
9
votes
1answer
1k 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 ...
0
votes
1answer
30 views

“M-s-h” is being interpreted as “M-s-˙”

When I type M-s-h emacs reports: M-s-˙ is undefined That tiny dot is the 'DOT ABOVE' (U+02D9) character. I'm on OS X. This is happening when I use the emacs-plus build. With emacs-mac port I don't ...
1
vote
2answers
63 views

How do I get a string displaying the keypress of the function (like where-is shows)?

(where-is 'zap-to-char) ;; Prints ("zap-to-char is on M-znil") (where-is-internal 'zap-to-char) ;; [134217850] ;;; this number seems like junk to me! I would like a function that returns M-z I ...
1
vote
1answer
278 views

Is there an advantage to learning ESC- instead of ALT- beyond “maybe you'll use a system someday …”? [closed]

I've been recently persuaded and coached to take the jump from vi to emacs. But one question sits funny. Why would one prefer to use the ESC- sequence for Meta- commands rather than ALT-key ...
1
vote
0answers
44 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
1answer
250 views

Help with my double tap key-binding function

I'm writing a function to enable binding a "double tap" on a key (or one key then another key in rapid succession) to a function. It almost works, but not quite. Here is the code I have in my lisp ...
3
votes
0answers
84 views

How can I tell emacs to ignore the XF86AudioFoo keys?

Using 24.5.1 on OpenBSD 5.9. OpenBSD's sndiod listens for XF86AudioLowerVolume and the rest, but if emacs is running in graphical mode with either GTK2 or GTK3 (I haven't tried lucid/AWT, but I will ...
2
votes
1answer
63 views

Force append to buffer instead of at point

Is it possible to force an Emacs buffer to place any new text it receives at the end of the buffer, instead of at the mouse point? I mean all of: keystrokes, yanks, mouse paste. I'm thinking in ...
0
votes
1answer
43 views

How to know that any other key except certain was pressed

When I'm writing a php program I often face the following situation: step 1: '[' pressed: Result: [<cursor> step 2: ']' pressed Result: []<cursor> step 3: move the cursor between '[]': ...
2
votes
1answer
223 views

How to input '#' in Emacs with UK keyboard on Mac OS X?

I'm using Emacs 24.5.1 in Mac OS X. Recently I had to input £ frequently so I changed my input source from U.S. to British. With British keyboard, Option+3 will yield # in other editors, however, ...
2
votes
0answers
133 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 ...
2
votes
1answer
495 views

Automatically pressing enter and y in emacs when prompted for input

In python.el there is a command (python-shell-switch-to-shell) that opens an ipython shell. Problem is, it first asks me where to start the REPL and then whether to make a dedicated process. I always ...
6
votes
4answers
223 views

press keystroke sequence with elisp

I just installed debian 8 and emacs24. I noticed a new feature! you now can push F11 to enter fullscreen mode. I wanted to put emacs on fullscreen mode at startup, but couldn't find the command... and ...
5
votes
1answer
357 views

log keystrokes with timestamp and other metadata?

If I evaluate this form: (open-dribble-file "/home/joe/keys.log") then type something, Emacs saves what I type to the keys.log file: <return>hellow<backspace> keyloggi<down-mouse-5&...
8
votes
2answers
260 views

Translating strings to keypresses

Given a string in elisp, I'd like to simulate emacs receiving whatever keypresses are necessary to re-create that string. So given the string "Hello" emacs would act exactly the same as if I had ...
4
votes
1answer
121 views

How can I convert a C-key code into a 'normal' key code?

Background With jumping packages like Ace and Avy, you can start a function, provide a query char, and then jump to somewhere based on further input. (Lately I've preferred Avy, but that's irrelevant ...
6
votes
2answers
144 views

A function which acts differently depending on the last keystroke

I would like to define a function which behaves differently depending on the last keystroke. More specifically I would like that it behaves differently if the last keystroke (before the execution of ...
4
votes
0answers
831 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" ) '...
9
votes
1answer
658 views

why doesn't emacs support key up/down events

AFAIK emacs does not support keyup/keydown events, only keypressed. An example of a consequence is that when we want to mark a region we have to first set a mark set-mark-command and can then mark the ...
2
votes
1answer
158 views

How to find the unicode control string received by emacs for a command?

I usually ssh into a machine at my university and run emacs on screen. I want to figure out what unicode strings code for a particular command ? For example when I changed the preferences in my OSX ...
5
votes
1answer
560 views

How to repeat the last n keystrokes?

As described here, by C-x z, I can repeat my last keystroke. How can I repeat my last n keystrokes?
3
votes
1answer
2k views

Control+Meta key is not working

I am using Emacs 24.4 with Ubuntu 14.04. I just discovered that the C-M keyboard sequences are not working in Emacs. For example in elisp-mode the key C-M-left is bound to backward-sexp, but when I ...
4
votes
1answer
1k views

What is the key LFD?

One of the keys Emacs refers to is the key LFD. For example, calc binds that key to calc-over. What key is this?
7
votes
2answers
516 views

Is there a package that can bind S-S (shift-shift) to an interactive function?

IntelliJ has a keybind on a double-tap of Shift. I'm curious if Emacs can emulate this functionality - my first thought was key-chord.el, since it allows double taps of regular keys like qq. But, ...
17
votes
4answers
779 views

Is there a mode for viewing keystroke lossage in realtime?

C-h l shows the lossage help buffer, which shows recent keystrokes. Pressing g appears to revert it, causing it to update. Unfortunately, enabling auto-revert-mode does not change it to update ...