From 404e21cfa7e9d20b7afeac10675b61fab621eeec Mon Sep 17 00:00:00 2001 From: avenjamin Date: Mon, 9 Nov 2009 23:59:05 +0000 Subject: Set keyboard shortcut for Delete button in alert dialogs to command D. Set keyboard shortcut for Truncate button in alert dialog to command T --- Source/TableSource.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/TableSource.m') diff --git a/Source/TableSource.m b/Source/TableSource.m index f09ff64b..4d89ddbf 100644 --- a/Source/TableSource.m +++ b/Source/TableSource.m @@ -358,7 +358,8 @@ reloads the table (performing a new mysql-query) NSArray *buttons = [alert buttons]; // Change the alert's cancel button to have the key equivalent of return - [[buttons objectAtIndex:0] setKeyEquivalent:@""]; + [[buttons objectAtIndex:0] setKeyEquivalent:@"d"]; + [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask]; [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; [alert beginSheetModalForWindow:tableWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removefield"]; @@ -387,7 +388,8 @@ reloads the table (performing a new mysql-query) NSArray *buttons = [alert buttons]; // Change the alert's cancel button to have the key equivalent of return - [[buttons objectAtIndex:0] setKeyEquivalent:@""]; + [[buttons objectAtIndex:0] setKeyEquivalent:@"d"]; + [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask]; [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; [alert beginSheetModalForWindow:tableWindow -- cgit v1.2.3