fix an error and add script
This commit is contained in:
parent
328649af9b
commit
87cdaf9ec9
31
genkeymap/dump-keymaps.sh
Executable file
31
genkeymap/dump-keymaps.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
which setxkbmap
|
||||||
|
if test $? -ne 0
|
||||||
|
then
|
||||||
|
echo "error, setxkbmap not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# English - US 'en-us' 0x0409
|
||||||
|
setxkbmap -model pc104 -layout us
|
||||||
|
./xrdp-genkeymap ../instfiles/km-0409.ini
|
||||||
|
|
||||||
|
# German 'de' 0x0407
|
||||||
|
setxkbmap -model pc104 -layout de
|
||||||
|
./xrdp-genkeymap ../instfiles/km-0407.ini
|
||||||
|
|
||||||
|
# Italy 'it' 0x0410
|
||||||
|
setxkbmap -model pc104 -layout it
|
||||||
|
./xrdp-genkeymap ../instfiles/km-0410.ini
|
||||||
|
|
||||||
|
# Russia 'ru' 0x0419
|
||||||
|
setxkbmap -model pc104 -layout ru
|
||||||
|
./xrdp-genkeymap ../instfiles/km-0419.ini
|
||||||
|
|
||||||
|
# Sweden 'se' 0x041d
|
||||||
|
setxkbmap -model pc104 -layout se
|
||||||
|
./xrdp-genkeymap ../instfiles/km-041d.ini
|
||||||
|
|
||||||
|
# set back to en-us
|
||||||
|
setxkbmap -model pc104 -layout us
|
@ -43,7 +43,6 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
const char* programname;
|
const char* programname;
|
||||||
char text[256];
|
char text[256];
|
||||||
char* ksname = NULL;
|
|
||||||
char* displayname = NULL;
|
char* displayname = NULL;
|
||||||
char* outfname;
|
char* outfname;
|
||||||
char* sections[5] = {"noshift", "shift", "altgr", "capslock", "shiftcapslock"};
|
char* sections[5] = {"noshift", "shift", "altgr", "capslock", "shiftcapslock"};
|
||||||
@ -96,14 +95,7 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
e.keycode = i;
|
e.keycode = i;
|
||||||
nbytes = XLookupString(&e, text, 255, &ks, NULL);
|
nbytes = XLookupString(&e, text, 255, &ks, NULL);
|
||||||
if (ks == NoSymbol)
|
text[nbytes] = 0;
|
||||||
{
|
|
||||||
ksname = "NoSymbol";
|
|
||||||
}
|
|
||||||
else if (!(ksname = XKeysymToString(ks)))
|
|
||||||
{
|
|
||||||
ksname = "(no name)";
|
|
||||||
}
|
|
||||||
char_count = mbstowcs(wtext, text, 255);
|
char_count = mbstowcs(wtext, text, 255);
|
||||||
unicode = 0;
|
unicode = 0;
|
||||||
if (char_count == 1)
|
if (char_count == 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user