From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Johan Josefsson Newsgroups: gmane.emacs.help Subject: Toggle fullscreen with one key Date: Thu, 17 Mar 2005 23:56:30 GMT Organization: Telia Internet Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111104055 29607 80.91.229.2 (18 Mar 2005 00:00:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Mar 2005 00:00:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 18 01:00:55 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DC4tj-0006ZR-7h for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Mar 2005 00:59:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DC5A6-00082z-RR for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Mar 2005 19:16:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newspeer2.se.telia.net!se.telia.net!masternews.telia.net.!newsc.telia.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: MicroPlanet-Gravity/2.70.2067 Original-Lines: 27 Original-NNTP-Posting-Host: 83.248.61.243 Original-X-Complaints-To: abuse@telia.com Original-X-Trace: newsc.telia.net 1111103790 83.248.61.243 (Fri, 18 Mar 2005 00:56:30 CET) Original-NNTP-Posting-Date: Fri, 18 Mar 2005 00:56:30 CET Original-Xref: shelby.stanford.edu gnu.emacs.help:129357 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:24912 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24912 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