unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event
       [not found] <177174145.5314.1372381840342.JavaMail.root@nerur.com>
@ 2013-06-28  1:21 ` Kumaran Santhanam
  2016-05-31 20:41   ` Alan Third
  0 siblings, 1 reply; 7+ messages in thread
From: Kumaran Santhanam @ 2013-06-28  1:21 UTC (permalink / raw)
  To: 14736

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''





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event
  2013-06-28  1:21 ` bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event Kumaran Santhanam
@ 2016-05-31 20:41   ` Alan Third
  2021-07-15  6:02     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Third @ 2016-05-31 20:41 UTC (permalink / raw)
  To: Kumaran Santhanam; +Cc: 14736

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event
  2016-05-31 20:41   ` Alan Third
@ 2021-07-15  6:02     ` Lars Ingebrigtsen
  2021-07-25 11:36       ` Alan Third
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-15  6:02 UTC (permalink / raw)
  To: Alan Third; +Cc: Kumaran Santhanam, 14736

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event
  2021-07-15  6:02     ` Lars Ingebrigtsen
@ 2021-07-25 11:36       ` Alan Third
  2021-07-28 15:43         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Third @ 2021-07-25 11:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Kumaran Santhanam, 14736

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event
  2021-07-25 11:36       ` Alan Third
@ 2021-07-28 15:43         ` Lars Ingebrigtsen
  2021-07-30 18:19           ` Alan Third
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-28 15:43 UTC (permalink / raw)
  To: Alan Third; +Cc: Kumaran Santhanam, 14736

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event
  2021-07-28 15:43         ` Lars Ingebrigtsen
@ 2021-07-30 18:19           ` Alan Third
  2021-08-29 20:23             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Third @ 2021-07-30 18:19 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Kumaran Santhanam, 14736

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event
  2021-07-30 18:19           ` Alan Third
@ 2021-08-29 20:23             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-29 20:23 UTC (permalink / raw)
  To: Alan Third; +Cc: Kumaran Santhanam, 14736

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-29 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <177174145.5314.1372381840342.JavaMail.root@nerur.com>
2013-06-28  1:21 ` bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event Kumaran Santhanam
2016-05-31 20:41   ` Alan Third
2021-07-15  6:02     ` Lars Ingebrigtsen
2021-07-25 11:36       ` Alan Third
2021-07-28 15:43         ` Lars Ingebrigtsen
2021-07-30 18:19           ` Alan Third
2021-08-29 20:23             ` Lars Ingebrigtsen

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).