echo Emacs keys definitions v2.1b now loaded. ;; imples the file keys.ini set key clear ;;restore key definitions to default take keys.ini ;;load user's favorite key general defaults emacscol ;;IMPLEMENTATION-SPECIFIC ;;; Sean Burke ;;; ;;; My primary goal in putting this file together has been first to make emacs ;;; cursor assignments conform to IBM standards. ;;; Secondly, I have added function key assignments for all the functions ;;; essential to text editing. ;;; An emphasis here has been to make the most basic (or at least most common) ;;; functions on the unshifted function keys. ;;; ;;; My method in doing all this has been, where possible, to use Esc x ;;; sequences to evoke given functions (as opposed to sending the control ;;; codes and keycodes that would evoke that function) in order to avoid ;;; problems arising from differences in bindings, and also in order to keep ;;; telnet, the active termcap, etc., from munging the control codes that are ;;; part of the key-binding for evoking a given function. ;;; ;;; Note, however, that bound key sequences ARE here used in for evoking the ;;; Quit function (^G), Help (on F1), as well as some cursor functions. ;;; All key assignments not based on Esc x [function-name] are marked with ;;; an asterisk, and can be found with find "*" emacs.ini or the equivalent ;;; grep -F expression. I did not use Esc x [function] for these keys because ;;; these keys are typically bound to different functions in different modes, ;;; and having them evoke their function for the main mode would make them ;;; useless in other modes. ;;; ;;; N.B. you may very well have to play with the definitions for Help, ;;; delete, and backspace, either here or in your .emacs file. ;; REVISION HISTORY-- ;; May 89- started out as Andy Lowry's msiem2.ini: ;; "This kermit script maps the IBM-PC keyboard for use with Gnu Emacs. ;; The ALT key is used to generate Meta characters and, in conjunction ;; with the CTRL key, Control-Meta characters. A few other useful ;; mappings are also performed. -- Andy Lowry, May 1989" ;; ;; Oct 1993- v1.0 Function keys added; support for Home, Ctrl-Ins, etc., ;; to make them act in more standard ways. ;; Mapping of Alt-[key] or C-A-[key] onto Esc [key] or Esc C-[key] removed. ;; (commented out, actually.) ;; ;; Dec 93- v2.0a-b Function keys totally rearranged. ;; Jan 1 94- v2.0c -- info moved from C-F3 to C-F2 ;; manual-entry moved from A-F3 to A-F2 ;; search-forward-regexp added, put on C-F3 ;; search-backward-regexp added, put on A-F3 ;; what-cursor-position moved from F11 to S-F11 ;; undo moved from C-F2 to F11 ;; Quit (^G) moved from A-F2 to F12 ;; Shift-Control-uparrw and Shift-Control-downarrow added for simple ;; minibuffer history scrolling ;; ;; ;; Dec 18 94- v2.1c -- ;; Completion feature is heavily used now, altho this makes for less portable ;; code. If a function name fails to be completed, paste in the complete ;; name. ;; ;; Jan 15 1995: By substituting some common cursor-move (and the like) ;; functions invocations with their bindings (e.g., ^@ instead of ;; Esc x set-mark-command) we are now able to use these in the minibuffer. ;; ;; Feb 9 95: ^A replaced with "Esc x be RET l RET" i.e., beginning-of-line ;; this avoids nastiness under "screen" ;;; Exchange ESC and backquote... tilde stays put (shift-backquote) ;;; set key \27 ` ;;; set key ` \27 ;;; BACKSPACE deletes backward one character set key scan \270 \127 ;;* ;;; The following mappings affect certain special keys... all the keys ;;; are duplicated on the numeric keypad when NUM LOCK is off, but ;;; the keypad versions are NOT mapped (string definition space too small ;;; for that) ;;; INSERT toggles overwrite mode set key scan \4434 \27xover\13 ;; for overwrite-mode ;;; DELETE deletes one character *forward* set key scan \4435 \4 ;;* ;;; SHIFT-INSERT yanks from killring (PASTE) set key scan \4946 \25 ;;* ;;; SHIFT-DELETE deletes region into killring (CUT) set key scan \4947 \23 ;;* ;;; CTRL-INSERT copies region into killring (COPY) set key scan \5522 \27w ;;* ;;; HOME/END moves to beginning/end of line set key scan \4423 \1a ;; ;set key scan \4423 \27xbe\13l\13 ;; beginning-of-line set key scan \4431 \5 ;;* ;;; CTRL-HOME/END deletes to beginning/end of line set key scan \5495 \0\1a\23 ;;* ;set key scan \5495 \0\27xbe\13l\13\23 ;;* set key scan \5493 \11 ;;* ;;; PAGEUP/PAGEDOWN scrolls up/down one screen set key scan \4425 \27v ;;* set key scan \4433 \22 ;;* ;;; CTRL-PAGEUP/PAGEDOWN moves point to beginning/end of buffer set key scan \5508 \27< ;;* set key scan \5494 \27> ;;* ;;; ARROW keys move in the appropriate directions set key scan \4424 \16 ;;* set key scan \4427 \2 ;;* set key scan \4432 \14 ;;* set key scan \4429 \6 ;;* ;;; CTRL-LEFT/RIGHT moves to last/next word set key scan \5491 \27b ;;* set key scan \5492 \27f ;;* ;;; CTRL-UP/DOWN moves to last/next paragraph set key scan \5517 \27{ ;;* set key scan \5521 \27} ;;* ;;; Shift-Contrl-UP/DOWN move forward/back thru minibuffer history set key scan \6029 \27p ;;* set key scan \6033 \27n ;;* ;;; My totally random and assbackwards function key assignments. set key scan \315 \8 ;;F1 * set key scan \316 \0 ;;F2 set-mark-command * set key scan \317 \27xsearch-fo\13 ;;F3 search-forward set key scan \318 \24o ;set key scan \318 \27xother-wi\13 ;;F4 other-window set key scan \319 \27xsplit-window-v\13 ;;F5 split-window-vertically set key scan \320 \27xdelete-w\13 ;;F6 delete-window set key scan \321 \27xispell-w\13 ;;F7 ispell-word set key scan \322 \27xfill-par\13 ;;F8 fill-paragraph set key scan \323 \27xfind-file\13 ;;F9 find-file set key scan \324 \27xsave-buffers-k\13 ;;F10 save-buffers-kill-emacs set key scan \389 \27xundo\13 ;;F11 set key scan \390 \7 ;;F12 * set key scan \1374 \27xdescribe-k\13 ;;Ctrl-F1 describe-key set key scan \1375 \27xinfo\13 ;;Ctrl-F2 info set key scan \1376 \27xsearch-forward-r\13 ;;Ctrl-F3 search-forward-regexp set key scan \1377 \27xswitch-to-buffer\13 ;;Ctrl-F4 switch-to-buffer set key scan \1378 \27xenlarge-window\13 ;;Ctrl-F5 enlarge-window set key scan \1379 \27xdelete-other-w\13 ;;Ctrl-F6 delete-other-windows set key scan \1380 \27xispell-b\13 ;;Ctrl-F7 ispell-buffer set key scan \1381 \27xauto-f\13 ;;Ctrl-F8 auto-fill-mode set key scan \1382 \27xinsert-fil\13 ;;Ctrl-F9 insert-file set key scan \1383 \27xsave-b\13 ;;Ctrl-F10 save-buffer set key scan \1417 \27xgoto-l\13 ;;Ctrl-F11 set key scan \1418 \27x\13 ;;Ctrl-F12 set key scan \2408 \27xdescribe-f\13 ;;Alt-F1 describe-function set key scan \2409 \27xmanu\13 ;;Alt-F2 manual-entry set key scan \2410 \27xsearch-backward-r\13 ;;Alt-F3 search-backward-regexp set key scan \2411 \27xlist-bu\13 ;;Alt-F4 list-buffers set key scan \2412 \27xsplit-window-h\13 ;;Alt-F5 split-window-horizonally set key scan \2413 \27xdelete-non\13 ;;Alt-F6 delete-non-matching-lines set key scan \2414 \27xispell-r\13 ;;Alt-F7 ispell-region set key scan \2415 \27xdired\13 ;;Alt-F8 dired set key scan \2416 \27xfind-file-r\13 ;;Alt-F9 file-file-read-only set key scan \2417 \27xset-vis\13 ;;Alt-F10 set-visited-file-name set key scan \2443 \27xwhat-l\13 ;;Alt-F11 what-line set key scan \2444 \27x\13 ;;Alt-F12 set key scan \852 \27xwhe\13 ;;Shift-F1 where-is set key scan \853 \27xexchange-p\13 ;;Shift-F2 exchange-point-and-mark set key scan \854 \27xsearch-b\13 ;;Shift-F3 search-backward set key scan \855 \27xkill-b\13 ;;Shift-F4 kill-buffer set key scan \856 \27xenlarge-window-h\13 ;;Shift-F5 enlarge-window-horizontally set key scan \857 \27xdelete-ma\13 ;;Shift-F6 delete-matching-lines set key scan \858 \27x\13 ;;Shift-F7 set key scan \859 \27xfill-region-as-p\13 ;;Shift-F8 fill-region-as-paragraph set key scan \860 \27xappend-to-f\13 ;;Shift-F9 append-to-file set key scan \861 \27xinsert-buf\13 ;;Shift-F10 insert-buffer set key scan \903 \27xwhat-cur\13 ;;Shift-F11 what-cursor-position set key scan \904 \27x\13 ;;Shift-F12 ;;I've commented these out because all the Fkey bindings are ;; moxing out the keymap space. ;;I'll comment these out as I need them. -sb ;;; ;;; META versions of all the printing characters except uppercase ;;; ;;; letters are generated by using the ALT key. The definition string ;;; ;;; consists of an ESC character followed by the META-ized character. ;;; ;;; The characters are listed roughly left-to-right and top-to-bottom ;;; ;;; as they appear on the keyboard ;;; set key scan \2345 \27` ;;; set key scan \2424 \27\o61 ; need to use char code, since digit ;;; set key scan \2425 \27\o62 ; would not terminate '\27' ;;; set key scan \2426 \27\o63 ;;; set key scan \2427 \27\o64 ;;; set key scan \2428 \27\o65 ;;; set key scan \2429 \27\o66 ;;; set key scan \2430 \27\o67 ;;; set key scan \2431 \27\o70 ;;; set key scan \2432 \27\o71 ;;; set key scan \2433 \27\o60 ;;; set key scan \2434 \27\45 ;;; set key scan \2435 \27= ;;; set key scan \2857 \27~ set key scan \2936 \27! ;;; set key scan \2937 \27@ ;;; set key scan \2938 \27# ;;; set key scan \2939 \27$ ;;; set key scan \2940 \27% ;;; set key scan \2941 \27^ ;;; set key scan \2942 \27& ;;; set key scan \2943 \27* ;;; set key scan \2944 \27( ;;; set key scan \2945 \27) ;;; set key scan \2946 \27_ ;;; set key scan \2947 \27+ ;;; set key scan \2469 \27\9 ;tab ;;; set key scan \2320 \27q ;;; set key scan \2321 \27w ;;; set key scan \2322 \27e ;;; set key scan \2323 \27r ;;; set key scan \2324 \27t ;;; set key scan \2325 \27y set key scan \2326 \27u ;;; set key scan \2327 \27i ;;; set key scan \2328 \27o ;;; set key scan \2329 \27p ;;; set key scan \2330 \27[ ;;; set key scan \2842 \27{ ;;; set key scan \2331 \27] ;;; set key scan \2843 \27} ;;; set key scan \2347 \27\ ;;; set key scan \2859 \27| ;;; set key scan \2334 \27a set key scan \2335 \27s set key scan \2336 \27d ;;; set key scan \2337 \27f ;;; set key scan \2338 \27g ;;; set key scan \2339 \27h ;;; set key scan \2340 \27j ;;; set key scan \2341 \27k set key scan \2342 \27l ;;; set key scan \2343 \27\59 ;semi-colon ;;; set key scan \2855 \27: ;;; set key scan \2344 \27' ;;; set key scan \2856 \27" ;;; set key scan \2348 \27z set key scan \2349 \27x set key scan \2350 \27c ;;; set key scan \2351 \27v ;;; set key scan \2352 \27b ;;; set key scan \2353 \27n ;;; set key scan \2354 \27m ;;; set key scan \2355 \27, ;;; set key scan \2867 \27< ;;; set key scan \2356 \27. ;;; set key scan \2868 \27> ;;; set key scan \2357 \27/ ;;; set key scan \2869 \27? ;;; ;;; ;;; CONTROL-META characters are generated by using both the CTRL and ;;; ;;; ALT keys simultaneously. All the lowercase letters are included. ;;; ;;; The definition string consists of an ESC character followed by ;;; ;;; the control character corresponding to the letter. ;;; set key scan \3344 \27\17 ;;; set key scan \3345 \27\23 ;;; set key scan \3346 \27\5 ;;; set key scan \3347 \27\18 ;;; set key scan \3348 \27\20 ;;; set key scan \3349 \27\25 ;;; set key scan \3350 \27\21 ;;; set key scan \3351 \27\9 ;;; set key scan \3352 \27\15 ;;; set key scan \3353 \27\16 ;;; set key scan \3358 \27\1 ;;; set key scan \3359 \27\19 ;;; set key scan \3360 \27\4 ;;; set key scan \3361 \27\6 ;;; set key scan \3362 \27\7 ;;; set key scan \3363 \27\8 ;;; set key scan \3364 \27\10 ;;; set key scan \3365 \27\11 ;;; set key scan \3366 \27\12 ;;; set key scan \3372 \27\26 ;;; set key scan \3373 \27\24 ;;; set key scan \3374 \27\3 ;;; set key scan \3375 \27\22 ;;; set key scan \3376 \27\2 ;;; set key scan \3377 \27\14 ;;; set key scan \3378 \27\13 ;; ---------------------------------------------------------------------------- ;; PERSONAL PREFERENCES ;;set key scan \390 \27xsearch-forward-regexp\13 ;;F12 ;;set key scan \1418 \27>\27xinsert-file\13~/.signature\13 ;;Ctrl-F12 ;;set key scan \2444 \27x\13 ;;Alt-F12 set key scan \904 \27xrepeat-matching-complex-command\13search-\13y\13 ;;Shift-F12 ;;set key scan \904 \27xsearch-backward-regexp\13 ;;Shift-F12 ;set key scan \3467 \27xsearch-forward-regexp\13\94\91\94M\93\13\1 ;;C-A-F11 ;; above searches for ^[^M] (i.e, line begining with not-M) -- then go ;; to beginning of that line ;;set key scan \3468 \27q\27} ;;C-A-F12 ;set key scan \3468 \27xsearch-forward-regexp\13\94M\91\94e\93\13\1 ;;C-A-F12 ;; above searches for ^M[^e] (i.e., line beginning with M then not-e) ;; then go to beginning of that line