commit 09bf48f5dbc6796166058c08b555531c421dbb22 Author: Daiki Ueno ueno@unixuser.org Date: Mon Sep 12 14:12:29 2011 +0900
Update to 1.0.3-3.
eekboard-send-key-event-for-text.patch | 71 ++++++++++++++++++++++++++++++++ eekboard.spec | 7 +++- 2 files changed, 77 insertions(+), 1 deletions(-) --- diff --git a/eekboard-send-key-event-for-text.patch b/eekboard-send-key-event-for-text.patch new file mode 100644 index 0000000..abe9976 --- /dev/null +++ b/eekboard-send-key-event-for-text.patch @@ -0,0 +1,71 @@ +From 15f7b0ecfffa0fab5b414d25e31ba5ab39bccbc5 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno ueno@unixuser.org +Date: Mon, 12 Sep 2011 12:51:17 +0900 +Subject: [PATCH 3/4] Send fake key event for each character in EekText + symbol. + +--- + src/client.c | 41 +++++++++++++++++++++++++++++++++++------ + 1 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/src/client.c b/src/client.c +index ba40905..82f1ec8 100644 +--- a/src/client.c ++++ b/src/client.c +@@ -901,18 +901,47 @@ send_fake_modifier_key_event (Client *client, + } + + static void +-send_fake_key_event (Client *client, +- EekSymbol *symbol, +- guint keyboard_modifiers, +- gboolean is_pressed) ++send_fake_key_event (Client *client, ++ EekSymbol *symbol, ++ guint keyboard_modifiers, ++ gboolean is_pressed) + { + GdkDisplay *display = gdk_display_get_default (); + EekModifierType modifiers; + guint xkeysym; + guint keycode, replaced_keysym = 0; + +- /* Ignore special keys and modifiers */ +- if (!EEK_IS_KEYSYM(symbol) || eek_symbol_is_modifier (symbol)) ++ /* Ignore modifier keys */ ++ if (eek_symbol_is_modifier (symbol)) ++ return; ++ ++ /* If symbol is a text, convert chars in it to keysym */ ++ if (EEK_IS_TEXT(symbol)) { ++ gchar *utf8 = eek_text_get_text (EEK_TEXT(symbol)); ++ glong items_written; ++ gunichar *ucs4 = g_utf8_to_ucs4_fast (utf8, -1, &items_written); ++ gint i; ++ ++ for (i = 0; i < items_written; i++) { ++ EekKeysym *keysym; ++ gchar *name; ++ ++ name = g_strdup_printf ("U%04X", ucs4[i]); ++ xkeysym = XStringToKeysym (name); ++ g_free (name); ++ ++ keysym = eek_keysym_new (xkeysym); ++ send_fake_key_event (client, ++ EEK_SYMBOL(keysym), ++ keyboard_modifiers, ++ is_pressed); ++ } ++ g_free (ucs4); ++ return; ++ } ++ ++ /* Ignore special keys */ ++ if (!EEK_IS_KEYSYM(symbol)) + return; + + xkeysym = eek_keysym_get_xkeysym (EEK_KEYSYM(symbol)); +-- +1.7.6.2 + diff --git a/eekboard.spec b/eekboard.spec index dbcad2a..f2fa730 100644 --- a/eekboard.spec +++ b/eekboard.spec @@ -1,6 +1,6 @@ Name: eekboard Version: 1.0.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An Easy-to-use Virtual Keyboard Toolkit
Group: Applications/System @@ -9,6 +9,7 @@ URL: http://fedorahosted.org/eekboard/ Source0: http://github.com/downloads/ueno/eekboard/eekboard-%%7Bversion%7D.tar.gz Patch0: eekboard-window-size-constraint.patch Patch1: eekboard-fix-key-release-race-condition.patch +Patch2: eekboard-send-key-event-for-text.patch BuildRequires: libfakekey-devel # older libfakekey-devel has missing BR: libXtst-devel (#680878) BuildRequires: libXtst-devel @@ -68,6 +69,7 @@ This package contains the Python language binding of eekboard client library. %setup -q %patch0 -p1 -b .window-size-constraint %patch1 -p1 -b .fix-key-release-race-condition +%patch2 -p1 -b .send-key-event-for-text
%build @@ -150,6 +152,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog +* Mon Sep 12 2011 Daiki Ueno dueno@redhat.com - 1.0.3-3 +- add eekboard-send-key-event-for-text.patch + * Mon Sep 12 2011 Daiki Ueno dueno@redhat.com - 1.0.3-2 - add eekboard-window-size-constraint.patch - add eekboard-fix-key-release-race-condition.patch (#737396)