On Mac OS X, the "Insert" key on external keyboards is mapped to "Help". Therefore, when the "Insert" key is pressed, the mouse cursor turns into a question mark and the key is not passed to Emacs to process. This is problematic because users may have keybindings from Linux and Windows that make use of the "Insert" key. The VIM project was able to resolve this issue by using the following code in the sendEvent method: <code> // HACK! Intercept 'help' key presses and clear the 'help key flag', else // Cocoa turns the mouse cursor into a question mark and goes into 'context // help mode' (the keyDown: event itself never reaches the text view). By // clearing the 'help key flag' this event will be treated like a normal // key event. if ((NSKeyDown == type || NSKeyUp == type) && (flags & NSHelpKeyMask)) { flags &= ~NSHelpKeyMask; event = [NSEvent keyEventWithType:[event type] location:[event locationInWindow] modifierFlags:flags timestamp:[event timestamp] windowNumber:[event windowNumber] context:[event context] characters:[event characters] charactersIgnoringModifiers:[event charactersIgnoringModifiers] isARepeat:[event isARepeat] keyCode:[event keyCode]]; </code> The full source is here: https://code.google.com/p/macvim/source/browse/trunk/MMApplication.m It would be a great benefit to users if this patch could be included in the upcoming point release. Thanks, Kumaran ----- In GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-12 on bob.porkrind.org Windowing system distributor `Apple', version 10.3.1187 Configured using: `configure '--host=x86_64-apple-darwin' '--build=i686-apple-darwin' '--with-ns' 'build_alias=i686-apple-darwin' 'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.7 -isystem /Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -F/Users/david/Xcode-10.7_4.5.2/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks''
Kumaran Santhanam <kumaran@alumni.stanford.org> writes:
> On Mac OS X, the "Insert" key on external keyboards is mapped to
> "Help". Therefore, when the "Insert" key is pressed, the mouse cursor
> turns into a question mark and the key is not passed to Emacs to
> process. This is problematic because users may have keybindings from
> Linux and Windows that make use of the "Insert" key.
Confirmed as still present in Emacs 25.
Is there some use for the "help" key and question-mark pointer?
Interestingly, it looks like on recent Apple keyboards "insert" is
replaced with fn instead of help.
--
Alan Third
Alan Third <alan@idiocy.org> writes: > Kumaran Santhanam <kumaran@alumni.stanford.org> writes: > >> On Mac OS X, the "Insert" key on external keyboards is mapped to >> "Help". Therefore, when the "Insert" key is pressed, the mouse cursor >> turns into a question mark and the key is not passed to Emacs to >> process. This is problematic because users may have keybindings from >> Linux and Windows that make use of the "Insert" key. > > Confirmed as still present in Emacs 25. > > Is there some use for the "help" key and question-mark pointer? > > Interestingly, it looks like on recent Apple keyboards "insert" is > replaced with fn instead of help. I don't have an external keyboard for my Apple laptop, so I can't test myself. Is this issue still present in newer versions of Emacs/Macos? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Alan Third <alan@idiocy.org> writes:
>
>> Kumaran Santhanam <kumaran@alumni.stanford.org> writes:
>>
>>> On Mac OS X, the "Insert" key on external keyboards is mapped to
>>> "Help". Therefore, when the "Insert" key is pressed, the mouse cursor
>>> turns into a question mark and the key is not passed to Emacs to
>>> process. This is problematic because users may have keybindings from
>>> Linux and Windows that make use of the "Insert" key.
>>
>> Confirmed as still present in Emacs 25.
>>
>> Is there some use for the "help" key and question-mark pointer?
>>
>> Interestingly, it looks like on recent Apple keyboards "insert" is
>> replaced with fn instead of help.
>
> I don't have an external keyboard for my Apple laptop, so I can't test
> myself. Is this issue still present in newer versions of Emacs/Macos?
Apparently fn-return should be equivalent. I can't check it right now
though.
--
Alan Third
Alan Third <alan@idiocy.org> writes: > Apparently fn-return should be equivalent. I can't check it right now > though. And I'm away from home and don't have access to a Mac laptop this week. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
On Wed, Jul 28, 2021 at 05:43:12PM +0200, Lars Ingebrigtsen wrote:
> Alan Third <alan@idiocy.org> writes:
>
> > Apparently fn-return should be equivalent. I can't check it right now
> > though.
>
> And I'm away from home and don't have access to a Mac laptop this week.
> :-)
I finally tried it on mine and it did exactly nothing.
--
Alan Third
Alan Third <alan@idiocy.org> writes: > On Wed, Jul 28, 2021 at 05:43:12PM +0200, Lars Ingebrigtsen wrote: >> Alan Third <alan@idiocy.org> writes: >> >> > Apparently fn-return should be equivalent. I can't check it right now >> > though. >> >> And I'm away from home and don't have access to a Mac laptop this week. >> :-) > > I finally tried it on mine and it did exactly nothing. So... it sounds like the original reported problem is gone, at least? So I'm closing this bug report, but perhaps the Insert key should do something... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no