Switch to 8 hex digit keymapfile

as the value keyboardLayout is actually 32-bit unsigned integer.
See [MS-RDPBCGR] - v20160714 p.45.
This commit is contained in:
Koichiro IWAO 2016-10-11 00:19:55 +09:00
parent b79ad54bd3
commit c654c86206
18 changed files with 19 additions and 19 deletions

View File

@ -9,23 +9,23 @@ EXTRA_DIST = \
startscriptdir=$(sysconfdir)/xrdp
dist_startscript_DATA = \
km-0407.ini \
km-0409.ini \
km-00000407.ini \
km-00000409.ini \
km-040a.ini \
km-040c.ini \
km-0410.ini \
km-0411.ini \
km-0414.ini \
km-0415.ini \
km-0416.ini \
km-0419.ini \
km-041d.ini \
km-0807.ini \
km-0809.ini \
km-080c.ini \
km-0813.ini \
km-0816.ini \
km-100c.ini \
km-0000040c.ini \
km-00000410.ini \
km-00000411.ini \
km-00000414.ini \
km-00000415.ini \
km-00000416.ini \
km-00000419.ini \
km-0000041d.ini \
km-00000807.ini \
km-00000809.ini \
km-0000080c.ini \
km-00000813.ini \
km-00000816.ini \
km-0000100c.ini \
km-e0010411.ini \
km-e0200411.ini \
km-e0210411.ini

View File

@ -231,12 +231,12 @@ get_keymaps(int keylayout, struct xrdp_keymap *keymap)
filename = (char *)g_malloc(256, 0);
/* check if there is a keymap file */
g_snprintf(filename, 255, "%s/km-%4.4x.ini", XRDP_CFG_PATH, keylayout);
g_snprintf(filename, 255, "%s/km-%08x.ini", XRDP_CFG_PATH, keylayout);
/* if the file does not exist, try again with 'en-us' as fallback */
if (!g_file_exist(filename))
{
g_snprintf(filename, 255, "%s/km-0409.ini", XRDP_CFG_PATH);
g_snprintf(filename, 255, "%s/km-00000409.ini", XRDP_CFG_PATH);
}
if (g_file_exist(filename))
@ -263,7 +263,7 @@ get_keymaps(int keylayout, struct xrdp_keymap *keymap)
if (g_memcmp(lkeymap, keymap, sizeof(struct xrdp_keymap)) != 0)
{
log_message(LOG_LEVEL_WARNING,
"local keymap file for 0x%4.4x found and doesn't match "
"local keymap file for 0x%08x found and doesn't match "
"built in keymap, using local keymap file", keylayout);
}