bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44973: Add a macOS global hotkey function


From: Eli Zaretskii
Subject: bug#44973: Add a macOS global hotkey function
Date: Wed, 30 Dec 2020 19:08:46 +0200

> From: j@mremus.net
> Date: Tue, 29 Dec 2020 20:10:00 -0800
> Cc: 44973@debbugs.gnu.org
> 
> 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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]