Fixed: [Issue 2] Accelerators for 'edit' actions do not work
diff --git a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/CommandLauncher.java b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/CommandLauncher.java
new file mode 100644
index 0000000..633567f
--- /dev/null
+++ b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/CommandLauncher.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2012 Google Inc.
+ *
+ * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
+ * Public License v1.0 which accompanies this distribution, and is available at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package com.google.eclipse.terminal.local.ui.view;
+
+import java.util.logging.*;
+
+import org.eclipse.swt.events.*;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.keys.*;
+import org.eclipse.ui.internal.keys.WorkbenchKeyboard.KeyDownFilter;
+import org.eclipse.ui.keys.IBindingService;
+
+/**
+ * @author alruiz@google.com (Alex Ruiz)
+ */
+@SuppressWarnings("restriction")
+class CommandLauncher extends KeyAdapter {
+  private static Logger logger = Logger.getLogger(CommandLauncher.class.getCanonicalName());
+
+  @Override public void keyPressed(KeyEvent e) {
+    if (!e.doit) {
+      return;
+    }
+    IBindingService bindingService = (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+    // Necessary to handle copy/paste/"select all" keyboard accelerators.
+    if (bindingService instanceof BindingService) {
+      KeyDownFilter filter = ((BindingService) bindingService).getKeyboard().getKeyDownFilter();
+      Control focusControl = e.display.getFocusControl();
+      boolean enabled = filter.isEnabled();
+      try {
+        filter.setEnabled(true);
+        filter.handleEvent(copyOf(e));
+      } catch (Throwable t) {
+        logger.log(Level.SEVERE, "Unable to handle event: " + e, t);
+      } finally {
+        if (focusControl == e.display.getFocusControl() && !enabled) {
+          filter.setEnabled(enabled);
+        }
+      }
+    }
+  }
+
+  private Event copyOf(KeyEvent e) {
+    Event event = new Event();
+    event.character = e.character;
+    event.data = e.data;
+    event.display = e.display;
+    event.doit = e.doit;
+    event.keyCode = e.keyCode;
+    event.keyLocation = e.keyLocation;
+    event.stateMask = e.stateMask;
+    event.time = e.time;
+    event.widget = e.widget;
+    return event;
+  }
+}
diff --git a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalWidget.java b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalWidget.java
index 7229294..2777b88 100644
--- a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalWidget.java
+++ b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalWidget.java
@@ -68,6 +68,7 @@
         editActions.update();
       }
     });
+    terminalTextControl.addKeyListener(new CommandLauncher());
   }
 
   private Menu createContextMenu(MenuManager menuManager) {
diff --git a/com.google.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/Accelerators.java b/com.google.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/Accelerators.java
new file mode 100644
index 0000000..1df1bfc
--- /dev/null
+++ b/com.google.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/Accelerators.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2012 Google Inc.
+ *
+ * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
+ * Public License v1.0 which accompanies this distribution, and is available at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.eclipse.tm.internal.terminal.emulator;
+
+import static org.eclipse.jface.bindings.keys.SWTKeySupport.convertKeyStrokeToAccelerator;
+
+import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.swt.SWT;
+
+/**
+ * @author alruiz@google.com (Alex Ruiz)
+ */
+final class Accelerators {
+  static int createEditActionAccelerator(int naturalKey) {
+    int modifierKeys = (SWT.COMMAND == SWT.MOD1) ? SWT.COMMAND : SWT.CONTROL | SWT.SHIFT;
+    KeyStroke keyStroke = KeyStroke.getInstance(modifierKeys, naturalKey);
+    return convertKeyStrokeToAccelerator(keyStroke);
+  }
+
+  private Accelerators() {}
+}
diff --git a/com.google.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java b/com.google.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
index 47acd86..e9617be 100644
--- a/com.google.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
+++ b/com.google.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
@@ -33,6 +33,9 @@
  *******************************************************************************/
 package org.eclipse.tm.internal.terminal.emulator;
 
+import static org.eclipse.jface.bindings.keys.SWTKeySupport.convertEventToUnmodifiedAccelerator;
+import static org.eclipse.tm.internal.terminal.emulator.Accelerators.createEditActionAccelerator;
+
 import java.io.*;
 import java.net.SocketException;
 import java.util.List;
@@ -73,6 +76,10 @@
 {
     protected final static String[] LINE_DELIMITERS = { "\n" }; //$NON-NLS-1$
 
+    private static final int[] EDIT_ACTION_ACCELERATORS = new int[] {
+      createEditActionAccelerator('C'), createEditActionAccelerator('V'), createEditActionAccelerator('A')
+    };
+
     /**
      * This field holds a reference to a TerminalText object that performs all ANSI
      * text processing on data received from the remote host and controls how text is
@@ -773,6 +780,13 @@
         return;
       }
 
+			int accelerator = convertEventToUnmodifiedAccelerator(event);
+			for (int editActionAccelerator : EDIT_ACTION_ACCELERATORS) {
+			  if (editActionAccelerator == accelerator) {
+          return;
+        }
+			}
+
 			// We set the event.doit to false to prevent any further processing of this
 			// key event.  The only reason this is here is because I was seeing the F10
 			// key both send an escape sequence (due to this method) and switch focus