[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Toggle fullscreen with one key
From: |
Johan Josefsson |
Subject: |
Toggle fullscreen with one key |
Date: |
Thu, 17 Mar 2005 23:56:30 GMT |
User-agent: |
MicroPlanet-Gravity/2.70.2067 |
I am currently using two keys (f2 and C-f2) and two functions for
maximizing and restoring the frame in win32:
--- functions
(defun my-frame-maximize () "Maximize Emacs window in win32"
(interactive)
(w32-send-sys-command ?\xf030))
(defun my-frame-restore () "Restore Emacs window in win32"
(interactive)
(w32-send-sys-command ?\xF120))
--- keys
(global-set-key [f2] 'my-frame-maximize) ; Maximize Emacs window
(global-set-key [C-f2] 'my-frame-restore) ; Restore Emacs window
---
It works as intended, but I wonder, is there any simple way to replace
these two keys with a function that use only one key (f2) to toggle
between these two states?
Thanks,
Johan
- Toggle fullscreen with one key,
Johan Josefsson <=