Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In short, this should solve the problem for you:</p> <pre><code>(setq local-function-key-map (delq '(kp-tab . [9]) local-function-key-map)) (global-set-key (kbd "C-i") 'forward-word) </code></pre> <p>Longer version:</p> <p>From the emacs lisp documentation on <a href="http://www.gnu.org/software/emacs/elisp/html_node/Function-Keys.html" rel="noreferrer">function keys</a>:</p> <blockquote> <p>In ASCII, C-i and &lt;TAB> are the same character. If the terminal can distinguish between them, Emacs conveys the distinction to Lisp programs by representing the former as the integer 9, and the latter as the symbol tab.</p> <p>Most of the time, it's not useful to distinguish the two. So normally local-function-key-map (see Translation Keymaps) is set up to map tab into 9. Thus, a key binding for character code 9 (the character C-i) also applies to tab. Likewise for the other symbols in this group. The function read-char likewise converts these events into characters.</p> </blockquote> <p>So, once you do the following, you can see the difference in the key bindings:</p> <pre><code>(setq local-function-key-map (delq '(kp-tab . [9]) local-function-key-map)) ;; this is C-i (global-set-key (kbd "C-i") (lambda () (interactive) (message "C-i"))) ;; this is &lt;tab&gt; key (global-set-key (kbd "&lt;tab&gt;") (lambda () (interactive) (message "&lt;tab&gt;"))) </code></pre> <p>Note, each mode sets up the various <kbd>TAB</kbd> bindings differently, so you may need to do customization per mode that you care about.</p> <p><strong>Version Dependency</strong>:</p> <p>The above works for Emacs 23.1. From the NEWS file:</p> <blockquote> <p>Function key sequences are now mapped using `local-function-key-map', a new variable. This inherits from the global variable function-key-map, which is not used directly any more.</p> </blockquote> <p>Which means, in versions 22 and earlier, you can get the same effect by using the variable <code>function-key-map</code>. I tested this and found it to work with Emacs 21.</p> <pre><code>(setq local-function-key-map (delq '(kp-tab . [9]) function-key-map)) (global-set-key (kbd "C-i") 'forward-word) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload