Only in iTerm: .DS_Store diff -aru iTerm.org/PTYSession.m iTerm/PTYSession.m --- iTerm.org/PTYSession.m 2008-10-23 14:14:02.000000000 +0900 +++ iTerm/PTYSession.m 2008-11-30 10:11:10.000000000 +0900 @@ -568,6 +568,19 @@ send_strlen = [keydat length]; } } + else if ((modflag & NSCommandKeyMask) && (unicode != 0x60 && unicode != 0x6E && unicode != NSLeftArrowFunctionKey && unicode != NSRightArrowFunctionKey)) + { + send_str = (unsigned char*)strdup("\x1b "); + send_strlen = 2; + + if ((modflag & NSShiftKeyMask) && (unicode == 0x2C || unicode == 0x2E)) { + send_str[1] = (unsigned char) unicode + 0xF + 1; + } else if ((modflag & NSShiftKeyMask) && (unicode == 0x35)) { + send_str[1] = (unsigned char) unicode - 0xF - 1; + } else { + send_str[1] = (unsigned char) unicode; + } + } else if ((modflag & NSAlternateKeyMask) && ([self optionKey] != OPT_NORMAL)) { @@ -639,6 +652,13 @@ send_str = (unsigned char*)"\037"; // control-/ send_strlen = 1; } + else if (modflag & NSControlKeyMask && + send_strlen == 1 && + send_str[0] == '\'') + { + send_str = (unsigned char*)"\030\037"; // control-' + send_strlen = 2; + } else if (modflag & NSShiftKeyMask && send_strlen == 1 && send_str[0] == '\031') Only in iTerm: PTYSession.m.orig Only in iTerm: build diff -aru iTerm.org/iTermApplication.m iTerm/iTermApplication.m --- iTerm.org/iTermApplication.m 2006-11-07 17:03:08.000000000 +0900 +++ iTerm/iTermApplication.m 2008-11-30 02:01:34.000000000 +0900 @@ -43,7 +43,8 @@ id aWindow; PseudoTerminal *currentTerminal; PTYSession *currentSession; - + unichar unicode; + NSString *keystr; if([anEvent type] == NSKeyDown) { @@ -56,7 +57,11 @@ currentTerminal = [[iTermController sharedInstance] currentTerminal]; currentSession = [currentTerminal currentSession]; - if([currentSession hasKeyMappingForEvent: anEvent highPriority: YES]) + keystr = [anEvent characters]; + + unicode = [keystr length]>0?[keystr characterAtIndex:0]:0; + + if([currentSession hasKeyMappingForEvent: anEvent highPriority: YES] || (([anEvent modifierFlags] & NSCommandKeyMask) && (unicode != 0x60 && unicode != 0x6E && unicode != NSLeftArrowFunctionKey && unicode != NSRightArrowFunctionKey))) [currentSession keyDown: anEvent]; else [super sendEvent: anEvent]; Only in iTerm: patch2