[Comp.Sci.Dept, Utrecht] Note from archiver<at>cs.uu.nl: This page is part of a big collection of Usenet postings, archived here for your convenience. For matters concerning the content of this page, please contact its author(s); use the source, if all else fails. For matters concerning the archive as a whole, please refer to the archive description or contact the archiver.

Subject: Emacs keybinding guide

This article was archived around: 23 May 2006 04:24:41 GMT

All FAQs in Directory: GNU-Emacs-FAQ
All FAQs posted in: comp.emacs
Source: Usenet Version

Archive-name: GNU-Emacs-FAQ/keybindings-pointer Posting-Frequency: 2 times a month URL: http://tiny-tools.sourceforge.net/emacs-keys.html Maintainer: Jari Aalto A T cante net
Announcement: "All you wanted to know about Emacs keybindings" Note, in latest Emacs, the FAQ is available to you via keypress C-h C-f. in XEmacs and older Emacs versions the FAQ is available via C-h F. Document discusses how do you deal with Emacs keybindings. There is step by step instructions how you use your X window's `xmodmap' program to start using emacs better in X. Includes many ready examples and questions and answers compiled from usenet emacs newsgroups. An exerpt from the document 2.1 Foreword to different emacs platforms The old Emacs C-A-S-H-M modifiers map to new syntax like this: old Emacs Emacs 19.30+ and XEmacs19.14+ [C-tab] [(control tab)] [A-1] [(alt ?1)] [S-up] [(shift up)] [H-prior] [(hyper prior)] ;; prior = PgUp [M-f1] [(meta f1)] The [()] syntax works fine between the Emacs and XEmacs, but the symbol names for mouse differ: [(control shift mouse-1)] ;; Emacs name: mouse-1 [(control shift button1up)] ;; XEmacs name: button1up Table of contents 1.0 Document id 1.1 Description 1.2 Required pre-knowledge 1.3 Credits 2.0 Various binding methods 2.1 Foreword to different emacs platforms 2.2 Emacs versions and key binding syntax compatibility table: 2.3 Ethics -- what is the correct way? 2.3.1 Binding syntax recommendations 3.0 Finding the key syntax 3.1 Know your environment first 3.2 The M-x view-lossage command helps you 3.3 Using read-kbd-macro 3.4 Very easy way: just go and use M-x global-set-key 3.5 Using key-description by Kevin Rodgers 4.0 How do I give argument to command when I bind it to key? 4.1 Printing a string by pressing a key 4.2 Running macro by pressing a key 4.3 Running existing user functions 4.4 Running your own lisp function 4.5 Running function by mouse click 4.6 Calling function with different default argument 4.7 Using complex lambda function in key binding 5.0 About key maps 5.1 Before defining the key, you should know about key maps 5.2 Default emacs key maps and packages' key maps 5.3 Prefix keymaps in new emacs versions. 5.4 Prefix key maps in old emacs versions. 5.5 Function-key-map -- where do I need it? 5.6 How to generate C-A-S-H-M modifiers from keyboard keys 5.7 Local-set-key and global-set-key note 6.0 Ascii and non-ascii keys 6.1 Emacs info, Character Type 6.2 General description 6.3 Emacs info, Named ascii characters 6.4 Case study: Why can't I assign key <ESC C-'> ? 6.5 Case study: How to bind a function to Ctrl-? 6.6 Portable keybindings -- command 'emacs -nw' is your friend 7.0 Emacs backspace binding problem 7.1 Recent news and related packages 7.2 Foreword -- background 7.3 Windowed Emacs mapping 7.4 Non-windowed Emacs mapping 7.5 Mapping backspace with 'delete' symbol 8.0 Some article snippets, Q/A 8.1 I can't use C-s and C-q in emacs due to control flow. 8.2 Disable C-s/C-q for flow control? 8.3 Defining keys to isearch map? 8.4 I'm in emacs that doesn't recognize my function keys? 8.5 I don't seem to see the Control-Space sequence 8.6 To get Xterm work with mouse 8.7 Does these vector, notations work only under X ? 8.8 I have troubles running 'screen' (SUN-OS virtual term) and emacs 8.9 Modifying keyboard keys in X 8.10 Win95: swapping ctrl-caps keys ? 8.11 Swap the control and cap keys on Sun sparc 20 machine? 8.12 Xterm -- AIX: Meta key missing in emacs -nw 8.13 HP: meta key missing on 715 and 712? 8.14 HP: there's no Meta key? 8.15 HP: xmodmap settings in PC XCeed 8.16 Could anyone tell me how I could change the meta-key ? 8.17 How can I set Meta key to Alt? 8.18 How can I make the alt key work as the meta key? 8.19 On X window C-SPC says Args out of range #^[nil nil nil 8.20 Carpal tunnel syndrome: Any way to reduce left wrist pain? 8.21 Telnet connection -- backspace ? 8.22 Latin Charset handling ? 8.23 Linux: I can't rebind C-up in terminal window? 8.24 Linux: cursor keys problem 9.0 Xmodmap introduction -- Changing your X environment 9.1 How X key bindings work 9.2 Xmodmap and keysyms -- as explained in the 'xkeycaps' 9.3 Example -- xmodmap for select and kp-f1 9.4 Example -- sun keyboard xmodamp 9.5 Example -- remap the control key 9.5.1 Martin Steppler <steppler AT comnets.rwth-aachen.de> 10.0 Code 10.1 Perl code to remap Meta-Modeswitch 11.0 CASE STUDY -- Connection to remote emacs through Xterm 11.1 Foreword 11.2 The connection does not know my keyboard 11.3 How do I know what a key produces (ascii sequences?) 11.4 Short xmodmap(1) glimpse 11.5 Xev -- Spot your X-events(keys) easily 11.6 Xterm's -xrm switch for key settings, where are the key names? 11.7 Custom xterm -- making xterm to translate character for connection 11.8 Remote emacs setup 11.9 Testing the special Xterm and remote emacs co-operation 11.10 Complete, live, setup -- Modify to personal needs