From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.help Subject: Re: How to bind -; with a function on windows? Date: Sun, 26 Oct 2008 23:13:29 +0100 Message-ID: References: <0pudnRRrfsDCBJnUnZ2dnUVZ_v7inZ2d@sysmatrix.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1225059247 30594 80.91.229.12 (26 Oct 2008 22:14:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Oct 2008 22:14:07 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "B. T. Raven" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 26 23:15:08 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KuDt3-0007PH-Et for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Oct 2008 23:15:05 +0100 Original-Received: from localhost ([127.0.0.1]:46585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuDrx-0002Kg-Gm for geh-help-gnu-emacs@m.gmane.org; Sun, 26 Oct 2008 18:13:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KuDrY-0002Gu-BU for help-gnu-emacs@gnu.org; Sun, 26 Oct 2008 18:13:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KuDrX-0002FP-3q for help-gnu-emacs@gnu.org; Sun, 26 Oct 2008 18:13:31 -0400 Original-Received: from [199.232.76.173] (port=41698 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuDrW-0002FM-VD for help-gnu-emacs@gnu.org; Sun, 26 Oct 2008 18:13:30 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.153]:28441) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KuDrW-0002fr-KX for help-gnu-emacs@gnu.org; Sun, 26 Oct 2008 18:13:31 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l26so1812752fgb.30 for ; Sun, 26 Oct 2008 15:13:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=/1+7+/C2KpWMx9qzCxu9WszyPaX+5pV7tVlvZP9mpXo=; b=AIBs6Kd2zU9cAByFOgmN/1x53XR3UN0oKBjIu1zXxCSP26qfe3h+emfDyY3DTZM26D 05RajAsmdxYtXoEnI12L3yZisgAkEHCbf9q2soGKdI8zIEdi/E3MCFOynT2HSvm4Hv3i 5uDFcYUaQV4jXsMrEr5z4bexHqhzPrP8KrkCs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=kRkUfHIko/0EoL4ZIeMy4Le27VMS51DvEBkXOZG5gu9EapGZXRQ5zNhusT8OCh/Lz1 gmaRv9MpmoxcBCnFTkxGorfoz7cs49t2c6rks/W3nn6gkXt9kLsTyDfb4+S27+aE0ivl KUFPyJP2HVwOOcD7ARNJaGAqKcjPAtQY/GUwo= Original-Received: by 10.86.27.19 with SMTP id a19mr2553282fga.68.1225059209530; Sun, 26 Oct 2008 15:13:29 -0700 (PDT) Original-Received: by 10.86.65.3 with HTTP; Sun, 26 Oct 2008 15:13:29 -0700 (PDT) In-Reply-To: <0pudnRRrfsDCBJnUnZ2dnUVZ_v7inZ2d@sysmatrix.net> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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 Xref: news.gmane.org gmane.emacs.help:59177 Archived-At: On Sun, Oct 26, 2008 at 5:23 PM, B. T. Raven wrote: > anhnmncb wrote: >> >> When I type M-x global-set-key RET, then press , the help >> window pops up and show: >> >> runs the command ignore, which is an interactive compiled >> Lisp function in `subr.el'. >> >> It is bound to , , , >> . >> >> I have no chance to press -; to function. Type them in emacs >> window just produce a ;. >> >> >> > > If you put this in your .emacs: > > (setq w32-pass-lwindow-to-system nil > w32-pass-rwindow-to-system nil > w32-pass-apps-to-system nil > w32-lwindow-modifier 'super ;; Left Windows > w32-rwindow-modifier 'super ;; Right Windows > w32-apps-modifier 'hyper) ;; App-Menu (key to right of Right > Windows) > > then you will be able to use these bottom row keys as modifiers but you > still won't be able to bind a function to the bare key (lwindow for > example). You could however bind the function to Super- [a through z] or > even combinations of Ctl, Meta, Super, and Hyper: > > (global-set-key [(super w)] 'foo) > > As Lennart notes there are some combinations that Windows will trap at the > OS level but some of these are useful. Alt-tab will switch focus between > emacs and some other app from which you may want to copy-paste for example. There are more combinations than Alt-Tab that Windows will trap. For example on my pc if I do (global-set-key [(super ?e)] (lambda() (interactive) (message "called super E"))) This does not work, lwindow+e will still show Windows Explorer. That is correct according to MS documentation which says you can not rely on rebinding lwindow/rwindow without a low level keyboard hook. Sometimes it works, sometimes it doesn't.