Merge pull request #437 from metalefty/switch-to-8-hex-digit-keymap-file

Switch to 8 hex digit keymapfile
master
Itamar Reis Peixoto 8 years ago committed by GitHub
commit f94920171e

@ -21,35 +21,35 @@ The key map information is stored in the file named \fIoutfile\fP.
.SH "FILES"
.TP
.I /etc/xrdp/km-XXXX.ini
Files containing the keyboard mapping for language \fIXXXX\fP, which is a 4 digit hexadecimal number identifying the country and language code.
.I /etc/xrdp/km-XXXXXXXX.ini
Files containing the keyboard mapping for language \fIXXXXXXXX\fP, which is a 8 digit hexadecimal number identifying the country and language code.
.RS 8
.TP
.B 0405
.B 00000405
cs czech
.TP
.B 0407
.B 00000407
de german
.TP
.B 0409
.B 00000409
en-us us english
.TP
.B 040c
.B 0000040c
fr french
.TP
.B 0410
.B 00000410
it italy
.TP
.B 0416
.B 00000416
br Portuguese (Brazil)
.TP
.B 0419
.B 00000419
ru russian
.TP
.B 041d
.B 0000041d
se swedish
.TP
.B 0809
.B 00000809
en-uk uk english
.RE

@ -25,7 +25,7 @@ default build will install the following
xrdp-chansrv
/etc/xrdp
km-xxxx.ini
km-xxxxxxxx.ini
sesman.ini
rsakeys.ini
startwm.sh

@ -7,44 +7,44 @@ then
exit 1
fi
# English - US 'en-us' 0x0409
# English - US 'en-us' 0x00000409
setxkbmap -model pc104 -layout us
./xrdp-genkeymap ../instfiles/km-0409.ini
./xrdp-genkeymap ../instfiles/km-00000409.ini
# English - UK 'en-GB' 0x0809
# English - UK 'en-GB' 0x00000809
setxkbmap -model pc105 -layout gb
./xrdp-genkeymap ../instfiles/km-0809.ini
./xrdp-genkeymap ../instfiles/km-00000809.ini
# German 'de' 0x0407
# German 'de' 0x00000407
setxkbmap -model pc104 -layout de
./xrdp-genkeymap ../instfiles/km-0407.ini
./xrdp-genkeymap ../instfiles/km-00000407.ini
# Italy 'it' 0x0410
# Italy 'it' 0x00000410
setxkbmap -model pc104 -layout it
./xrdp-genkeymap ../instfiles/km-0410.ini
./xrdp-genkeymap ../instfiles/km-00000410.ini
# Japanese 'jp' 0x0411
# Japanese 'jp' 0x00000411
setxkbmap -model jp106 -layout jp -variant OADG109A
./xrdp-genkeymap ../instfiles/km-0411.ini
./xrdp-genkeymap ../instfiles/km-00000411.ini
./xrdp-genkeymap ../instfiles/km-e0010411.ini
./xrdp-genkeymap ../instfiles/km-e0200411.ini
./xrdp-genkeymap ../instfiles/km-e0210411.ini
# Polish 'pl' 0x0415
# Polish 'pl' 0x00000415
setxkbmap -model pc104 -layout pl
./xrdp-genkeymap ../instfiles/km-0415.ini
./xrdp-genkeymap ../instfiles/km-00000415.ini
# Russia 'ru' 0x0419
# Russia 'ru' 0x00000419
setxkbmap -model pc104 -layout ru
./xrdp-genkeymap ../instfiles/km-0419.ini
./xrdp-genkeymap ../instfiles/km-00000419.ini
# Sweden 'se' 0x041d
# Sweden 'se' 0x0000041d
setxkbmap -model pc104 -layout se
./xrdp-genkeymap ../instfiles/km-041d.ini
./xrdp-genkeymap ../instfiles/km-0000041d.ini
# Portuguese -PT 'pt-pt' 0x0816
# Portuguese -PT 'pt-pt' 0x00000816
setxkbmap -model pc104 -layout pt
./xrdp-genkeymap ../instfiles/km-0816.ini
./xrdp-genkeymap ../instfiles/km-00000816.ini
# set back to en-us
setxkbmap -model pc104 -layout us

@ -73,7 +73,7 @@ int main(int argc, char **argv)
if (argc != 2)
{
fprintf(stderr, "Usage: %s out_filename\n", programname);
fprintf(stderr, "Example: %s /etc/xrdp/km-0409.ini\n", programname);
fprintf(stderr, "Example: %s /etc/xrdp/km-00000409.ini\n", programname);
return 1;
}

@ -3,9 +3,9 @@ Creating a new keymap file.
The names of the files are of the format;
km-xxxx.ini
km-xxxxxxxx.ini
where the xxxx is replaced by the hex number of the layout of interest.
where the xxxxxxxx is replaced by the hex number of the layout of interest.
The files have 8 sections;
@ -33,7 +33,7 @@ Key63=65450:42
To create a new file run "xrdp-genkeymap <filename>"
Example: ./xrdp-genkeymap /etc/xrdp/km-0409.ini
Example: ./xrdp-genkeymap /etc/xrdp/km-00000409.ini
Note: You need to have enough rights to be able to write to the
/etc/xrdp directory.

@ -9,23 +9,23 @@ EXTRA_DIST = \
startscriptdir=$(sysconfdir)/xrdp
dist_startscript_DATA = \
km-0407.ini \
km-0409.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-00000407.ini \
km-00000409.ini \
km-0000040a.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

@ -1,124 +1,124 @@
0x0436 af Afrikaans
0x041C sq Albanian
0x0001 ar Arabic
0x0401 ar-sa Arabic (Saudi Arabia)
0x0801 ar-iq Arabic (Iraq)
0x0C01 ar-eg Arabic (Egypt)
0x1001 ar-ly Arabic (Libya)
0x1401 ar-dz Arabic (Algeria)
0x1801 ar-ma Arabic (Morocco)
0x1C01 ar-tn Arabic (Tunisia)
0x2001 ar-om Arabic (Oman)
0x2401 ar-ye Arabic (Yemen)
0x2801 ar-sy Arabic (Syria)
0x2C01 ar-jo Arabic (Jordan)
0x3001 ar-lb Arabic (Lebanon)
0x3401 ar-kw Arabic (Kuwait)
0x3801 ar-ae Arabic (U.A.E.)
0x3C01 ar-bh Arabic (Bahrain)
0x4001 ar-qa Arabic (Qatar)
0x042D eu Basque
0x0402 bg Bulgarian
0x0423 be Belarusian
0x0403 ca Catalan
0x0004 zh Chinese
0x0404 zh-tw Chinese (Taiwan)
0x0804 zh-cn Chinese (China)
0x0C04 zh-hk Chinese (Hong Kong SAR)
0x1004 zh-sg Chinese (Singapore)
0x041A hr Croatian
0x0405 cs Czech
0x0406 da Danish
0x0413 nl Dutch (Netherlands)
0x0813 nl-be Dutch (Belgium)
0x0009 en English
0x0409 en-us English (United States)
0x0809 en-gb English (United Kingdom)
0x0C09 en-au English (Australia)
0x1009 en-ca English (Canada)
0x1409 en-nz English (New Zealand)
0x1809 en-ie English (Ireland)
0x1C09 en-za English (South Africa)
0x2009 en-jm English (Jamaica)
0x2809 en-bz English (Belize)
0x2C09 en-tt English (Trinidad)
0x0425 et Estonian
0x0438 fo Faeroese
0x0429 fa Farsi
0x040B fi Finnish
0x040C fr French (France)
0x080C fr-be French (Belgium)
0x0C0C fr-ca French (Canada)
0x100C fr-ch French (Switzerland)
0x140C fr-lu French (Luxembourg)
0x043C gd Gaelic
0x0407 de German (Germany)
0x0807 de-ch German (Switzerland)
0x0C07 de-at German (Austria)
0x1007 de-lu German (Luxembourg)
0x1407 de-li German (Liechtenstein)
0x0408 el Greek
0x040D he Hebrew
0x0439 hi Hindi
0x040E hu Hungarian
0x040F is Icelandic
0x0421 in Indonesian
0x0410 it Italian (Italy)
0x0810 it-ch Italian (Switzerland)
0x0411 ja Japanese
0x0412 ko Korean
0x0426 lv Latvian
0x0427 lt Lithuanian
0x042F mk FYRO Macedonian
0x043E ms Malay (Malaysia)
0x043A mt Maltese
0x0414 no Norwegian (Bokmal)
0x0814 no Norwegian (Nynorsk)
0x0415 pl Polish
0x0416 pt-br Portuguese (Brazil)
0x0816 pt Portuguese (Portugal)
0x0417 rm Rhaeto-Romanic
0x0418 ro Romanian
0x0818 ro-mo Romanian (Moldova)
0x0419 ru Russian
0x0819 ru-mo Russian (Moldova)
0x0C1A sr Serbian (Cyrillic)
0x081A sr Serbian (Latin)
0x041B sk Slovak
0x0424 sl Slovenian
0x042E sb Sorbian
0x040A es Spanish (Traditional Sort)
0x080A es-mx Spanish (Mexico)
0x0C0A es Spanish (International Sort)
0x100A es-gt Spanish (Guatemala)
0x140A es-cr Spanish (Costa Rica)
0x180A es-pa Spanish (Panama)
0x1C0A es-do Spanish (Dominican Republic)
0x200A es-ve Spanish (Venezuela)
0x240A es-co Spanish (Colombia)
0x280A es-pe Spanish (Peru)
0x2C0A es-ar Spanish (Argentina)
0x300A es-ec Spanish (Ecuador)
0x340A es-cl Spanish (Chile)
0x380A es-uy Spanish (Uruguay)
0x3C0A es-py Spanish (Paraguay)
0x400A es-bo Spanish (Bolivia)
0x440A es-sv Spanish (El Salvador)
0x480A es-hn Spanish (Honduras)
0x4C0A es-ni Spanish (Nicaragua)
0x500A es-pr Spanish (Puerto Rico)
0x0430 sx Sutu
0x041D sv Swedish
0x081D sv-fi Swedish (Finland)
0x041E th Thai
0x0431 ts Tsonga
0x0432 tn Tswana
0x041F tr Turkish
0x0422 uk Ukrainian
0x0420 ur Urdu
0x042A vi Vietnamese
0x0434 xh Xhosa
0x043D ji Yiddish
0x0435 zu Zulu
0x00000436 af Afrikaans
0x0000041C sq Albanian
0x00000001 ar Arabic
0x00000401 ar-sa Arabic (Saudi Arabia)
0x00000801 ar-iq Arabic (Iraq)
0x00000C01 ar-eg Arabic (Egypt)
0x00001001 ar-ly Arabic (Libya)
0x00001401 ar-dz Arabic (Algeria)
0x00001801 ar-ma Arabic (Morocco)
0x00001C01 ar-tn Arabic (Tunisia)
0x00002001 ar-om Arabic (Oman)
0x00002401 ar-ye Arabic (Yemen)
0x00002801 ar-sy Arabic (Syria)
0x00002C01 ar-jo Arabic (Jordan)
0x00003001 ar-lb Arabic (Lebanon)
0x00003401 ar-kw Arabic (Kuwait)
0x00003801 ar-ae Arabic (U.A.E.)
0x00003C01 ar-bh Arabic (Bahrain)
0x00004001 ar-qa Arabic (Qatar)
0x0000042D eu Basque
0x00000402 bg Bulgarian
0x00000423 be Belarusian
0x00000403 ca Catalan
0x00000004 zh Chinese
0x00000404 zh-tw Chinese (Taiwan)
0x00000804 zh-cn Chinese (China)
0x00000C04 zh-hk Chinese (Hong Kong SAR)
0x00001004 zh-sg Chinese (Singapore)
0x0000041A hr Croatian
0x00000405 cs Czech
0x00000406 da Danish
0x00000413 nl Dutch (Netherlands)
0x00000813 nl-be Dutch (Belgium)
0x00000009 en English
0x00000409 en-us English (United States)
0x00000809 en-gb English (United Kingdom)
0x00000C09 en-au English (Australia)
0x00001009 en-ca English (Canada)
0x00001409 en-nz English (New Zealand)
0x00001809 en-ie English (Ireland)
0x00001C09 en-za English (South Africa)
0x00002009 en-jm English (Jamaica)
0x00002809 en-bz English (Belize)
0x00002C09 en-tt English (Trinidad)
0x00000425 et Estonian
0x00000438 fo Faeroese
0x00000429 fa Farsi
0x0000040B fi Finnish
0x0000040C fr French (France)
0x0000080C fr-be French (Belgium)
0x00000C0C fr-ca French (Canada)
0x0000100C fr-ch French (Switzerland)
0x0000140C fr-lu French (Luxembourg)
0x0000043C gd Gaelic
0x00000407 de German (Germany)
0x00000807 de-ch German (Switzerland)
0x00000C07 de-at German (Austria)
0x00001007 de-lu German (Luxembourg)
0x00001407 de-li German (Liechtenstein)
0x00000408 el Greek
0x0000040D he Hebrew
0x00000439 hi Hindi
0x0000040E hu Hungarian
0x0000040F is Icelandic
0x00000421 in Indonesian
0x00000410 it Italian (Italy)
0x00000810 it-ch Italian (Switzerland)
0x00000411 ja Japanese
0x00000412 ko Korean
0x00000426 lv Latvian
0x00000427 lt Lithuanian
0x0000042F mk FYRO Macedonian
0x0000043E ms Malay (Malaysia)
0x0000043A mt Maltese
0x00000414 no Norwegian (Bokmal)
0x00000814 no Norwegian (Nynorsk)
0x00000415 pl Polish
0x00000416 pt-br Portuguese (Brazil)
0x00000816 pt Portuguese (Portugal)
0x00000417 rm Rhaeto-Romanic
0x00000418 ro Romanian
0x00000818 ro-mo Romanian (Moldova)
0x00000419 ru Russian
0x00000819 ru-mo Russian (Moldova)
0x00000C1A sr Serbian (Cyrillic)
0x0000081A sr Serbian (Latin)
0x0000041B sk Slovak
0x00000424 sl Slovenian
0x0000042E sb Sorbian
0x0000040A es Spanish (Traditional Sort)
0x0000080A es-mx Spanish (Mexico)
0x00000C0A es Spanish (International Sort)
0x0000100A es-gt Spanish (Guatemala)
0x0000140A es-cr Spanish (Costa Rica)
0x0000180A es-pa Spanish (Panama)
0x00001C0A es-do Spanish (Dominican Republic)
0x0000200A es-ve Spanish (Venezuela)
0x0000240A es-co Spanish (Colombia)
0x0000280A es-pe Spanish (Peru)
0x00002C0A es-ar Spanish (Argentina)
0x0000300A es-ec Spanish (Ecuador)
0x0000340A es-cl Spanish (Chile)
0x0000380A es-uy Spanish (Uruguay)
0x00003C0A es-py Spanish (Paraguay)
0x0000400A es-bo Spanish (Bolivia)
0x0000440A es-sv Spanish (El Salvador)
0x0000480A es-hn Spanish (Honduras)
0x00004C0A es-ni Spanish (Nicaragua)
0x0000500A es-pr Spanish (Puerto Rico)
0x00000430 sx Sutu
0x0000041D sv Swedish
0x0000081D sv-fi Swedish (Finland)
0x0000041E th Thai
0x00000431 ts Tsonga
0x00000432 tn Tswana
0x0000041F tr Turkish
0x00000422 uk Ukrainian
0x00000420 ur Urdu
0x0000042A vi Vietnamese
0x00000434 xh Xhosa
0x0000043D ji Yiddish
0x00000435 zu Zulu

@ -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);
}

Loading…
Cancel
Save