xfreerdp: fix and document --kbd-list option
This commit is contained in:
parent
60aac7aea3
commit
a1f5eeea0c
@ -442,6 +442,14 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>--kbd-list</term>
|
||||
<listitem>
|
||||
<para>
|
||||
list all keyboard layout ids used by -k
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>--version</term>
|
||||
<listitem>
|
||||
|
@ -780,22 +780,34 @@ int xf_process_client_args(rdpSettings* settings, const char* opt, const char* v
|
||||
RDP_KEYBOARD_LAYOUT* layouts;
|
||||
|
||||
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_STANDARD);
|
||||
|
||||
printf("\nKeyboard Layouts\n");
|
||||
for (i = 0; layouts[i].code; i++)
|
||||
{
|
||||
printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name);
|
||||
free(layouts);
|
||||
xfree(layouts[i].name);
|
||||
}
|
||||
xfree(layouts);
|
||||
|
||||
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_VARIANT);
|
||||
|
||||
printf("\nKeyboard Layout Variants\n");
|
||||
for (i = 0; layouts[i].code; i++)
|
||||
{
|
||||
printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name);
|
||||
free(layouts);
|
||||
xfree(layouts[i].name);
|
||||
}
|
||||
xfree(layouts);
|
||||
|
||||
layouts = freerdp_keyboard_get_layouts(RDP_KEYBOARD_LAYOUT_TYPE_IME);
|
||||
|
||||
printf("\nKeyboard Input Method Editors (IMEs)\n");
|
||||
for (i = 0; layouts[i].code; i++)
|
||||
{
|
||||
printf("0x%08X\t%s\n", layouts[i].code, layouts[i].name);
|
||||
free(layouts);
|
||||
xfree(layouts[i].name);
|
||||
}
|
||||
xfree(layouts);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
@ -740,13 +740,12 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types)
|
||||
if ((types & RDP_KEYBOARD_LAYOUT_TYPE_STANDARD) != 0)
|
||||
{
|
||||
length = sizeof(RDP_KEYBOARD_LAYOUT_TABLE) / sizeof(RDP_KEYBOARD_LAYOUT);
|
||||
|
||||
layouts = (RDP_KEYBOARD_LAYOUT*) xrealloc(layouts, (num + length + 1) * sizeof(RDP_KEYBOARD_LAYOUT));
|
||||
|
||||
for (i = 0; i < length; i++, num++)
|
||||
{
|
||||
layouts[num].code = RDP_KEYBOARD_LAYOUT_TABLE[i].code;
|
||||
strcpy(layouts[num].name, RDP_KEYBOARD_LAYOUT_TABLE[i].name);
|
||||
layouts[num].name = xstrdup(RDP_KEYBOARD_LAYOUT_TABLE[i].name);
|
||||
}
|
||||
}
|
||||
if ((types & RDP_KEYBOARD_LAYOUT_TYPE_VARIANT) != 0)
|
||||
@ -757,7 +756,7 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types)
|
||||
for (i = 0; i < length; i++, num++)
|
||||
{
|
||||
layouts[num].code = RDP_KEYBOARD_LAYOUT_VARIANT_TABLE[i].code;
|
||||
strcpy(layouts[num].name, RDP_KEYBOARD_LAYOUT_VARIANT_TABLE[i].name);
|
||||
layouts[num].name = xstrdup(RDP_KEYBOARD_LAYOUT_VARIANT_TABLE[i].name);
|
||||
}
|
||||
}
|
||||
if ((types & RDP_KEYBOARD_LAYOUT_TYPE_IME) != 0)
|
||||
@ -768,7 +767,7 @@ RDP_KEYBOARD_LAYOUT* freerdp_keyboard_get_layouts(uint32 types)
|
||||
for (i = 0; i < length; i++, num++)
|
||||
{
|
||||
layouts[num].code = RDP_KEYBOARD_IME_TABLE[i].code;
|
||||
strcpy(layouts[num].name, RDP_KEYBOARD_IME_TABLE[i].name);
|
||||
layouts[num].name = xstrdup(RDP_KEYBOARD_IME_TABLE[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,6 +101,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
" --ntlm: force NTLM authentication protocol version (1 or 2)\n"
|
||||
" --ignore-certificate: ignore verification of logon certificate\n"
|
||||
" --sec: force protocol security (rdp, tls or nla)\n"
|
||||
" --kbd-list: list all keyboard layout ids used by -k\n"
|
||||
" --salted-checksum: use salted checksums with Standard RDP encryption\n"
|
||||
" --version: print version information\n"
|
||||
"\n", argv[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user