[gtk+] Handle KP keys in copy/paste keybindings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Handle KP keys in copy/paste keybindings
- Date: Mon, 8 Dec 2014 04:30:19 +0000 (UTC)
commit f74a75ae7e256b6cadf38b9aff863176f4de5e79
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 73d0a82..cf9ee67 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 4877963..ea8a78d 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1463,6 +1463,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]