unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jussi Lahdenniemi <jussi@aprikoodi.fi>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Override Windows default Win-* key combinations when using Emacs
Date: Mon, 11 Jan 2016 20:54:16 +0200	[thread overview]
Message-ID: <838u3wkkvb.fsf@gnu.org> (raw)
In-Reply-To: <5691667C.5000009@aprikoodi.fi> (message from Jussi Lahdenniemi on Sat, 9 Jan 2016 21:58:52 +0200)

> Cc: emacs-devel@gnu.org
> From: Jussi Lahdenniemi <jussi@aprikoodi.fi>
> Date: Sat, 9 Jan 2016 21:58:52 +0200
> 
> On 5.1.2016 19.05, Eli Zaretskii wrote:
> > Thank you for your contribution.  It is large enough to require legal
> > paperwork; I can send you the forms off-list if you agree.
> 
> I finished integrating the code more tightly into Emacs sources, 
> removing the need for the additional process and adding functionality 
> for grabbing Alt-based keyboard input (M-tab, M-ESC) in addition to the 
> Windows keys. I also updated the documentation.

Thanks.

> The patch is attached. I decided to place the new functionality in a new 
> file (w32hook.c) - it could have been added to some existing file as well.

I'd prefer not to create a new file, but to have this in w32fns.c.  It
might even allow you to make some functions static.

> -@findex w32-register-hot-key
> -@findex w32-unregister-hot-key
> -  MS-Windows reserves certain key combinations, such as

I'm not sure I understand why you moved this stuff down in the file.
Was something wrong with its original place?  You could make the
changes without moving the stuff, no?

> +   The hotkey registrations always also include all the shift and
> +control modifier combinations for the given hotkey; that is,
> +registering @kbd{s-@key{a}} as a hotkey gives you @kbd{s-@key{A}},
> +@kbd{C-s-@key{a}} and @kbd{C-s-@key{A}} as well.

I believe you meant to use "C-S-" etc. here, for the Shift key (not
"super").

> -		  if (NUMBERP (Vw32_phantom_key_code))
> -		    key = XUINT (Vw32_phantom_key_code) & 255;
> -		  else
> -		    key = VK_SPACE;

It looks like you are removing the support for this feature.  Is it
really not needed anymore?  If so, we should mention this change in
NEWS, and tell there how to achieve the same effect without this
variable.

> +/* The Windows keyboard hook callback */

Comments should have a period at the end of a sentence, and 2 spaces
after that.

> +static LRESULT CALLBACK funhook( int code, WPARAM w, LPARAM l )

A blank between the function name and the left parenthesis, and no
blank after the parenthesis.  Same near the right parenthesis.

I've briefly reviewed the rest of the patch, and it looks OK to me.
Did you make sure the new code doesn't call any API that might be
unavailable on older systems?  We still support Windows 98 and later.

Also, I understand that this code will work on versions of Windows
before v8, is that right?

Thanks.



  reply	other threads:[~2016-01-11 18:54 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 12:51 [PATCH] Override Windows default Win-* key combinations when using Emacs Jussi Lahdenniemi
2016-01-05 13:54 ` Herring, Davis
2016-01-05 17:05   ` Eli Zaretskii
2016-01-05 19:32     ` Jussi Lahdenniemi
2016-01-05 17:05 ` Eli Zaretskii
2016-01-05 19:03   ` Rasmus
2016-01-05 19:17     ` Eli Zaretskii
2016-01-05 19:31       ` Jussi Lahdenniemi
     [not found]     ` <<83d1tf4z0h.fsf@gnu.org>
2016-01-05 19:45       ` Drew Adams
2016-01-05 19:41   ` Jussi Lahdenniemi
2016-01-05 20:01     ` Eli Zaretskii
2016-01-09 19:58   ` Jussi Lahdenniemi
2016-01-11 18:54     ` Eli Zaretskii [this message]
2016-01-12 11:16       ` Jussi Lahdenniemi
2016-01-12 15:08         ` covici
2016-01-13  5:07           ` Jussi Lahdenniemi
2016-01-12 15:54         ` Eli Zaretskii
2016-01-13  5:31           ` Jussi Lahdenniemi
2016-01-13 15:49             ` Eli Zaretskii
2016-01-13  9:16           ` Jussi Lahdenniemi
2016-01-13 11:28             ` Jussi Lahdenniemi
2016-01-13 15:57               ` Eli Zaretskii
2016-01-14 12:49                 ` Jussi Lahdenniemi
2016-01-14 17:10                   ` Jussi Lahdenniemi
2016-01-14 18:07                     ` Eli Zaretskii
2016-01-14 18:15                   ` Eli Zaretskii
2016-01-15  6:56                     ` Jussi Lahdenniemi
2016-01-15  7:52                       ` Jussi Lahdenniemi
2016-01-15  8:08                         ` Windows 9X crash (was: [PATCH] Override Windows default Win-* key combinations when using Emacs) Eli Zaretskii
2016-01-15  9:35                           ` Windows 9X crash Jussi Lahdenniemi
2016-01-15 10:18                             ` Eli Zaretskii
2016-01-15 10:31                               ` Fabrice Popineau
2016-01-15 10:33                               ` Jussi Lahdenniemi
2016-01-16  9:15                                 ` Eli Zaretskii
2016-01-15  9:47                           ` Windows 9X crash (was: [PATCH] Override Windows default Win-* key combinations when using Emacs) Fabrice Popineau
2016-01-15  9:56                             ` Windows 9X crash Jussi Lahdenniemi
2016-01-15 10:19                               ` Eli Zaretskii
2016-01-15  9:23                         ` [PATCH] Override Windows default Win-* key combinations when using Emacs Yuri Khan
2016-01-16  9:58                     ` Eli Zaretskii
2016-01-16 11:00                       ` Jussi Lahdenniemi
2016-01-16 11:41                         ` Eli Zaretskii
2016-02-03 13:59                         ` Jussi Lahdenniemi
2016-02-03 15:42                           ` Eli Zaretskii
2016-02-26 10:55                             ` Eli Zaretskii
2016-02-26 10:59                               ` Jussi Lahdenniemi
2016-02-27 11:34                                 ` Eli Zaretskii
2016-02-28  8:42                                   ` Paul Eggert
2016-02-28 15:50                                     ` Eli Zaretskii
2016-02-28 20:03                                       ` Paul Eggert
2016-02-28 20:10                                         ` Eli Zaretskii
2016-02-28 23:27                                           ` Paul Eggert
2016-02-29  3:31                                             ` Eli Zaretskii
2016-02-29  7:07                                               ` Paul Eggert
2016-02-29 15:52                                                 ` Eli Zaretskii
2016-02-29 19:01                                                   ` Paul Eggert
2016-03-05 10:16                                                     ` Eli Zaretskii
2016-03-08  2:57                                                       ` Paul Eggert
2016-03-08  4:46                                                         ` Clément Pit--Claudel
2016-02-28 23:33                                         ` John Wiegley
2016-02-27  2:11                               ` Lars Ingebrigtsen
2016-02-27  7:47                                 ` Eli Zaretskii
2016-02-28  4:40                                   ` Lars Ingebrigtsen
2016-01-13 15:53             ` Eli Zaretskii
     [not found] <<568BBC58.50702@aprikoodi.fi>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838u3wkkvb.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jussi@aprikoodi.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).