Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Panozzo <giovanni@panozzo.it>2017-11-08 01:05:03 +0300
committerGiovanni Panozzo <giovanni@panozzo.it>2017-11-08 01:05:03 +0300
commitba279374230ae6d43b47be2d46c741ea092f35d0 (patch)
treef70e5ccb58f5e5c6dea47dabc4fd25c4991f42d1 /remmina-plugins
parent143a122140b61bd8ac1d7d8ee58a34a370b49cd4 (diff)
Don't send spacebar as Unicode in RDP, fixes #1364
Diffstat (limited to 'remmina-plugins')
-rw-r--r--remmina-plugins/rdp/rdp_event.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c
index d196c0962..d260613c0 100644
--- a/remmina-plugins/rdp/rdp_event.c
+++ b/remmina-plugins/rdp/rdp_event.c
@@ -620,17 +620,19 @@ static gboolean remmina_rdp_event_on_key(GtkWidget* widget, GdkEventKey* event,
remmina_rdp_event_event_push(gp, &rdp_event);
keypress_list_add(gp, rdp_event);
}
- }else {
+ } else {
display = gtk_widget_get_display(widget);
unicode_keyval = gdk_keyval_to_unicode(event->keyval);
/* Decide when whe should send a keycode or a unicode character.
* - All non char keys (shift, alt, win) should be sent as keycode
+ * - Space should be sent as keycode (see issue #1364)
* - All special keys (F1-F10, numeric pad, home/end/arrows/pgup/pgdn/ins/del) keycode
* - All key pressed while CTRL or ALT or WIN is down are not decoded by gdk_keyval_to_unicode(), so send it as keycode
* - All keycodes not translatable to unicode chars, as keycode
* - The rest as unicode char
*/
if (event->keyval >= 0xfe00 || // arrows, shift, alt, Fn, num keypad...
+ event->hardware_keycode == 0x41 || // space bar
unicode_keyval == 0 || // impossible to translate
(event->state & (GDK_MOD1_MASK | GDK_CONTROL_MASK | GDK_SUPER_MASK)) != 0 // a modifier not recognized by gdk_keyval_to_unicode()
) {