home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
bbs
/
may94
/
util
/
edit
/
jade.lha
/
Jade
/
lisp
/
loadkeys.jlc
< prev
next >
Wrap
Lisp/Scheme
|
1994-04-20
|
6KB
|
21 lines
(setq global-keymap (make-keytab) ctrl-x-keymap (make-keytab) ctrl-x-4-keymap (make-keylist) esc-keymap (make-keytab) ctrl-c-keymap nil unbound-key-hook nil keymap-path (cons global-keymap nil) close-gadget-hook (cons (quote close-window) nil))
(set-buffer-variable (quote keymap-path))
(set-buffer-variable (quote buffer-keymap))
(set-buffer-variable (quote ctrl-c-keymap))
(set-buffer-variable (quote unbound-key-hook))
(setq mark-1 (make-mark) mark-2 (make-mark) mark-3 (make-mark))
(bind-keys global-keymap "up" (quote goto-prev-line) "down" (quote goto-next-line) "left" (quote goto-left-char) "right" (quote goto-right-char) "shift-up" (quote (progn (set-auto-mark) (goto (pos nil 1)))) "shift-down" (quote (progn (set-auto-mark) (goto (pos nil (file-length))))) "shift-left" (quote goto-line-start) "shift-right" (quote goto-line-end) "ctrl-up" (quote prev-screen) "ctrl-down" (quote next-screen) "ctrl-left" (quote (goto (left-char 40))) "ctrl-right" (quote (goto (right-char 40))) "meta-left" (quote (goto (backward-word))) "meta-right" (quote (goto (forward-word))) "meta-up" (quote (goto (prev-paragraph))) "meta-down" (quote (goto (next-paragraph))) "ctrl-tab" (quote (insert "\t")) "shift-tab" (quote goto-prev-tab) "tab" (quote goto-next-tab) "return" (quote split-line) "backspace" (quote (delete-area (prev-char) (cursor-pos))) "del" (quote (delete-area (cursor-pos) (next-char))) "shift-backspace" (quote (write-clip 0 (cut-area (line-start) (cursor-pos)))) "shift-del" (quote (write-clip 0 (cut-area (cursor-pos) (line-end)))) "ctrl-del" (quote (write-clip 0 (cut-area (line-start) (line-start (next-line))))) "ctrl-@" (quote set-auto-mark) "ctrl-a" (quote goto-line-start) "ctrl-b" (quote goto-prev-char) "ctrl-c" (quote (setq next-keymap-path (quote (ctrl-c-keymap)))) "ctrl-d" (quote (delete-area (cursor-pos) (next-char))) "ctrl-e" (quote goto-line-end) "ctrl-f" (quote goto-next-char) "ctrl-h" (quote help) "ctrl-i" (quote insert-block) "ctrl-j" (quote goto-line) "ctrl-k" (quote kill-line) "ctrl-m" (quote block-toggle) "ctrl-M" (quote toggle-rect-blocks) "meta-m" (quote (block-start (cursor-pos))) "meta-M" (quote (block-end (cursor-pos))) "ctrl-n" (quote goto-next-line) "ctrl-o" (quote (progn (split-line) (goto (prev-char)))) "ctrl-p" (quote goto-prev-line) "ctrl-r" (quote (search-backward nil)) "ctrl-R" (quote (search-backward t)) "ctrl-s" (quote (search-forward nil)) "ctrl-S" (quote (search-forward t)) "ctrl-u" (quote add-command-arg) "ctrl-U" (quote clear-command-args) "ctrl-v" (quote next-screen) "ctrl-w" (quote (write-clip 0 (cut-block))) "ctrl-x" (quote (setq next-keymap-path (quote (ctrl-x-keymap)))) "ctrl-y" (quote (insert (read-clip 0))) "ctrl-Y" (quote (insert-rect (read-clip 0))) "ctrl-z" (quote delete-block) "ctrl-." (quote rotate-buffers-forward) "ctrl-," (quote rotate-buffers-backward) "ctrl-space" (quote mark-region) "ctrl-]" (quote abort-recursive-edit) "escape" (quote (setq next-keymap-path (quote (esc-keymap)))) "help" (quote help) "F1" (quote (goto-mark mark-1)) "F2" (quote (goto-mark mark-2)) "F3" (quote (goto-mark mark-3)) "shift-F1" (quote (set-mark mark-1 (cursor-pos) (current-buffer))) "shift-F2" (quote (set-mark mark-2 (cursor-pos) (current-buffer))) "shift-F3" (quote (set-mark mark-3 (cursor-pos) (current-buffer))) "lmb-click1" (quote (goto (mouse-pos))) "lmb-click2" (quote block-toggle) "lmb-move" (quote (goto (mouse-pos))) "rmb-click1" (quote (if (window-asleep-p) (unsleep-window) (sleep-window))) "shift-lmb-click1" (quote block-kill))
(bind-keys ctrl-x-keymap "ctrl-c" (quote save-and-quit) "ctrl-f" (quote find-file) "ctrl-l" (quote downcase-block) "ctrl-r" (quote find-file-read-only) "ctrl-s" (quote save-file) "ctrl-u" (quote upcase-block) "ctrl-v" (quote find-alternate-file) "ctrl-w" (quote save-file-as) "ctrl-x" (quote swap-cursor-and-auto-mark) "0" (quote close-window) "1" (quote close-other-windows) "2" (quote open-window) "4" (quote (setq next-keymap-path (quote (ctrl-x-4-keymap)))) "5" (quote open-window) "b" (quote switch-to-buffer) "h" (quote (progn (block-kill) (block-start (file-start)) (block-end (file-end)))) "i" (quote insert-file) "k" (quote kill-buffer) "o" (quote (set-current-window (next-window) t)) "q" (quote (set-buffer-read-only nil (not (buffer-read-only-p)))) "s" (quote save-some-buffers) "`" (quote next-error))
(bind-keys ctrl-x-4-keymap "ctrl-f" (quote (in-other-window (find-file))) "a" (quote (in-other-window (add-change-log-entry))) "b" (quote (in-other-window (switch-to-buffer))) "f" (quote (in-other-window (find-file))) "h" (quote (in-other-window (help) (help-help))) "i" (quote (in-other-window (info))) "`" (quote (in-other-window (next-error))))
(bind-keys esc-keymap "escape" (quote (prin1 (eval (read (cons 0 (prompt "Eval: ")))) t)) "ctrl-c" (quote (throw (quote exit) nil)) "!" (quote (system (prompt "System: "))) "<" (quote (progn (set-auto-mark) (goto-file-start))) ">" (quote (progn (set-auto-mark) (goto-file-end))) "@" (quote mark-word) "a" (quote add-change-log-entry) "b" (quote (goto (backward-word))) "d" (quote (write-clip 0 (cut-area (cursor-pos) (forward-word)))) "f" (quote (goto (forward-word))) "h" (quote mark-paragraph) "i" (quote (insert "\t")) "l" (quote downcase-word) "m" (quote (goto (indent-pos))) "n" (quote (progn (set-auto-mark) (goto (match-brackets)))) "p" (quote (simple-replace nil)) "P" (quote (simple-replace t)) "u" (quote upcase-word) "v" (quote prev-screen) "w" (quote (write-clip 0 (copy-block))) "x" (quote command-prompt) "[" (quote (goto (prev-paragraph))) "]" (quote (goto (next-paragraph))) "~" (quote (set-buffer-modified nil nil)) "tab" (quote goto-next-tab) "delete" (quote (write-clip 0 (cut-area (cursor-pos) (forward-word)))) "backspace" (quote (write-clip 0 (cut-area (backward-word) (cursor-pos)))) "help" (quote (if (window-asleep-p) (unsleep-window) (sleep-window))))