<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cmpitg</id>
	<title>WikEmacs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikemacs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cmpitg"/>
	<link rel="alternate" type="text/html" href="https://wikemacs.org/wiki/Special:Contributions/Cmpitg"/>
	<updated>2026-04-14T12:13:02Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wikemacs.org/index.php?title=Key_Bindings&amp;diff=2823</id>
		<title>Key Bindings</title>
		<link rel="alternate" type="text/html" href="https://wikemacs.org/index.php?title=Key_Bindings&amp;diff=2823"/>
		<updated>2012-05-11T04:00:07Z</updated>

		<summary type="html">&lt;p&gt;Cmpitg: /* Change key bindings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In Emacs, almost any keystroke, optionally combined with one or more modifier keys, or any sequence of such keystrokes, can be &amp;quot;bound&amp;quot; to any [[command]].&lt;br /&gt;
&lt;br /&gt;
== Modifier keys naming convention ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Modifier key&lt;br /&gt;
! Abbr.&lt;br /&gt;
! Remarks&lt;br /&gt;
! Example&lt;br /&gt;
! Action&lt;br /&gt;
|-&lt;br /&gt;
| Alt&lt;br /&gt;
| A&lt;br /&gt;
| Relatively seldom used in Emacs, because Meta is often &amp;quot;logically&amp;quot; mapped to the &amp;quot;physical&amp;quot; &amp;lt;tt&amp;gt;Alt&amp;lt;/tt&amp;gt; key.&lt;br /&gt;
| A-x&lt;br /&gt;
| Type &amp;quot;x&amp;quot; while holding down the (non-Meta) Alt key&lt;br /&gt;
|-&lt;br /&gt;
| Control&lt;br /&gt;
| C&lt;br /&gt;
| &lt;br /&gt;
| C-x C-f&lt;br /&gt;
| While holding down Ctrl, type first &amp;quot;x&amp;quot; then &amp;quot;f&amp;quot;. (This runs the command &amp;lt;tt&amp;gt;find-file&amp;lt;/tt&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| Hyper&lt;br /&gt;
| h&lt;br /&gt;
| Often not mapped to any key (by default).&lt;br /&gt;
| h-x&lt;br /&gt;
| Type &amp;quot;x&amp;quot; while holding down hyper&lt;br /&gt;
|-&lt;br /&gt;
| Meta&lt;br /&gt;
| M&lt;br /&gt;
| Often mapped to &amp;lt;tt&amp;gt;Alt&amp;lt;/tt&amp;gt; on your keyboard&lt;br /&gt;
| M-x find-file RET&lt;br /&gt;
| Either:&lt;br /&gt;
* type &amp;quot;x&amp;quot; while holding down Meta, or&lt;br /&gt;
* type &amp;quot;Esc&amp;quot; then &amp;quot;x&amp;quot;&lt;br /&gt;
(M-x activates the [[minibuffer]])&lt;br /&gt;
&lt;br /&gt;
Then type &amp;quot;find-file&amp;quot; in the minibuffer, then Return.&lt;br /&gt;
|-&lt;br /&gt;
| Shift&lt;br /&gt;
| S&lt;br /&gt;
| &lt;br /&gt;
| S-x&lt;br /&gt;
| Type &amp;quot;x&amp;quot; while holding down Shift&lt;br /&gt;
|-&lt;br /&gt;
| Super&lt;br /&gt;
| s&lt;br /&gt;
| On OS X this is the Command ⌘ key.&lt;br /&gt;
On other systems often not mapped to any key by default, or to &amp;lt;tt&amp;gt;Window&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;Menu&amp;lt;/tt&amp;gt; if present&lt;br /&gt;
| s-x&lt;br /&gt;
| Type &amp;quot;x&amp;quot; while holding down super&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
By convention, when multiple modifiers are specified, they go in alphabetical order: {{Keys|C-M-x}} not {{Keys|M-C-x}}.&lt;br /&gt;
&lt;br /&gt;
== Printable cheat sheet for popular modes ==&lt;br /&gt;
Emacs ships with cheat sheets of common and useful key bindings.&lt;br /&gt;
The {{File|pdf}} files are located in the {{Directory|refcards}} subdirectory of {{Variable|data-directory}}.&lt;br /&gt;
&lt;br /&gt;
== Change key bindings ==&lt;br /&gt;
&lt;br /&gt;
You can add, remove and change key bindings for any command by using the Emacs Lisp function &amp;lt;code&amp;gt;global-set-key&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;local-set-key&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; {{Command|global-set-key}} or {{Command|local-set-key}}&lt;br /&gt;
: Hit the key sequence you want to bind&lt;br /&gt;
: Type the command to bind to that key sequence&lt;br /&gt;
: Invoke {{Keys|C-x ESC ESC|repeat-complex-command}}. The output you see is the full lisp command which does the binding.  You can copy this to your {{EmacsConfigFile}}.&lt;br /&gt;
&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;global-set-key&amp;lt;/code&amp;gt; bind keys globally (i.e. &amp;lt;code&amp;gt;global-mode-map&amp;lt;/code&amp;gt;), which means other modes would override key bindings set by &amp;lt;code&amp;gt;global-set-key&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;local-set-key&amp;lt;/code&amp;gt; bind keys in the current buffer [[major mode]], which affects all buffers sharing the mode.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.masteringemacs.org/articles/2011/02/08/mastering-key-bindings-emacs/ Mastering Keybindings in Emacs]&lt;br /&gt;
&lt;br /&gt;
[[Category:Customization]]&lt;br /&gt;
[[Category:Key Concepts]]&lt;/div&gt;</summary>
		<author><name>Cmpitg</name></author>
	</entry>
</feed>