  ("<f2>"        . modi/toggle-menu-bar)
  ;; F8 key can't be used as it launches the VNC menu
  ;; It can though be used with shift/ctrl/alt keys
- ("<S-f8>"      . toggle-presentation-mode)
+ ("<S-f8>"      . presentation-mode)
  ;; Make Control+mousewheel do increase/decrease font-size
  ;; Source: http://ergoemacs.org/emacs/emacs_mouse_wheel_config.html
  ("<C-mouse-1>" . modi/font-size-reset) ; C + left mouse click

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Presentation mode
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq presentation-mode-enabled nil)

(defun presentation-mode ()
  "Set frame size, theme and fonts suitable for presentation."
  (interactive)
  (setq font-size-pt 13)
  (set-face-attribute 'default nil :height (* font-size-pt 10))
  (set-frame-position (selected-frame) 0 0) ;; pixels x y from upper left
  (set-frame-size (selected-frame) 80 25)  ;; rows and columns w h
  (funcall default-light-theme) ;; change to default light theme
  (delete-other-windows)
  (setq presentation-mode-enabled t)
  )

(defun coding-zombie-mode ()
  "Revert to default coding mode."
  (interactive)
  (setq font-size-pt default-font-size-pt)
  (set-face-attribute 'default nil :height (* font-size-pt 10))
  (full-screen-center)
  (funcall default-theme) ;; change to default theme
  (split-window-right)
  (setq presentation-mode-enabled nil)
  )

(defun toggle-presentation-mode ()
  "Toggle between presentation and default mode."
  (interactive)
  (if presentation-mode-enabled
      (coding-zombie-mode)
    (presentation-mode)))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; FIXME: Make this activate only if one window is open
;; See http://bzg.fr/emacs-hide-mode-line.html
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-minor-mode hidden-mode-line-mode
  "Minor mode to hide the mode-line in the current buffer."
  :init-value nil
