aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/nsterm.m26
2 files changed, 28 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e2d86b75e57..b30b2163435 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-11-04 Michael Marchionna <tralfaz@pacbell.net>
2
3 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
4 (keyDown): Remap keypad keys to X11 virtual key codes.
5
12012-11-03 Paul Eggert <eggert@cs.ucla.edu> 62012-11-03 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Fix data-loss with --batch (Bug#9574). 8 Fix data-loss with --batch (Bug#9574).
diff --git a/src/nsterm.m b/src/nsterm.m
index 9b2e544c75b..e4621247854 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -100,6 +100,7 @@ static unsigned convert_ns_to_X_keysym[] =
100 NSBeginFunctionKey, 0x58, 100 NSBeginFunctionKey, 0x58,
101 NSSelectFunctionKey, 0x60, 101 NSSelectFunctionKey, 0x60,
102 NSPrintFunctionKey, 0x61, 102 NSPrintFunctionKey, 0x61,
103 NSClearLineFunctionKey, 0x0B,
103 NSExecuteFunctionKey, 0x62, 104 NSExecuteFunctionKey, 0x62,
104 NSInsertFunctionKey, 0x63, 105 NSInsertFunctionKey, 0x63,
105 NSUndoFunctionKey, 0x65, 106 NSUndoFunctionKey, 0x65,
@@ -144,6 +145,23 @@ static unsigned convert_ns_to_X_keysym[] =
144 NSNewlineCharacter, 0x0D, 145 NSNewlineCharacter, 0x0D,
145 NSEnterCharacter, 0x8D, 146 NSEnterCharacter, 0x8D,
146 147
148 0x41, 0xAE, /* KP_Decimal */
149 0x43, 0xAA, /* KP_Multiply */
150 0x45, 0xAB, /* KP_Add */
151 0x4B, 0xAF, /* KP_Divide */
152 0x4E, 0xAD, /* KP_Subtract */
153 0x51, 0xBD, /* KP_Equal */
154 0x52, 0xB0, /* KP_0 */
155 0x53, 0xB1, /* KP_1 */
156 0x54, 0xB2, /* KP_2 */
157 0x55, 0xB3, /* KP_3 */
158 0x56, 0xB4, /* KP_4 */
159 0x57, 0xB5, /* KP_5 */
160 0x58, 0xB6, /* KP_6 */
161 0x59, 0xB7, /* KP_7 */
162 0x5B, 0xB8, /* KP_8 */
163 0x5C, 0xB9, /* KP_9 */
164
147 0x1B, 0x1B /* escape */ 165 0x1B, 0x1B /* escape */
148}; 166};
149 167
@@ -4754,12 +4772,12 @@ not_in_argv (NSString *arg)
4754 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (emacsframe); 4772 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (emacsframe);
4755 int code; 4773 int code;
4756 unsigned fnKeysym = 0; 4774 unsigned fnKeysym = 0;
4757 int flags;
4758 static NSMutableArray *nsEvArray; 4775 static NSMutableArray *nsEvArray;
4759#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 4776#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
4760 static BOOL firstTime = YES; 4777 static BOOL firstTime = YES;
4761#endif 4778#endif
4762 int left_is_none; 4779 int left_is_none;
4780 unsigned int flags = [theEvent modifierFlags];
4763 4781
4764 NSTRACE (keyDown); 4782 NSTRACE (keyDown);
4765 4783
@@ -4810,7 +4828,10 @@ not_in_argv (NSString *arg)
4810 /* (Carbon way: [theEvent keyCode]) */ 4828 /* (Carbon way: [theEvent keyCode]) */
4811 4829
4812 /* is it a "function key"? */ 4830 /* is it a "function key"? */
4813 fnKeysym = ns_convert_key (code); 4831 fnKeysym = (code < 0x00ff && (flags&NSNumericPadKeyMask))
4832 ? ns_convert_key ([theEvent keyCode])
4833 : ns_convert_key (code);
4834
4814 if (fnKeysym) 4835 if (fnKeysym)
4815 { 4836 {
4816 /* COUNTERHACK: map 'Delete' on upper-right main KB to 'Backspace', 4837 /* COUNTERHACK: map 'Delete' on upper-right main KB to 'Backspace',
@@ -4823,7 +4844,6 @@ not_in_argv (NSString *arg)
4823 4844
4824 /* are there modifiers? */ 4845 /* are there modifiers? */
4825 emacs_event->modifiers = 0; 4846 emacs_event->modifiers = 0;
4826 flags = [theEvent modifierFlags];
4827 4847
4828 if (flags & NSHelpKeyMask) 4848 if (flags & NSHelpKeyMask)
4829 emacs_event->modifiers |= hyper_modifier; 4849 emacs_event->modifiers |= hyper_modifier;