--- gnome-terminal.schemas~	2004-06-29 15:51:23.000000000 -0700
+++ gnome-terminal.schemas	2004-12-16 09:47:23.022972264 -0800
@@ -11407,6 +11407,25 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/gnome-terminal/keybindings/duplicate</key>
+      <applyto>/apps/gnome-terminal/keybindings/duplicate</applyto>
+      <owner>gnome-terminal</owner>
+      <type>string</type>
+      <default>&lt;Ctrl&gt;&lt;Shift&gt;d</default>
+      <locale name="C">
+         <short>Keyboard shortcut to duplicate text</short>
+         <long>
+          Keyboard shortcut key for duplicating text---copying
+	and then pasting it.
+	 Expressed as a string
+          in the same format used for GTK+ resource files.
+          If you set the option to the special string "disabled", then there 
+          will be no keyboard shortcut for this action.
+         </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gnome-terminal/keybindings/full_screen</key>
       <applyto>/apps/gnome-terminal/keybindings/full_screen</applyto>
       <owner>gnome-terminal</owner>
--- terminal-accels.c~	2004-04-25 22:46:24.000000000 -0700
+++ terminal-accels.c	2004-12-16 09:34:47.668803552 -0800
@@ -37,6 +37,7 @@
 #define KEY_CLOSE_WINDOW CONF_KEYS_PREFIX"/close_window"
 #define KEY_COPY CONF_KEYS_PREFIX"/copy"
 #define KEY_PASTE CONF_KEYS_PREFIX"/paste"
+#define KEY_DUPLICATE CONF_KEYS_PREFIX"/duplicate"
 #define KEY_TOGGLE_MENUBAR CONF_KEYS_PREFIX"/toggle_menubar"
 #define KEY_FULL_SCREEN CONF_KEYS_PREFIX"/full_screen"
 #define KEY_RESET CONF_KEYS_PREFIX"/reset"
@@ -90,6 +91,8 @@
     KEY_COPY, ACCEL_PATH_COPY, 0, 0, NULL, FALSE },
   { N_("Paste"),
     KEY_PASTE, ACCEL_PATH_PASTE, 0, 0, NULL, FALSE },
+  { N_("Duplicate"),
+    KEY_DUPLICATE, ACCEL_PATH_DUPLICATE, 0, 0, NULL, FALSE },
 };
 
 static KeyEntry view_entries[] =
--- terminal-accels.h~	2002-10-04 15:29:01.000000000 -0700
+++ terminal-accels.h	2004-12-16 09:34:47.134884720 -0800
@@ -36,6 +36,7 @@
 #define ACCEL_PATH_CLOSE_WINDOW ACCEL_PATH_ROOT"/close_window"
 #define ACCEL_PATH_COPY ACCEL_PATH_ROOT"/copy"
 #define ACCEL_PATH_PASTE ACCEL_PATH_ROOT"/paste"
+#define ACCEL_PATH_DUPLICATE ACCEL_PATH_ROOT"/duplicate"
 #define ACCEL_PATH_TOGGLE_MENUBAR ACCEL_PATH_ROOT"/toggle_menubar"
 #define ACCEL_PATH_FULL_SCREEN ACCEL_PATH_ROOT"/full_screen"
 #define ACCEL_PATH_RESET ACCEL_PATH_ROOT"/reset"
--- terminal-screen.c~	2004-06-28 00:24:12.000000000 -0700
+++ terminal-screen.c	2004-12-16 09:32:48.356941712 -0800
@@ -1200,6 +1200,14 @@
 }
 
 static void
+duplicate_callback (GtkWidget      *menu_item,
+                TerminalScreen *screen)
+{
+  terminal_widget_copy_clipboard (screen->priv->term);
+  terminal_widget_paste_clipboard (screen->priv->term);
+}
+
+static void
 configuration_callback (GtkWidget      *menu_item,
                         TerminalScreen *screen)
 {
@@ -1525,6 +1533,13 @@
                                      screen);
   clip = gtk_clipboard_get (GDK_NONE);
   gtk_widget_set_sensitive (menu_item, gtk_clipboard_wait_is_text_available (clip));
+
+  menu_item = append_menuitem (screen->priv->popup_menu,
+			       _("_Duplicate"),
+			       G_CALLBACK(duplicate_callback),
+			       screen);
+  if (!terminal_screen_get_text_selected (screen))
+    gtk_widget_set_sensitive (menu_item, FALSE);
   
   menu_item = gtk_separator_menu_item_new ();
   gtk_widget_show (menu_item);
--- terminal-window.c~	2004-06-28 08:24:55.000000000 -0700
+++ terminal-window.c	2004-12-16 09:35:00.192899600 -0800
@@ -52,6 +52,7 @@
   GtkWidget *close_tab_menuitem;
   GtkWidget *copy_menuitem;
   GtkWidget *paste_menuitem;
+  GtkWidget *duplicate_menuitem;
   GtkWidget *show_menubar_menuitem;
   GtkWidget *zoom_in_menuitem;
   GtkWidget *zoom_out_menuitem;
@@ -151,6 +152,8 @@
                                            TerminalWindow *window);
 static void paste_callback                (GtkWidget      *menuitem,
                                            TerminalWindow *window);
+static void duplicate_callback                (GtkWidget      *menuitem,
+                                           TerminalWindow *window);
 static void edit_keybindings_callback     (GtkWidget      *menuitem,
                                            TerminalWindow *window);
 static void change_configuration_callback (GtkWidget      *menuitem,
@@ -874,6 +877,11 @@
                            window);
   menuitem_icon_visibility (window->priv->paste_menuitem, menus_have_icons);
 
+  window->priv->duplicate_menuitem =
+	  append_menuitem (menu, _("_Duplicate"), ACCEL_PATH_DUPLICATE,
+			   G_CALLBACK(duplicate_callback),
+			   window);
+
   mi = gtk_separator_menu_item_new ();
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
   
@@ -1088,6 +1096,7 @@
   window->priv->main_vbox = NULL;
   window->priv->copy_menuitem = NULL;
   window->priv->paste_menuitem = NULL;
+  window->priv->duplicate_menuitem = NULL;
   window->priv->edit_config_menuitem = NULL;
   window->priv->choose_config_menuitem = NULL;
   window->priv->encoding_menuitem = NULL;
@@ -2352,6 +2361,21 @@
 }
 
 static void
+duplicate_callback (GtkWidget      *menuitem,
+                TerminalWindow *window)
+{
+  GtkWidget *widget;
+
+  if (window->priv->active_term)
+    {
+      widget = terminal_screen_get_widget (window->priv->active_term);
+
+      terminal_widget_copy_clipboard (widget);
+      terminal_widget_paste_clipboard (widget);
+    }  
+}
+
+static void
 edit_keybindings_callback (GtkWidget      *menuitem,
                            TerminalWindow *window)
 {
--- ChangeLog~	2004-06-29 15:37:28.000000000 -0700
+++ ChangeLog	2004-12-16 09:44:08.040614088 -0800
@@ -1,3 +1,7 @@
+2004-12-16  John Heidemann  <johnh@isi.edu>
+
+	* src/terminal-accels.[ch], src/terminal-screen.c, src/terminal-window.c: add support for "duplicate", i.e., sequential copy then paste
+
 2004-06-29 Mariano Suárez-Alvarez <msuarezalvarez@arnet.com.ar>
 
 	* configure.in: Version 2.7.3
