From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Some problems with key bindings on windows Date: Wed, 22 Mar 2017 17:56:22 +0200 Message-ID: <837f3h71ax.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1490198207 22774 195.159.176.226 (22 Mar 2017 15:56:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Mar 2017 15:56:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: germano carella Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 22 16:56:43 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cqicm-0005KT-Dm for ged-emacs-devel@m.gmane.org; Wed, 22 Mar 2017 16:56:36 +0100 Original-Received: from localhost ([::1]:51759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqics-00084e-DK for ged-emacs-devel@m.gmane.org; Wed, 22 Mar 2017 11:56:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqicf-00080D-Gv for emacs-devel@gnu.org; Wed, 22 Mar 2017 11:56:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqicd-0004Hw-07 for emacs-devel@gnu.org; Wed, 22 Mar 2017 11:56:29 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqicc-0004Hs-Sx; Wed, 22 Mar 2017 11:56:26 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1184 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cqicc-000239-7s; Wed, 22 Mar 2017 11:56:26 -0400 In-reply-to: (message from germano carella on Tue, 21 Mar 2017 13:25:53 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213234 Archived-At: > From: germano carella > Date: Tue, 21 Mar 2017 13:25:53 +0100 > > I’ve emacs 25.1.1 on Windows 10 64 bit. > > I do: > > (setq w32-pass-lwindow-to-system nil) > > (setq w32-lwindow-modifier ‘super) > > Now, pressing left window key doesn’t open cortana. This is ok. > > I tried to set, for example, win+j to a simple function that display a > message. > > (global-set-key (kbd “s-j”) ‘hello) > > Doesn’t work. Win+j is not assigned on Windows, so it should work fine. It works for me on Windows 7, so it's probably specific to Windows 10. I think you will have to use Emacs 26 (from the master branch of the development code), where Emacs can hook the keyboard at a lower level, and thus intercept key combinations that Windows doesn't otherwise let us see. I think you will need to use w32-register-hot-key, as explained in the manual. > An other question: can be capslock and insert key be used as modifier Keys? You will see in the manual that setting w32-enable-caps-lock to nil will let CapsLock produce the symbol 'capslock', which you can then bind as any other function key. As for , you can make the keypad Insert key produce 'kp-insert', if you turn off Num Lock. (Sorry for delay in answering.)