kbdfs: add shift+altgr table 7 for polish keymaps

This commit is contained in:
cinap_lenrek 2016-04-13 17:00:20 +02:00
parent 8ff802d07e
commit 4ed396d438

View file

@ -264,6 +264,26 @@ Rune kbtabctl[Nscan] =
[0x78] 0, '', 0, '\b', 0, 0, 0, 0, [0x78] 0, '', 0, '\b', 0, 0, 0, 0,
}; };
Rune kbtabshiftaltgr[Nscan] =
{
[0x00] 0, 0, 0, 0, 0, 0, 0, 0,
[0x08] 0, 0, 0, 0, 0, 0, 0, 0,
[0x10] 0, 0, 0, 0, 0, 0, 0, 0,
[0x18] 0, 0, 0, 0, 0, 0, 0, 0,
[0x20] 0, 0, 0, 0, 0, 0, 0, 0,
[0x28] 0, 0, 0, 0, 0, 0, 0, 0,
[0x30] 0, 0, 0, 0, 0, 0, 0, 0,
[0x38] 0, 0, 0, 0, 0, 0, 0, 0,
[0x40] 0, 0, 0, 0, 0, 0, 0, 0,
[0x48] 0, 0, 0, 0, 0, 0, 0, 0,
[0x50] 0, 0, 0, 0, 0, 0, 0, 0,
[0x58] 0, 0, 0, 0, 0, 0, 0, 0,
[0x60] 0, 0, 0, 0, 0, 0, 0, 0,
[0x68] 0, 0, 0, 0, 0, 0, 0, 0,
[0x70] 0, 0, 0, 0, 0, 0, 0, 0,
[0x78] 0, 0, 0, 0, 0, 0, 0, 0,
};
char* char*
dev(char *file) dev(char *file)
{ {
@ -347,6 +367,8 @@ kbdputsc(Scan *scan, int c)
key.r = kbtabshiftesc1[c]; key.r = kbtabshiftesc1[c];
else if(scan->esc1) else if(scan->esc1)
key.r = kbtabesc1[c]; key.r = kbtabesc1[c];
else if(scan->shift && scan->altgr && kbtabshiftaltgr[c] != 0)
key.r = kbtabshiftaltgr[c];
else if(scan->shift) else if(scan->shift)
key.r = kbtabshift[c]; key.r = kbtabshift[c];
else if(scan->altgr) else if(scan->altgr)
@ -1011,26 +1033,19 @@ ctlproc(void *)
Rune* Rune*
kbmapent(int t, int sc) kbmapent(int t, int sc)
{ {
if(sc < 0 || sc >= Nscan) static Rune *tabs[] = {
return nil; /* 0 */ kbtab,
switch(t){ /* 1 */ kbtabshift,
default: /* 2 */ kbtabesc1,
return nil; /* 3 */ kbtabaltgr,
case 0: /* 4 */ kbtabctl,
return &kbtab[sc]; /* 5 */ kbtabctrlesc1,
case 1: /* 6 */ kbtabshiftesc1,
return &kbtabshift[sc]; /* 7 */ kbtabshiftaltgr,
case 2: };
return &kbtabesc1[sc]; if(t >= 0 && t < nelem(tabs) && sc >= 0 && sc < Nscan)
case 3: return &tabs[t][sc];
return &kbtabaltgr[sc]; return nil;
case 4:
return &kbtabctl[sc];
case 5:
return &kbtabctrlesc1[sc];
case 6:
return &kbtabshiftesc1[sc];
}
} }
void void