Skip to main content
5 votes
Accepted

How can I check if a user has pressed a button while a function is running?

OK, I'll try an expanded answer. The thing is, Emacs Lisp is single-threaded. You can spin more processes, but not inside the Emacs Lisp interpreter. However, the keyboard input that you need to read ...
wvxvw's user avatar
  • 11.4k
4 votes
Accepted

How to provide keyboard input programmatically for org-export-dispatch UI in elisp?

Unless you spend your days exporting org documents I'd stick to the export interface because it's mature and takes care of the little details. If you still want something to bind to a single key, a ...
Muihlinn's user avatar
  • 2,644
3 votes

How can I move to the next logical line with the arrow keys?

Just call next-logical-line: This is identical to next-line, except that it always moves by logical lines instead of visual lines, ignoring the value of the variable line-move-visual.
shynur's user avatar
  • 5,473
3 votes
Accepted

Remapping keyboard accent shortcuts

You're looking for the following two user settings. I think you want at least ns-alternate-modifier none. ns-alternate-modifier is a variable defined in `C source code'. Its value is `super' Original ...
rpluim's user avatar
  • 5,345
3 votes

How can I check if a user has pressed a button while a function is running?

I would go with input-pending-t. From the docs: (input-pending-p &optional CHECK-TIMERS) Return t if command input is currently available with no wait. Actually, the value is nil only if ...
GergelyPolonkai's user avatar
2 votes

compose key stopped working

I experienced the same problem, this is what helped me make it work (although I could not find out why): Generate zh_TW.UTF-8 locale (uncomment in /etc/locale.gen and run locale-gen) Run emacs with ...
G. Eyaeb's user avatar
2 votes

Unicode input from keyboard (QMK) to Emacs

Here is an alternative solution that doesn't need special workarounds. This provides a function to trick emacs so that it accepts the unicode sequence: ;; enable standard linux unicode input (define-...
tristanC's user avatar
2 votes
Accepted

Unicode input from keyboard (QMK) to Emacs

Problem solved (or at least "workarounded"). One way to input a Unicode character on GNU Linux systems is for user to press Ctrl+Shift+U followed by the character-specific code and finally ...
TrentinQuarantino's user avatar
2 votes
Accepted

make macOS terminal emacs keyboard usage consistent with emacs GUI — for meta+shift+up/down

So it turns out that this is due to the macOS Terminal.app missing numerous keyboard text code settings that are present when running the emacs UI. Let me firstly thank @timothy-basanov and his GitHub ...
ldeck's user avatar
  • 225
2 votes
Accepted

How note emacs shortcuts in kbd-style?

C-c C-p This is my preference. You can generate it easily with this: (defun my-insert-kbd (keyseq) "Read key sequence, and insert it with <kbd> markup." ;; Simplified from https:/...
phils's user avatar
  • 51.7k
2 votes
Accepted

Problems using ^ in calc

Looks like you have composed characters (^U is composed to Û). That is usually already controlled by the OS. Just hit the spacebar after typing ^ to get a caret as input character.
Tobias's user avatar
  • 33.3k
2 votes

Why can't I type things such as "?" and "/" in Emacs with my macOS running Brazilian Portuguese input but they do work outside of Emacs?

You must configure your keyboard(s) as follow: In your init.el file configuration add: (setq ns-alternate-modifier 'alt ns-command-modifier 'meta ns-function-modifier '...
Ian's user avatar
  • 1,483
2 votes
Accepted

Is there a manual on which fingers to use when using keyboard keys?

The short answer is no, there's no such manual. A broader answer follows. Touch typing principles should (and can) be applied to the Emacs keybindings. The primary goal of that is to prevent a typist ...
Y. E.'s user avatar
  • 767
1 vote

Is there a way to prevent keyboard echo while entering a password in shell-mode?

If you want Emacs to behave like a terminal, you need to use one of the terminal emulation packages, such as: term, ansi-term, or vterm (and maybe eat, but I've never tried it).
rpluim's user avatar
  • 5,345
1 vote

How can I get rid of the little popup and go back to using dead keys in emacs?

As mentioned in the Emacs Wiki and pointed out in other answers to this question (e.g. here on StackExchange), starting up emacs after disabling ibus (or SCIM) with a command line like this typically ...
StefanW's user avatar
  • 11
1 vote

Right Control key problem when using Emacs remotely - Emacs thinks it's `C-M-`

You’re using some kind of remote desktop viewer in a web browser? It is probably a deliberate feature of the viewer. You’ll have to consult the documentation for that viewer, since this isn’t a ...
db48x's user avatar
  • 18.4k
1 vote
Accepted

How to open Emacs (Terminal) using key combinations?

You can define your own shortcut that executes the command x-terminal-emulator -e emacs -nw
matteol's user avatar
  • 2,038
1 vote
Accepted

How to "swap" only the numerical row of a keyboard inside Emacs?

I don't have access to a Brezilian keyboard. For swapping an ordinary US Qwerty keyboard you can use the following. You can adapt it for any keyboard. (This is essentially the answer https://emacs....
Name's user avatar
  • 7,905
1 vote

Meta-based navigation + shift-selection

The following code works for me: (bind-key "M-a" (lambda () "Move point to the first non-whitespace character on this line. If point was already at that position, move point to ...
AhLeung's user avatar
  • 1,083
1 vote

any 'binding-change-hook'?

I am not aware of any hook before/after new key-bindings but you can add advices to define-key. define-key is the low-level function called by other functions like global-set-key, local-set-key, or ...
Tobias's user avatar
  • 33.3k
1 vote

Unicode input from keyboard (QMK) to Emacs

Based on hyour description, this keyboard sends events which neither the Linux kernel nor the X11-layer understand as "single-key press" and it's instead some higher layer in some toolkit(s) and/or ...
Stefan's user avatar
  • 26.5k
1 vote
Accepted

How does one type <C-menu> or <next> on a keyboard (in Emacs)?

Probably depends on your keyboard. I have a typical US PC keyboard. I don't know whether I have a <menu> key (for C-<menu>). But the <next> key is the key labeled Page Down. To see ...
Drew's user avatar
  • 78k
1 vote
Accepted

Alternative keyboards in Spacemacs

I finally took time to review this by myself. I decided on a solution (provided here) that works reasonably for me but there are many alternatives to tackle that feature. They have obvious trade-offs ...
Trad Dog's user avatar
  • 153
1 vote

Alternative keyboards in Spacemacs

If your purpose is to input Chinese, you could use https://github.com/tumashu/pyim A native Emacs input method written in pure Emacs Lisp. I just add a new backend pyim-dregcache to pyim. So it ...
chen bin's user avatar
  • 4,877

Only top scored, non community-wiki answers of a minimum length are eligible