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

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

bug#8680: Cocoa Emacs not mapping Clear key on aluminum keyboards.


From: Michael Marchionna
Subject: bug#8680: Cocoa Emacs not mapping Clear key on aluminum keyboards.
Date: Mon, 16 May 2011 22:07:12 -0700

The newer Mac aluminum keyboards have a "clear" on the keypad group where the 
Num-Lock typically
lives.   This key generates:  keyCode: 71 (0x47), and character: 0xf739.  The 
character 0xf739 maps to
the NSClearLineFunctionKey defined in NSEvent.h.

Since this symbol is not listed in the nsterm.m translation table the clear key 
becomes a dead key.  It can
be mapped to emacs [clear] key with the following change.

diff --git a/src/nsterm.m b/src/nsterm.m
index 91f0cbb..119327d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -87,6 +87,7 @@ static unsigned convert_ns_to_X_keysym[] =
   NSBeginFunctionKey,           0x58,
   NSSelectFunctionKey,          0x60,
   NSPrintFunctionKey,           0x61,
+  NSClearLineFunctionKey,       0x0B,
   NSExecuteFunctionKey,         0x62,
   NSInsertFunctionKey,          0x63,
   NSUndoFunctionKey,            0x65,

This change makes the key respond as it did in Carbon Emacs.






reply via email to

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