   (setq rdebug-window-configuration-state state))
 
 
+;; -- Common key support.
+
+(defun rdebug-populate-common-keys (map)
+  "Define the keys that are used by all debugger windows, even by the source."
+  ;; TODO: Redirect to different variants (or none).
+  (rdebug-populate-common-keys-standard map))
+
+
+(defun rdebug-populate-common-keys-standard (map)
+  "The key layout used by many debuggers."
+  (define-key map [f5]    'gud-cont)
+  (define-key map [S-f5]  'rdebug-quit)
+  (define-key map [f9]    'gud-break)
+  (define-key map [f10]   'gud-next)
+  (define-key map [f11]   'gud-step)
+  (define-key map [S-f11] 'gud-finish))
+
+
+;; -- The debugger
+
 ;;;###autoload
 (defun rdebug (command-line)
   "Run rdebug on program FILE in buffer *rdebug-cmd-FILE*.

    (define-key map [mouse-2] 'rdebug-variables-edit-mouse)
    (define-key map [mouse-3] 'rdebug-variables-edit-mouse)
    (define-key map "q" 'kill-this-buffer)
    (rdebug-secondary-buffer-populate-map map)
     map))

(defun rdebug-variables-mode ()

;; -- breakpoints

(defvar rdebug-breakpoints-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map [mouse-2] 'rdebug-goto-breakpoint-mouse)
    (define-key map " " 'rdebug-toggle-breakpoint)
    (define-key map [? ] 'rdebug-toggle-breakpoint)
    (define-key map [(control m)] 'rdebug-goto-breakpoint)
    (define-key map [?d] 'rdebug-delete-breakpoint)
    (rdebug-populate-secondary-buffer-map map)
    (define-key map [menu-bar debugger breakpoints delete]
      '(menu-item "Delete breakpoint" rdebug-delete-breakpoint))
    map)
  "Keymap to navigate/set/enable rdebug breakpoints.")

