;; Tastaturbelegung
; deutsche Einstellungen  (;;; -> 50user-de.el)
;;;(standard-display-european t)
;;;(set-input-mode (car (current-input-mode))
;;;                (nth 1 (current-input-mode))
;;;		0)

;;;(global-set-key [delete]      'delete-char)
;;;(global-set-key [home]        'beginning-of-line)
;;;(global-set-key [end]         'end-of-line)

(global-set-key [f1]          'info)
(global-set-key [f2]          'save-buffer)
(global-set-key [f3]          'find-file)
(global-set-key [f9]          'compile)
(global-set-key [f12]         'goto-line)

; dem Emacs an der Konsole <Ctrl-?> beibringen:
(define-key function-key-map "\M-[\C-d"  '[C-left])
(define-key function-key-map "\M-[\C-c"  '[C-right])
(define-key function-key-map "\M-[5#" '[C-prior])
(define-key function-key-map "\M-[6#" '[C-next])
(global-set-key [C-prior]     'beginning-of-buffer)
(global-set-key [C-next]      'end-of-buffer)

; und nun die Tasten auch belegen:
(global-set-key [C-f6]        'switch-to-buffer)
(global-set-key [C-left]      'backward-word)
(global-set-key [C-right]     'forward-word)
(global-set-key [M-left]      'backward-sentence)
(global-set-key [M-right]     'forward-sentence)
(global-set-key [C-prior]     'beginning-of-buffer)
(global-set-key [C-next]      'end-of-buffer)

(global-set-key [C-backspace] 'backward-kill-word)
(global-set-key [C-delete]    'kill-word)
(global-set-key [M-backspace] 'backward-kill-sentence)
(global-set-key [M-delete]    'kill-sentence)

  (defun see-chars ()
    "Display events received, terminated by a 3-second timeout."
    (interactive)
    (let (chars
          (inhibit-quit t))
      (message "Enter characters or other events, terminated by a 3-second
  timeout.")
      (while (not (sit-for 3))
        (setq chars (nconc chars (list (read-event)))
              quit-flag nil)              ; quit-flag might be set by C-g.
        (if (not (input-pending-p))
            (message "Events received until now: %s..."
                     (key-description chars))))
      (message "Events received: %s" (key-description chars))))

