Fixed: [Issue 6] Key bindings do not work under Linux
diff --git a/com.google.eclipse.terminal.local/plugin.xml b/com.google.eclipse.terminal.local/plugin.xml
index b67dea9..b5ceb8b 100644
--- a/com.google.eclipse.terminal.local/plugin.xml
+++ b/com.google.eclipse.terminal.local/plugin.xml
@@ -98,7 +98,7 @@
          point="org.eclipse.ui.contexts">
       <context
             description="In Local Terminal"
-            id="com.google.eclipse.terminal.local.localTerminalView"
+            id="com.google.eclipse.terminal.local.context.localTerminal"
             name="Local Terminal"
             parentId="org.eclipse.ui.contexts.window">
       </context>
@@ -111,6 +111,11 @@
       </category>
       <command
             categoryId="com.google.eclipse.terminal.local.commands.category"
+            id="com.google.eclipse.terminal.local.copy"
+            name="Copy">
+      </command>
+      <command
+            categoryId="com.google.eclipse.terminal.local.commands.category"
             id="com.google.eclipse.terminal.local.paste"
             name="Paste">
       </command>
@@ -118,12 +123,31 @@
    <extension
          point="org.eclipse.ui.bindings">
       <key
+            commandId="com.google.eclipse.terminal.local.copy"
+            contextId="com.google.eclipse.terminal.local.context.localTerminal"
+            platform="carbon"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+C">
+      </key>
+      <key
+            commandId="com.google.eclipse.terminal.local.copy"
+            contextId="com.google.eclipse.terminal.local.context.localTerminal"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+M2+C">
+      </key>
+      <key
             commandId="com.google.eclipse.terminal.local.paste"
-            contextId="org.eclipse.ui.contexts.window"
+            contextId="com.google.eclipse.terminal.local.context.localTerminal"
             platform="carbon"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
             sequence="M1+V">
       </key>
+      <key
+            commandId="com.google.eclipse.terminal.local.paste"
+            contextId="com.google.eclipse.terminal.local.context.localTerminal"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+M2+V">
+      </key>
    </extension>
 
 </plugin>
diff --git a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/PopupMenuFactory.java b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/PopupMenu.java
similarity index 95%
rename from com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/PopupMenuFactory.java
rename to com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/PopupMenu.java
index eb38bf7..e26fc77 100644
--- a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/PopupMenuFactory.java
+++ b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/PopupMenu.java
@@ -29,7 +29,9 @@
   PopupMenu(IViewSite viewSite, VT100TerminalControl terminalControl) {
     PopupMenuManager menuManager = new PopupMenuManager();
     copy = menuManager.add(new TerminalActionCopy(terminalControl));
+    copy.setActionDefinitionId("com.google.eclipse.terminal.local.copy");
     paste = menuManager.add(new TerminalActionPaste(terminalControl));
+    paste.setActionDefinitionId("com.google.eclipse.terminal.local.paste");
     menuManager.add(new Separator());
     selectAll = menuManager.add(new TerminalActionSelectAll(terminalControl));
     clearAll = menuManager.add(new TerminalActionClearAll(terminalControl));
@@ -37,8 +39,8 @@
     actionBars.setGlobalActionHandler(COPY.getId(), copy);
     actionBars.setGlobalActionHandler(PASTE.getId(), paste);
     actionBars.setGlobalActionHandler(SELECT_ALL.getId(), selectAll);
-    paste.setActionDefinitionId("com.google.eclipse.terminal.local.paste");
     IKeyBindingService keyBindingService = viewSite.getKeyBindingService();
+    keyBindingService.registerAction(copy);
     keyBindingService.registerAction(paste);
     menuManager.addMenuListener(new IMenuListener() {
       @Override public void menuAboutToShow(IMenuManager manager) {
diff --git a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java
index 4175c61..2a1d9b8 100644
--- a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java
+++ b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/ui/view/TerminalView.java
@@ -30,6 +30,7 @@
 import org.eclipse.tm.internal.terminal.control.ITerminalListener;
 import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
 import org.eclipse.ui.*;
+import org.eclipse.ui.contexts.*;
 import org.eclipse.ui.part.ViewPart;
 import org.eclipse.ui.progress.UIJob;
 
@@ -58,6 +59,8 @@
   private boolean checkCanBeClosed;
   private boolean forceClose;
 
+  private IContextActivation contextActivation;
+
   public static void openTerminalView(IPath workingDirectory) {
     openTerminalView(null, workingDirectory);
   }
@@ -136,6 +139,10 @@
     JFaceResources.getFontRegistry().addListener(textFontChangeListener);
     updateFont();
     setupToolBarActions();
+    IContextService contextService = contextService();
+    if (contextService != null) {
+      contextActivation = contextService.activateContext("com.google.eclipse.terminal.local.context.localTerminal");
+    }
     if (savedState != null) {
       updateScrollLockUsingSavedState();
       connectUsingSavedState();
@@ -244,6 +251,12 @@
   }
 
   @Override public void dispose() {
+    if (contextActivation != null) {
+      IContextService contextService = contextService();
+      if (contextService != null) {
+        contextService.deactivateContext(contextActivation);
+      }
+    }
     if (preferencesChangeListener != null) {
       preferenceStore().removePropertyChangeListener(preferencesChangeListener);
     }
@@ -253,6 +266,10 @@
     super.dispose();
   }
 
+  private IContextService contextService() {
+    return (IContextService) getSite().getService(IContextService.class);
+  }
+
   private class NewTerminalAction extends Action {
     NewTerminalAction() {
       setImageDescriptor(imageDescriptor(NEW_TERMINAL));