[Xrdp-devel] Falling back to 0x409 keymap when no keymap file is found

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Xrdp-devel] Falling back to 0x409 keymap when no keymap file is found

Vincent Bernat
Hi!

Here  is  a   patch  to  use  0x409  keymap  when   no  keymap  file  is
found.  Otherwise, the  user just  have  an empty  keymap and  therefore
cannot type anything.


diff --git a/xrdp/lang.c b/xrdp/lang.c
index 751d2ba..7ae351f 100644
--- a/xrdp/lang.c
+++ b/xrdp/lang.c
@@ -234,6 +234,13 @@ get_keymaps(int keylayout, struct xrdp_keymap* keymap)
       g_file_close(fd);
     }
   }
+  else if (keylayout != 0x409)
+  {
+    g_free(filename);
+    g_writeln("keymap for 0x%4.4x was not found. Falling back to 0x0409 instead",
+      keylayout);
+    return get_keymaps(0x409, keymap);
+  }
   g_free(filename);
   return 0;
 }


--
A FIRE DRILL DOES NOT DEMAND A FIRE
A FIRE DRILL DOES NOT DEMAND A FIRE
A FIRE DRILL DOES NOT DEMAND A FIRE
-+- Bart Simpson on chalkboard in episode 4F16

------------------------------------------------------------------------------

_______________________________________________
xrdp-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xrdp-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Xrdp-devel] Falling back to 0x409 keymap when no keymap file is found

jsorg71
> Here  is  a   patch  to  use  0x409  keymap  when   no  keymap  file  is
> found.  Otherwise, the  user just  have  an empty  keymap and  therefore
> cannot type anything.

Thanks Vincent.

Jay

------------------------------------------------------------------------------
_______________________________________________
xrdp-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xrdp-devel