15 votes
Accepted

Using function keys as "sticky" modifier keys

If your workflow is: Press and release F8 Press and release s, expect it to trigger the binding for s-s Whatever key you press afterwards does not have the s modifier unless you press F8 again then ...
Gilles 'SO- stop being evil''s user avatar
4 votes

Emacs super key modifier on Caps Lock in Windows native and Cygwin emacs-w32

I feel your pain. Coming up with a decent hyper/super key binding which will work across all my keyboards is an ongoing search, especially given the widely varying laptop keyboard layouts. I dislike ...
Philip Daniels's user avatar
4 votes
Accepted

Open several files in a specifc layout with a shortcut

It will be necessary to decide ahead of time what windows/buffers will be A, B and C. The alist argument for the left window-width can be adjusted to taste -- it is presently hard-coded to 70. This ...
lawlist's user avatar
  • 18.6k
4 votes
Accepted

M-< and M-> don't appear to work

Sounds like either something has bound those keys to some other commands, or else emacs is actually seeing something other the M-< and M-> when you press the keys on your keyboard. To find out ...
user1978698's user avatar
4 votes
Accepted

Typing composite characters (e.g. diacritics) in emacs

This is a Dead Keys problem, and it's mentioned in the Emacs wiki. All the workarounds explained there solve the issue.
C2H5OH's user avatar
  • 181
3 votes

My left alt key (OS X) does not work as Meta key in Emacs (terminal)

After making sure the right alt key is setup in the Terminal app as @junnu suggested, you can do the following to free up the right option key for the special characters you need: (setq mac-right-...
EFLS's user avatar
  • 1,502
3 votes
Accepted

I want to type special Spanish characters in Emacs on a MacBook Pro keyboard ... but I have no clue where to start

Short answer: C-u C\ spanish-prefix RET. The characters you mentioned can then be typed as ~? => ¿ ~! => ¡ Long answer: read the emacs documentation starting at Language Environments, plus the ...
rpluim's user avatar
  • 4,477
3 votes
Accepted

Capital A Meaning in Emacs Syntax?

Emacs recognizes 5 modifier keys (arguably 6 depending on how you feel about Shift): <Control> (C-), <Meta> (M-), <Super> (s-), <Hyper> (H-), and <Alt> (A-). This ...
D. Gillis's user avatar
  • 416
3 votes
Accepted

Accessing square bracket in Emacs with German Keyboard on Macbook with OS X

I have run into this issue before - also trying to use Emacs on OS X with a German keyboard for (C/C++) programming. My solution to this issue was to use the Command key as Meta and pass Option ...
Timo Geusch's user avatar
3 votes
Accepted

How to remap the meta key on Linux?

The following elisp may help you out. Just add it to your config. (setq x-meta-keysym 'super)
Compro Prasad's user avatar
3 votes
Accepted

How to preserve emacs key bindings when changing keyboard layout?

As far as I understand your question the key-translation-map seems like a good soultion for your problem. For example if you would like to have C-q acting like C-a as in your example, you would define ...
clemera's user avatar
  • 3,391
3 votes
Accepted

Diacritic marks in emacs for macOS

But on macs keyboard it is no distinction between left and right option key ⌥ as it is in Win (Alt and Alt+Gr). Yes, there is. You have the variables ns-alternate-modifier and ns-right-alternate-...
d125q's user avatar
  • 1,343
2 votes

Generate dynamic keybindings depending on keyboard layout

This is not exactly a complete answer to your question, but it may help you as a starting point. My evil-colemak-basics provides Qwerty/Colemak best-of-both-worlds key bindings: https://github.com/...
wouter bolsterlee's user avatar
2 votes
Accepted

Names of all the keymaps for multilanguage remapping purposes

The question is flawed: A keymap does not necessarily have a name. A keymap can be a list - see the Elisp manual, node Format of Keymaps - and there need not be any name associated with the list. ...
Drew's user avatar
  • 74.6k
2 votes

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

Placing the following snippet in user-init-file (~/.emacs.d/init.el in my case) worked for me. I also set ctrl-insert and shift-insert to copy/paste. (when (eq system-type 'darwin) ;; when using ...
ValG's user avatar
  • 21
2 votes

Accessing square bracket in Emacs with German Keyboard on Macbook with OS X

To change the meta key you can look at the variables ns-command-modifier, ns-option-modifier, ns-control-modifier, ns-right-command-modifier, ns-right-option-modifier, ns-right-control-modifier. On ...
amitp's user avatar
  • 2,431
2 votes
Accepted

How to insert special characters not on a US/UK keyboard?

I have the following in my init.el to use the italian layout with Mac OS ;; Command key is Meta (setq ns-command-modifier 'meta) ;; Option (alt) key used for special characters (e.g. []@#{}...) (setq ...
matteol's user avatar
  • 1,823
2 votes

I want to type special Spanish characters in Emacs on a MacBook Pro keyboard ... but I have no clue where to start

I just found out this is how you do it: (setq ns-alternate-modifier nil) I was instead using the insert-chart bound to C-x 8 which is very painful edit: thank you all for the interest xD I'm native ...
Daniel Baez's user avatar
2 votes
Accepted

German input method: missing ' (single quote)

Created my own layout, german-t1, simply by adding to ~/.emacs: ;; T1 German keyboard layout without AltGR and without <> (see ;; <https://emacs.stackexchange.com/a/47487/5327>): (quail-...
feklee's user avatar
  • 1,009
2 votes
Accepted

US-Intl layout EU users of Emacs in WSL - how do you input those Alt-Gr characters?

Just found this issue, looking around the internet I came across this page, and the solution is at the bottom, basically you have to set the keyboard mapping with the following command on the Debian ...
Skalas's user avatar
  • 36
1 vote

Keyboard map in X version of Emacs not respecting system map

Odd solution. In Manjaro I'd inadvertently set the Japanese keyboard layout. X emacs was respecting that setting, whereas the console version, and all other X apps were perhaps following locale.
Tony Martin's user avatar
1 vote

Bind Meta key to Command on Mac Without Altering its System-wide Behaviour

In non-windows mode, changes to ns-* variables (such as ns-alternate-modifier and ns-command-modifier) are ignored. In particular, if the -nw option is passed as argument to emacs, the logic that ...
anon2328's user avatar
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
  • 74.6k
1 vote
Accepted

In MacOS, is there any way to have native Mac layout for ‘option-something’ special symbols in quoted-insert?

As I learned that Emacs enters native special symbols if Option isn't mapped to Meta, I went ahead and made a wrapper for quoted-insert that does the unmapping: (defun my/quoted-insert-wrapper (arg) ...
aaa's user avatar
  • 394
1 vote

My left alt key (OS X) does not work as Meta key in Emacs (terminal)

http://osxdaily.com/2013/02/01/use-option-as-meta-key-in-mac-os-x-terminal/ Open Terminal and pull down the primary Terminal menu to choose “Preferences” Under the “Settings” section, find your ...
junnu's user avatar
  • 770
1 vote

Keyboard layout changed but I don't know why

You can use C-h l (command view-lossage) to see the last few key sequences (including mouse actions) that you used, plus their associated commands. C-h k C-h l tells you: view-lossage is an ...
Drew's user avatar
  • 74.6k
1 vote

Fix org-mode agenda viewing of stuck projects with UK keyboard #

You can use M-3 instead of # as part of a key definition. Use something like this in your .emacs: ;; fix agenda command with # for UK keyboard (define-key org-mode-map (kbd "C-c a M-3") 'org-agenda-...
rxmd's user avatar
  • 21
1 vote

Use xcape-like Control_L=Escape only in Emacs evil insert-mode?

I found a workaround, inspired by the comment by Håkon Hægland in Leave evil insert mode with control key First make a keycode for VoidSymbol with xmodmap (xcape can only work on keysyms that have ...
unhammer's user avatar
  • 1,107
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
  • 32.1k

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