Click the heading for a list of pages related to this category.
Keys, or KeySequences, in Emacs are bound to Commands. Even a simple key like
‘s’ is bound to a command (usually command
For information on setting actions to mouse buttons, the mouse wheel, or mouse movements, see CategoryMouse, a subset of this category (CategoryKeys).
For information on emulating other systems and software like ViKeys or CopyAndPaste bindings, see CategoryEmulation.
For more information on using menus, see CategoryMenus.
Discovery: What keys are available now, and what do they do?
- To find out what command is invoked by a given key, use
‘C-h k’ (command
- To see which keys are bound to a given command, use
‘C-h w’ (command
- To see the currently bound keys, use
‘C-h b’ (command
- Icicles - Key Completion – Complete a key sequence. Show on-the-fly help about the currently available keys and their commands (including menu bar menus). See which are prefix keys and which are bound locally.
which-key – Show help for current key bindings when you pause
- SearchKeybind -
‘occur’-like search of the list of current keys & their commands.
- Show Bindings – Display key bindings.
- PKB (Print Key-Bindings) – Print key bindings in a pretty fashion, i.e. so that bindings are listed as on a computer keyboard and grouped by keyboard base-keys.
See also: MenuAccessFromKeyboard: using menus from the keyboard.
Bind your own keys: keyboard, mouse, or menu
Dealing with modifier keys
MenuAccessFromKeyboard provides info about using menus from the keyboard (without the mouse). A summary:
Solutions to common problems
- BackspaceKey – How to make it right
- KeyboardRate – Change keyboard rate from emacs.
- MissingKeys – How to make undefined keys accessible
- ConsoleKeys – Emacs keys on the Linux console, even C-M-H-internet
- FreeBSDConsoleKeys – Fix minor issues on the FreeBSD console with a new keymap
- ScreenKeys – Similar to the above, for screen(1)
- BindingControlReturn – How to bind Control-Return in a local mode
- OpeningQuote – How to type
‘this’ easily on keyboards where only ‘ is easily accessed
- TabKey – How to change the behaviour of the TAB key
- iTerm2 – For OSX users who use ssh, allows you to bind custom keys to escape sequences really easily
- Accelerate – Change the behaviour of a command when its key is auto-repeated
- Lisp:speedkey.el – Create a set of keybindings easily, with a help text
- keymap-unset-key – Find keys that overlap in some keymaps and rebind them
‘RET’ – If your version of Emacs does not bind
<return> to anything, do this: – AlexSchroeder
(global-set-key (kbd "<return>") (kbd "RET"))
- XModMap – Keys to work outside of Emacs as well; the X Windowing System uses xmodmap and xev, or xkeycaps
- LoadKeys – Same thing, but for the Linux console using loadkeys, dumpkeys, and showkey
- XKeyCaps – Graphical tool by JamieZawinski
- DefineKeyLazy a macro for define-key ,without writing (eval-after-load)
- next-line-2.0 A keybinding that makes C-n and C-p work well with large buffers and long, wrapped, lines.
- Lisp:setup-keys.el – Various key bindings, some for custom commands. See DrewsElispLibraries for associated command libraries.
- RepeatKeyDifferentBehaviors– Binding multiple commands to the same key, for use sequentially
- DoReMi – Use the arrow keys and mouse wheel to repeat commands, run commands in sequence, increment things, or cycle through enumerations.
- BackwardKillLine – Same effect as
‘C-u’ on a terminal; or
‘C-k’ in the opposite direction.
- QuickYes –
‘M-y’ shortcut to answer
- ReplaceRecentCharacter – To quickly correct recent typing error
- Lisp:minibuf-electric-gnuemacs.el – The one feature I used to miss under GNU Emacs, was the “electric” behavior for C-x C-f and other file-finding commands (under XEmacs, typing a slash or tilde first erases the default value in the MiniBuffer). Now it’s available for GNU Emacs too!
- BackwardDeleteWord – Binding M-backspace to delete instead of kill.
- Lisp:singlebind.el – Bind commands to single characters
- ErgoMovementMode – Ergonomic movement commands: M-jikl
- FastNav – Multiple commands to support quick jump to, replace at, kill at, etc. the next/previous occurences of characters.
- Lisp:smartrep.el – Support sequential operation which omitted prefix keys.
- Lisp:unbound.el – Find convenient unbound key sequences
- Keycentric – centralizing keybindings into one place.
- In GNU Emacs, the ignored part of the filename is visible after typing a slash or tilde, at least until completion is performed with TAB. With the CVS version of GNU Emacs, the behaviour of XEmacs can be approximated by using
(file-name-shadow-mode 1) and customizing either
file-name-shadow-tty-properties. – MattHodges
Bindings Inspired by MeatBall:HumaneInterface
There is also some very creative suggestions for keyboard tweaking in the Ratpoison (a window manager for X11) Wiki that might be of interest to Emacs users as well: