diff options
author | laigor <leaigor@gmail.com> | 2016-04-14 22:35:56 +0300 |
---|---|---|
committer | laigor <leaigor@gmail.com> | 2016-04-14 22:35:56 +0300 |
commit | 59be4134c3e429ab388f26b4edd50ebea080b4e3 (patch) | |
tree | 149f57176a2f6f6ce24095a3b5e240c18a29444c | |
parent | 87208db090baba3b3249b31b50ace5fb78f44d60 (diff) | |
download | xrdp-proprietary-59be4134c3e429ab388f26b4edd50ebea080b4e3.tar.gz xrdp-proprietary-59be4134c3e429ab388f26b4edd50ebea080b4e3.zip |
Allows use the xkb options that for example allows you to specify a key combination to change the layouts.
Example of xrdp_keyboard.ini for russian keyboard
[default_rdp_layouts]
rdp_layout_us=0x00000409
rdp_layout_de=0x00000407
rdp_layout_fr=0x0000040C
rdp_layout_it=0x00000410
rdp_layout_jp=0x00000411
rdp_layout_jp2=0xe0010411
rdp_layout_jp3=0xe0200411
rdp_layout_jp4=0xe0210411
rdp_layout_ru=0x00000419
rdp_layout_se=0x0000041D
rdp_layout_pt=0x00000816
rdp_layout_br=0x00000416
rdp_layout_pl=0x00000415
[rdp_keyboard_ru]
keyboard_type=4
keyboard_subtype=1
model=pc105
options=grp:alt_shift_toggle
rdp_layouts=default_rdp_layouts
layouts_map=layouts_map_ru
[layouts_map_ru]
rdp_layout_us=us,ru
rdp_layout_ru=us,ru
-rw-r--r-- | libxrdp/xrdp_sec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index 4076699e..62a373e9 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -338,6 +338,15 @@ xrdp_load_keyboard_layout(struct xrdp_client_info *client_info) g_strncpy(client_info->variant, value, bytes - 1); } } + else if (g_strcasecmp(item, "options") == 0) + { + if (section_found != -1 && section_found == index) + { + bytes = sizeof(client_info->options); + g_memset(client_info->options, 0, bytes); + g_strncpy(client_info->options, value, bytes - 1); + } + } else { /* |