;: -*- emacs-lisp -*-
;:* $Id: keys-sy.el,v 1.1 2003-10-18 00:48:44+10 steve Exp steve $


;:*=======================
;:* Global key bindings
(global-set-key "\C-xw" 'what-line)
(global-set-key [f2] 'undo)
(global-set-key [f3] 'find-file)
;(global-set-key [(super f3)] 'view-file)
(global-set-key [(meta f3)] 'view-file)
(global-set-key [f5] "\M-w")
(global-set-key [f6] "\C-y")
(global-set-key [f7] 'save-buffer)
(global-set-key [f8] 'start-kbd-macro)
(global-set-key [f9] 'end-kbd-macro)
(global-set-key [(control f8)] 'call-last-kbd-macro)

(global-set-key [f11] 'ecb-activate)

;:*=======================
;:* ISO-8859-1 support
(require 'x-compose)
(global-set-key "\C-cm" compose-map)

;:*=======================
;:* cursor into first line with C-pageup
(define-key global-map '(control prior) 'beginning-of-buffer)
(define-key global-map '(control next) 'end-of-buffer)

;:*=======================
;:* Enable menubar accelerators (double-wow!)
(setq menu-accelerator-enabled 'menu-fallback)
(setq menu-accelerator-modifiers '(super))
(setq menu-accelerator-prefix nil)
(define-key global-map [f10] 'accelerate-menu)

;:*=======================
;:* Popup window with buffer list ; from XEmacs FAQ (2.61)
(defun cw-build-buffers ()
  "Popup buffer menu."
  (interactive "@")
  (run-hooks 'activate-menubar-hook)
  (popup-menu (car (find-menu-item current-menubar '("Buffers")))))
(global-set-key '(control !) 'cw-build-buffers)

;:*=======================
;:* keymapping to resize frames
(define-key global-map [(control x) (up)] 'shrink-window)
(define-key global-map [(control x) (down)]  #'(lambda ()
                                                 (interactive "_")
                                                 (shrink-window -3)))
(define-key global-map [(control x) (left)] 'shrink-window-horizontally)
(define-key global-map [(control x) (right)]  #'(lambda ()
                                                  (interactive "_")
                                                  (shrink-window-horizontally -3)))

;:*=======================
;:* bind key to kill-whole-line
(global-set-key '(control ,) 'kill-entire-line)

;:*=======================
;:* Set C-x C-b to use ibuffer
(define-key global-map [(control x) (control b)] 'ibuffer)

;:*=======================
;:* OK, so just who the hell is sending those emails
(define-key global-map [f12] 'from)

;:*=======================
;:* Bind the Euro to a key
(define-key global-map "\C-ce"
  (lambda () 
    (interactive) 
    (insert (make-char 'latin-iso8859-15 #x24))))

;:*=======================
;:* Extra Mouse buttons (wheel etc)
(require 'mwheel)
(define-key global-map [(button4)] 'mwheel-scroll)
(define-key global-map [(button5)] 'mwheel-scroll)
(define-key global-map [(shift button4)] 'mwheel-scroll)
(define-key global-map [(shift button5)] 'mwheel-scroll)

;:*=======================
;:* Numeric keypad
(define-key key-translation-map [kp-divide]     [?/])
(define-key key-translation-map [kp-multiply]   [?*])
(define-key key-translation-map [kp-subtract]   [?-])
(define-key key-translation-map [kp-add]        [?+])
(define-key key-translation-map [kp-enter]     [?\r])
(define-key key-translation-map [kp-decimal]    [?.])
(define-key key-translation-map [kp-begin]   [begin])
(define-key key-translation-map [kp-home]     [home])
(define-key key-translation-map [kp-end]       [end])
(define-key key-translation-map [kp-next]     [next])
(define-key key-translation-map [kp-prior]   [prior])
(define-key key-translation-map [kp-left]     [left])
(define-key key-translation-map [kp-right]   [right])
(define-key key-translation-map [kp-up]         [up])
(define-key key-translation-map [kp-down]     [down])
(define-key key-translation-map [kp-insert] [insert])
(define-key key-translation-map [kp-delete] [delete])
(define-key key-translation-map [kp-0]          [?0])
(define-key key-translation-map [kp-1]          [?1])
(define-key key-translation-map [kp-2]          [?2])
(define-key key-translation-map [kp-3]          [?3])
(define-key key-translation-map [kp-4]          [?4])
(define-key key-translation-map [kp-5]          [?5])
(define-key key-translation-map [kp-6]          [?6])
(define-key key-translation-map [kp-7]          [?7])
(define-key key-translation-map [kp-8]          [?8])
(define-key key-translation-map [kp-9]          [?9])
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
(message "Key maps set successfully")

Created with XEmacs Valid HTML 4.01! Valid CSS!
Copyright © 2003 Steve Youngs
Verbatim copying and distribution is permitted in any medium, providing this notice is preserved.
Last modified: Sun Oct 19 02:40:39 EST 2003