5B04A712174558F100A13BDC /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 5B04A711174558F100A13BDC /* icon.png */; };
5B04A7211747800F00A13BDC /* icon-alt.png in Resources */ = {isa = PBXBuildFile; fileRef = 5B04A7201747800F00A13BDC /* icon-alt.png */; };
5B313F9A17A93D590055C86A /* icon-large.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5B313F9917A93D590055C86A /* icon-large.icns */; };
+ 5B3BD2561D6E144F002C4030 /* Application.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B3BD2551D6E144F002C4030 /* Application.m */; };
5B74989217311B200041971E /* xpc_channels.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B74989117311B200041971E /* xpc_channels.c */; };
5B7498B8173275D10041971E /* xpc_logger.c in Sources */ = {isa = PBXBuildFile; fileRef = 5B7498B7173275D10041971E /* xpc_logger.c */; };
5B7FA5A11754D5DB00264BAC /* LogController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B7FA59F1754D5DB00264BAC /* LogController.m */; };
5B04A711174558F100A13BDC /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = "<group>"; };
5B04A7201747800F00A13BDC /* icon-alt.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-alt.png"; sourceTree = "<group>"; };
5B313F9917A93D590055C86A /* icon-large.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "icon-large.icns"; sourceTree = "<group>"; };
+ 5B3BD2541D6E144F002C4030 /* Application.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Application.h; sourceTree = "<group>"; };
+ 5B3BD2551D6E144F002C4030 /* Application.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Application.m; sourceTree = "<group>"; };
5B74984C172AA3550041971E /* xpc_dispatch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xpc_dispatch.c; sourceTree = "<group>"; };
5B74984E172AA3670041971E /* xpc_dispatch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = xpc_dispatch.h; sourceTree = "<group>"; };
5B74989017311AFC0041971E /* xpc_channels.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = xpc_channels.h; sourceTree = "<group>"; };
5B8D87A41A409E6D008E5702 /* PasswordWindow.xib */,
5B8D87991A406572008E5702 /* Helper.h */,
5B8D879A1A40658B008E5702 /* Helper.m */,
+ 5B3BD2541D6E144F002C4030 /* Application.h */,
+ 5B3BD2551D6E144F002C4030 /* Application.m */,
);
path = strongSwan;
sourceTree = "<group>";
5BD1CCC41726DB0100587077 /* AppDelegate.m in Sources */,
5BD1CCFB1729365F00587077 /* Control.m in Sources */,
5B7FA5A11754D5DB00264BAC /* LogController.m in Sources */,
+ 5B3BD2561D6E144F002C4030 /* Application.m in Sources */,
5B8D879B1A40658B008E5702 /* Helper.m in Sources */,
5B7FA5B01754EBC800264BAC /* ConnController.m in Sources */,
5B7FA5B51754F5AF00264BAC /* PasswordController.m in Sources */,
--- /dev/null
+/*
+ * Copyright (C) 2016 Martin Willi
+ * Copyright (C) 2016 revosec AG
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+@interface Application : NSApplication
+
+@end
--- /dev/null
+/*
+ * Copyright (C) 2016 Martin Willi
+ * Copyright (C) 2016 revosec AG
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#import "Application.h"
+
+@implementation Application
+
+- (void) sendEvent:(NSEvent *)event {
+
+ if ([event type] == NSKeyDown) {
+
+ if (([event modifierFlags] &
+ NSDeviceIndependentModifierFlagsMask) == NSCommandKeyMask) {
+
+ if ([[event charactersIgnoringModifiers] isEqualToString:@"x"]) {
+ if ([self sendAction:@selector(cut:) to:nil from:self])
+ return;
+ }
+ else if ([[event charactersIgnoringModifiers] isEqualToString:@"c"]) {
+ if ([self sendAction:@selector(copy:) to:nil from:self])
+ return;
+ }
+ else if ([[event charactersIgnoringModifiers] isEqualToString:@"v"]) {
+ if ([self sendAction:@selector(paste:) to:nil from:self])
+ return;
+ }
+ else if ([[event charactersIgnoringModifiers] isEqualToString:@"a"]) {
+ if ([self sendAction:@selector(selectAll:) to:nil from:self])
+ return;
+ }
+ }
+ }
+
+ [super sendEvent:event];
+}
+
+@end
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
- <string>NSApplication</string>
+ <string>Application</string>
<key>SMPrivilegedExecutables</key>
<dict>
<key>org.strongswan.charon-xpc</key>