Subject: Re: bug#44973: Add a macOS global hotkey function

From: Eli Zaretskii <[email-masked]>
Date: Wed, 30 Dec 2020 19:08:46 +0200

> From: [email-masked]
> Date: Tue, 29 Dec 2020 20:10:00 -0800
> Cc: [email-masked]
> 
> Here is the patch to bind a global hotkey in mac. As long as Emacs is set as
> "trusted" in macOS preferences, the user can bind a two-key hotkey of the
> form [modifier-key] or a single-key modifier [function key], for example
> (mac-bind-global-hotkey [f1] 'tetris). Binding a three-key
> combo is left to a future patch. 
> 
> The code is copied from w32-register-hot-key as much as possible.

Hmm...  w32-register-hot-key is not for binding Emacs commands to
platform-specific keys, it is so that the OS doesn't catch some key
combinations ahead of Emacs.  That is, by using w32-register-hot-key
you make the key combination available for binding to a command using
global-set-key and the likes.

By contrast, it sounds like your patch is for letting users bind
platform-specific key sequences to Emacs commands, which is something
quite different.  What is the rationale for adding this functionality
to Emacs?