[LyX/master] #8055 use standard shortcut for font-emph on Mac

Richard Kimberly Heck rikiheck at lyx.org
Mon Feb 15 16:20:35 UTC 2021


On 2/15/21 10:36 AM, Scott Kostyshak wrote:
> On Mon, Feb 15, 2021 at 10:31:38AM -0500, Richard Kimberly Heck wrote:
>> On 2/15/21 10:24 AM, Scott Kostyshak wrote:
>>> On Mon, Feb 15, 2021 at 09:32:01AM +0100, Stephan Witt wrote:
>>>> commit a9342ae098024e363891653d1bcf7a8d485a271c
>>>> Author: Stephan Witt <switt at lyx.org>
>>>> Date:   Mon Feb 15 09:35:31 2021 +0100
>>>>
>>>>     #8055 use standard shortcut for font-emph on Mac
>>>> ---
>>>>  lib/bind/mac.bind |    5 ++---
>>>>  1 files changed, 2 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/lib/bind/mac.bind b/lib/bind/mac.bind
>>>> index 8d54e4c..531465b 100644
>>>> --- a/lib/bind/mac.bind
>>>> +++ b/lib/bind/mac.bind
>>>> @@ -141,7 +141,6 @@ Format 5
>>>>  \bind "C-S-D"                        "buffer-update dvi"	# 'd' for dvi
>>>>  #  +: "Command-E"                    # Use the selection for a find
>>>>  \bind "C-e"                          "search-string-set"
>>>> -\bind "C-M-e"                        "font-emph"
>>>>  #  +: "Command-F"                    # Open a Find window
>>>>  \bind "C-f"                          "dialog-toggle findreplace"
>>>>  \bind "C-S-f"                        "dialog-toggle findreplaceadv"
>>>> @@ -152,8 +151,8 @@ Format 5
>>>>  \bind "C-S-g"                        "word-find-backward"
>>>>  #  +: "Command-H"                    # Hide the windows of the currently running application
>>>>  #  +: "Option-Command-H"             # Hide the windows of all other running applications
>>>> -#  -: "Command-I"                    # Italicize the selected text or toggle italic text on or off
>>>> -\bind "C-i"                          "inset-toggle" # 'i' for Inset
>>>> +#  +: "Command-I"                    # Italicize the selected text or toggle italic text on or off
>>>> +\bind "C-i"                          "command-alternatives inset-toggle; font-emph" # 'i' for Inset
>>>>  \bind "C-M-i"                        "inset-settings"
>>>>  #  -: "Option-Command-I"             # Display an inspector window
>>>>  #  -: "Command-J"                    # Scroll to a selection
>>> I think this could have problems when both inset-toggle and font-emph
>>> are valid. For example, create a footnote and write text inside. Then
>>> put the cursor inside and run the command-alternatives.
>>>
>>> I don't think the C-e binding is a Linux/Windows-specific binding.
>>> Rather, I think it's a LaTeX thing. I believe the idea is that the user
>>> or document class can redefine what it means to "emphasize" text from
>>> italics to something else.
>>>
>>> I do think that a fair amount new users are confused by C-e (instead of
>>> C-i), but I have surprisingly seen few complaints so perhaps adapting is
>>> not too difficult.
>> Good catch. Stephan, I think it would be fine to re-assign inset-toggle.
>> I don't think it works terribly reliably anyway.
> I use inset-toggle often. Can you remember a specific situation where it
> is not reliable?

I was thinking of use in front of insets like citations.

But I didn't mean to get rid of it, just to re-assign it. I think most
users would expect Ctrl-I to do emphasis. Indeed, I've swapped Ctrl-I
and Ctrl-E locally.

Riki





More information about the lyx-devel mailing list