*** DarwiinRemote0.5-src/AppController.m Fri Mar 9 01:55:48 2007 --- DarwiinRemote0.5_keymod-src/AppController.m Sat Jun 9 11:43:00 2007 *************** *** 83,89 **** - (id)init{ ! modes = [[NSArray arrayWithObjects:@"Nothing", @"Key", @"\tReturn", @"\tTab", @"\tEsc", @"\tBackspace", @"\tUp", @"\tDown", @"\tLeft",@"\tRight", @"\tPage Up", @"\tPage Down", @"\tF1", @"\tF2", @"\tF3", @"\tF4", @"\tF5", @"\tF6", @"\tF7", @"\tF8", @"\tF9", @"\tF10", @"\tF11", @"\tF12", @"Left Click", @"Left Click2", @"Right Click", @"Right Click2", @"Toggle Mouse (Motion)", @"Toggle Mouse (IR)",nil] retain]; id transformer = [[[WidgetsEnableTransformer alloc] init] autorelease]; --- 83,89 ---- - (id)init{ ! modes = [[NSArray arrayWithObjects:@"Nothing", @"Key", @"\tReturn", @"\tTab", @"\tEsc", @"\tBackspace", @"\tUp", @"\tDown", @"\tLeft",@"\tRight", @"\tPage Up", @"\tPage Down", @"\tF1", @"\tF2", @"\tF3", @"\tF4", @"\tF5", @"\tF6", @"\tF7", @"\tF8", @"\tF9", @"\tF10", @"\tF11", @"\tF12", @"Left Click", @"Left Click2", @"Right Click", @"Right Click2", @"Toggle Mouse (Motion)", @"Toggle Mouse (IR)", @"\tHome", @"\tEnd", nil] retain]; id transformer = [[[WidgetsEnableTransformer alloc] init] autorelease]; *************** *** 476,481 **** --- 476,491 ---- [self sendKeyboardEvent:121 keyDown:isPressed]; + }else if ([modeName isEqualToString:@"\tHome"]){ + [self sendModifierKeys:map isPressed:isPressed]; + + [self sendKeyboardEvent:115 keyDown:isPressed]; + + }else if ([modeName isEqualToString:@"\tEnd"]){ + [self sendModifierKeys:map isPressed:isPressed]; + + [self sendKeyboardEvent:119 keyDown:isPressed]; + }else if ([modeName isEqualToString:@"\tF1"]){ [self sendModifierKeys:map isPressed:isPressed]; *************** *** 1126,1131 **** --- 1136,1209 ---- [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.two.option"]; [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.two.shift"]; [config setValue:[[NSNumber alloc] initWithInt:29] forKeyPath:@"wiimote.two.mode"]; + + config = [self createNewConfigration:@"Keynote"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.up.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.up.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.up.option"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.up.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:10] forKeyPath:@"wiimote.up.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.down.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.down.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.down.option"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.down.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:11] forKeyPath:@"wiimote.down.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.left.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.left.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.left.option"]; + [config setValue:[[NSNumber alloc] initWithBool:YES] forKeyPath:@"wiimote.left.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:8] forKeyPath:@"wiimote.left.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.right.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.right.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.right.option"]; + [config setValue:[[NSNumber alloc] initWithBool:YES] forKeyPath:@"wiimote.right.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:9] forKeyPath:@"wiimote.right.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.a.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.a.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.a.option"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.a.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:24] forKeyPath:@"wiimote.a.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.b.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.b.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.b.option"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.b.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:29] forKeyPath:@"wiimote.b.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.plus.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.plus.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.plus.option"]; + [config setValue:[[NSNumber alloc] initWithBool:YES] forKeyPath:@"wiimote.plus.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:7] forKeyPath:@"wiimote.plus.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.minus.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.minus.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.minus.option"]; + [config setValue:[[NSNumber alloc] initWithBool:YES] forKeyPath:@"wiimote.minus.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:6] forKeyPath:@"wiimote.minus.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.home.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.home.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.home.option"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.home.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:30] forKeyPath:@"wiimote.home.mode"]; + + [config setValue:[[NSNumber alloc] initWithBool:YES] forKeyPath:@"wiimote.one.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.one.control"]; + [config setValue:[[NSNumber alloc] initWithBool:YES] forKeyPath:@"wiimote.one.option"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.one.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:1] forKeyPath:@"wiimote.one.mode"]; + [config setValue:@"p" forKeyPath:@"wiimote.one.character"]; + + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.two.command"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.two.control"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.two.option"]; + [config setValue:[[NSNumber alloc] initWithBool:NO] forKeyPath:@"wiimote.two.shift"]; + [config setValue:[[NSNumber alloc] initWithInt:4] forKeyPath:@"wiimote.two.mode"]; } [appDelegate saveAction:nil];