From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kumaran Santhanam Newsgroups: gmane.emacs.bugs Subject: bug#14736: 24.3; "Insert" key results in question mark mouse cursor and does not send a keyboard event Date: Thu, 27 Jun 2013 18:21:04 -0700 (PDT) Message-ID: <1832345773.5319.1372382464778.JavaMail.root@nerur.com> References: <177174145.5314.1372381840342.JavaMail.root@nerur.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1372382772 29234 80.91.229.3 (28 Jun 2013 01:26:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Jun 2013 01:26:12 +0000 (UTC) To: 14736@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 28 03:26:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UsNRy-0003ss-Ua for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2013 03:26:11 +0200 Original-Received: from localhost ([::1]:41716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsNRy-0006Bj-Hx for geb-bug-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 21:26:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsNRt-0006Be-Rg for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2013 21:26:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsNRr-0001wd-0b for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2013 21:26:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsNRq-0001wU-TJ for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2013 21:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UsNRq-00067R-L1 for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2013 21:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kumaran Santhanam Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2013 01:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137238273323440 (code B ref -1); Fri, 28 Jun 2013 01:26:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jun 2013 01:25:33 +0000 Original-Received: from localhost ([127.0.0.1]:45902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UsNRL-00065z-AZ for submit@debbugs.gnu.org; Thu, 27 Jun 2013 21:25:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40670) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UsNNS-0005yL-5G for submit@debbugs.gnu.org; Thu, 27 Jun 2013 21:21:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsNNI-0000Ro-J0 for submit@debbugs.gnu.org; Thu, 27 Jun 2013 21:21:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsNNI-0000Rk-Gt for submit@debbugs.gnu.org; Thu, 27 Jun 2013 21:21:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsNND-0005gf-Q5 for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2013 21:21:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsNN9-00008s-3P for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2013 21:21:15 -0400 Original-Received: from na3sys009aog122.obsmtp.com ([74.125.149.147]:48618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsNN8-00005h-RN for bug-gnu-emacs@gnu.org; Thu, 27 Jun 2013 21:21:11 -0400 Original-Received: from mail.nerur.com ([173.228.91.168]) (using TLSv1) by na3sys009aob122.postini.com ([74.125.148.12]) with SMTP ID DSNKUczlAotvC0ORkU71zlSRKvdU5GH0ojYs@postini.com; Thu, 27 Jun 2013 18:21:10 PDT In-Reply-To: <177174145.5314.1372381840342.JavaMail.root@nerur.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Thu, 27 Jun 2013 21:25:29 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75668 Archived-At: 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: // 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]]; 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''