Merge pull request #178 from mgorny/altgr-keymap
altgr+shift/capslock support in keymaps
This commit is contained in:
@@ -19,6 +19,10 @@ setxkbmap -model pc104 -layout de
|
||||
setxkbmap -model pc104 -layout it
|
||||
./xrdp-genkeymap ../instfiles/km-0410.ini
|
||||
|
||||
# Polish 'pl' 0x0415
|
||||
setxkbmap -model pc104 -layout pl
|
||||
./xrdp-genkeymap ../instfiles/km-0415.ini
|
||||
|
||||
# Russia 'ru' 0x0419
|
||||
setxkbmap -model pc104 -layout ru
|
||||
./xrdp-genkeymap ../instfiles/km-0419.ini
|
||||
|
||||
@@ -48,8 +48,8 @@ int main(int argc, char **argv)
|
||||
char text[256];
|
||||
char *displayname = NULL;
|
||||
char *outfname;
|
||||
char *sections[6] = {"noshift", "shift", "altgr", "shiftaltgr", "capslock", "shiftcapslock"};
|
||||
int states[6] = {0, 1, 0x80, 0x81, 2, 3};
|
||||
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;
|
||||
int char_count;
|
||||
@@ -124,7 +124,7 @@ int main(int argc, char **argv)
|
||||
e.display = dpy;
|
||||
e.same_screen = True;
|
||||
|
||||
for (idx = 0; idx < 6; idx++) /* Sections and states */
|
||||
for (idx = 0; idx < 8; idx++) /* Sections and states */
|
||||
{
|
||||
fprintf(outf, "[%s]\n", sections[idx]);
|
||||
e.state = states[idx];
|
||||
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
|
||||
fprintf(outf, "Key%d=%d:%d\n", i, (int) ks, unicode);
|
||||
}
|
||||
|
||||
if (idx != 4)
|
||||
if (idx != 7)
|
||||
{
|
||||
fprintf(outf, "\n");
|
||||
}
|
||||
|
||||
@@ -7,9 +7,10 @@ km-xxxx.ini
|
||||
|
||||
where the xxxx is replaced by the hex number of the layout of interest.
|
||||
|
||||
The files have 6 sections;
|
||||
The files have 8 sections;
|
||||
|
||||
[noshift], [shift], [altgr], [shiftaltgr], [capslock], [shiftcapslock]
|
||||
[noshift], [shift], [altgr], [shiftaltgr], [capslock], [capslockaltgr],
|
||||
[shiftcapslock], [shiftcapslockaltgr]
|
||||
|
||||
In each section there are multiple lines for each key.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user