Add support for Jacob's new cursor-key modifier flags in the OS X frontend.

[originally from svn r5847]
This commit is contained in:
Simon Tatham
2005-05-26 17:12:04 +00:00
parent a0f376efbd
commit c82820e55b

12
osx.m
View File

@ -589,22 +589,34 @@ struct frontend {
* function key codes.
*/
if (c >= 0x80) {
int mods = FALSE;
switch (c) {
case NSUpArrowFunctionKey:
c = CURSOR_UP;
mods = TRUE;
break;
case NSDownArrowFunctionKey:
c = CURSOR_DOWN;
mods = TRUE;
break;
case NSLeftArrowFunctionKey:
c = CURSOR_LEFT;
mods = TRUE;
break;
case NSRightArrowFunctionKey:
c = CURSOR_RIGHT;
mods = TRUE;
break;
default:
continue;
}
if (mods) {
if ([ev modifierFlags] & NSShiftKeyMask)
c |= MOD_SHFT;
if ([ev modifierFlags] & NSControlKeyMask)
c |= MOD_CTRL;
}
}
if (c >= '0' && c <= '9' && ([ev modifierFlags] & NSNumericPadKeyMask))