[gtk+/gtk-3-14] Handle KP keys in copy/paste keybindings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] Handle KP keys in copy/paste keybindings
- Date: Thu, 11 Dec 2014 14:30:42 +0000 (UTC)
commit 28c39fb0f84487c7d6f671a1c66cd876d8c6da9f
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 7 23:28:52 2014 -0500
Handle KP keys in copy/paste keybindings
We currently handle KP variants of some keys, but not consistenly.
https://bugzilla.gnome.org/show_bug.cgi?id=364566
gtk/gtkentry.c | 7 +++++++
gtk/gtktextview.c | 7 +++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index fee5097..5e393a7 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2022,6 +2022,13 @@ gtk_entry_class_init (GtkEntryClass *class)
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK,
"paste-clipboard", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Delete, GDK_SHIFT_MASK,
+ "cut-clipboard", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Insert, GDK_CONTROL_MASK,
+ "copy-clipboard", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Insert, GDK_SHIFT_MASK,
+ "paste-clipboard", 0);
+
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, 0,
"toggle-overwrite", 0);
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 489a9a6..4c9ad3d 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1445,6 +1445,13 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK,
"paste-clipboard", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Delete, GDK_SHIFT_MASK,
+ "cut-clipboard", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_CONTROL_MASK,
+ "copy-clipboard", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK,
+ "paste-clipboard", 0);
+
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Insert, 0,
"toggle-overwrite", 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]