summaryrefslogtreecommitdiffstats
path: root/genkeymap
diff options
context:
space:
mode:
Diffstat (limited to 'genkeymap')
-rw-r--r--genkeymap/Makefile.am11
-rwxr-xr-xgenkeymap/dump-keymaps.sh41
-rw-r--r--genkeymap/genkeymap.c23
-rw-r--r--genkeymap/readme.txt6
4 files changed, 46 insertions, 35 deletions
diff --git a/genkeymap/Makefile.am b/genkeymap/Makefile.am
index aed72512..8c295170 100644
--- a/genkeymap/Makefile.am
+++ b/genkeymap/Makefile.am
@@ -1,9 +1,16 @@
+EXTRA_DIST = \
+ dump-keymaps.sh \
+ readme.txt
+
+AM_CFLAGS = $(X_CFLAGS)
bin_PROGRAMS = \
xrdp-genkeymap
xrdp_genkeymap_SOURCES = genkeymap.c evdev-map.c
+xrdp_genkeymap_LDFLAGS = \
+ $(X_LIBS)
+
xrdp_genkeymap_LDADD = \
- -L/usr/X11R6/lib \
- -lX11
+ $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS)
diff --git a/genkeymap/dump-keymaps.sh b/genkeymap/dump-keymaps.sh
index 8a7d1c41..e22610a0 100755
--- a/genkeymap/dump-keymaps.sh
+++ b/genkeymap/dump-keymaps.sh
@@ -7,40 +7,41 @@ 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
-# German 'de' 0x0407
+# English - UK 'en-GB' 0x00000809
+setxkbmap -model pc105 -layout gb
+./xrdp-genkeymap ../instfiles/km-00000809.ini
+
+# German 'de' 0x00000407
setxkbmap -model pc104 -layout de
-./xrdp-genkeymap ../instfiles/km-0407.ini
+./xrdp-genkeymap ../instfiles/km-00000407.ini
-# Italy 'it' 0x0410
+# Italian 'it' 0x00000410
setxkbmap -model pc104 -layout it
-./xrdp-genkeymap ../instfiles/km-0410.ini
+./xrdp-genkeymap ../instfiles/km-00000410.ini
-# Japanese 'jp' 0x0411
-setxkbmap -model jp106 -layout jp -variant OADG109A
-./xrdp-genkeymap ../instfiles/km-0411.ini
-./xrdp-genkeymap ../instfiles/km-e0010411.ini
-./xrdp-genkeymap ../instfiles/km-e0200411.ini
-./xrdp-genkeymap ../instfiles/km-e0210411.ini
+# Japanese 'jp' 0x00000411
+setxkbmap -model pc105 -layout jp -variant OADG109A
+./xrdp-genkeymap ../instfiles/km-00000411.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
diff --git a/genkeymap/genkeymap.c b/genkeymap/genkeymap.c
index 088af748..1d640b1f 100644
--- a/genkeymap/genkeymap.c
+++ b/genkeymap/genkeymap.c
@@ -21,15 +21,15 @@
Updated Jay Sorg 2009
- cs czech 0x405
- de german 0x407
- en-us us english 0x409
- fr french 0x40c
- it italy 0x410
+ cs Czech 0x405
+ de German 0x407
+ en-us US English 0x409
+ fr French 0x40c
+ it Italian 0x410
br Portuguese (Brazil) 0x416
- ru russian 0x419
- se swedish 0x41d
- en-uk uk english 0x809
+ ru Russian 0x419
+ se Swedish 0x41d
+ en-uk UK English 0x809
*/
#include <stdio.h>
@@ -48,7 +48,10 @@ int main(int argc, char **argv)
char text[256];
char *displayname = NULL;
char *outfname;
- char *sections[8] = {"noshift", "shift", "altgr", "shiftaltgr", "capslock", "capslockaltgr", "shiftcapslock", "shiftcapslockaltgr"};
+ const char *sections[8] = {
+ "noshift", "shift", "altgr", "shiftaltgr",
+ "capslock", "capslockaltgr", "shiftcapslock", "shiftcapslockaltgr"
+ };
int states[8] = {0, 1, 0x80, 0x81, 2, 0x82, 3, 0x83};
int i;
int idx;
@@ -70,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;
}
diff --git a/genkeymap/readme.txt b/genkeymap/readme.txt
index b2b3b890..242fe92e 100644
--- a/genkeymap/readme.txt
+++ b/genkeymap/readme.txt
@@ -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.