mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
32 lines
652 B
Objective-C
32 lines
652 B
Objective-C
//
|
|
// PBCommitList.m
|
|
// GitX
|
|
//
|
|
// Created by Pieter de Bie on 9/11/08.
|
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import "PBCommitList.h"
|
|
|
|
|
|
@implementation PBCommitList
|
|
|
|
- (void) keyDown: (id) event
|
|
{
|
|
NSString* character = [event charactersIgnoringModifiers];
|
|
|
|
if ([character isEqualToString:@" "])
|
|
{
|
|
if ([event modifierFlags] & NSShiftKeyMask)
|
|
[webView scrollPageUp: self];
|
|
else
|
|
[webView scrollPageDown: self];
|
|
}
|
|
else if ([character rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"jkcv"]].location == 0)
|
|
[webController sendKey: character];
|
|
else
|
|
[super keyDown: event];
|
|
}
|
|
|
|
@end
|