Re: [dev] [svkbd] layout.sr.h

From: Petr Vaněk <arkamar_AT_atlas.cz>
Date: Mon, 2 Aug 2021 14:31:03 +0200

Hi,

On Fri, Jul 30, 2021 at 09:24:17PM +0200, Hiltjo Posthuma wrote:
> On Fri, Jul 30, 2021 at 08:53:33PM +0200, Страхиња Радић wrote:
> > On 21/03/29 11:39, Страхиња Радић wrote:
> > > On 21/03/29 11:25, Hiltjo Posthuma wrote:
> > > > You can add the patch as an attachment or inline and send it for review (any Serbian
> > > > users care to review it?).
> > >
> > > I have attached the patch to this email. I essentially modified the
> > > existing layout.sh.h to match the XKB "sr" layout, producing layout.sr.h.
> >
> > Hey, I just saw that svkbd was recently updated, but it seems it still doesn't
> > have my layout.sr.h. If there is anything that needs to be changed or updated in
> > that file in order for it to be added to svkbd, I'd like to know.
> >
> I'm not sure, but in the original e-mail I asked if there are other Serbian
> users to review it. That would be nice, because I can't really properly review
> the patch.

probably no Serbian reviewers here if no one wrote in 4 months :)

Anyway, I looked to the patch and compared the layout with online
available images of Serbian keyboards [1] and it looks similar except of
left down 'Ж'.

[1] https://upload.wikimedia.org/wikipedia/commons/6/60/QWERTZ_Srpska_tastatura.jpg

> diff --git a/layout.sr.h b/layout.sr.h
> new file mode 100644
> index 0000000..4925b53
> --- /dev/null
> +++ b/layout.sr.h
> _AT_@ -0,0 +1,88 @@
> +#define KEYS 66
> +static Key keys_sr[] = {
> + { "`","~", XK_quoteleft, 1},
> + { "1","!", XK_1, 1 },
> + { "2","\"", XK_2, 1 },
> + { "3","#", XK_3, 1 },
> + { "4","$", XK_4, 1 },
> + { "5","%", XK_5, 1 },
> + { "6","&", XK_6, 1 },
> + { "7","/", XK_7, 1 },
> + { "8","(", XK_8, 1 },
> + { "9",")", XK_9, 1 },
> + { "0","=", XK_0, 1 },
> + { "'","?", XK_apostrophe, 1 },
> + { "+","*", XK_plus, 1 },
> + { "<-",0, XK_BackSpace, 2 },
> + { "Del",0, XK_Delete, 1},
> + { 0 }, /* New row */
> + { "->|", 0, XK_Tab, 1 },
> + { "љ","Љ", XK_Cyrillic_lje, 1 },
> + { "њ","Њ", XK_Cyrillic_nje, 1 },
> + { "е","Е", XK_Cyrillic_ie, 1 },
> + { "р","Р", XK_Cyrillic_er, 1 },
> + { "т","Т", XK_Cyrillic_te, 1 },
> + { "з","З", XK_Cyrillic_ze, 1 },
> + { "у","У", XK_Cyrillic_u, 1 },
> + { "и","И", XK_Cyrillic_i, 1 },
> + { "о","О", XK_Cyrillic_o, 1 },
> + { "п","П", XK_Cyrillic_pe, 1 },
> + { "ш","Ш", XK_Cyrillic_sha, 1 },
> + { "ђ","Ђ", XK_Serbian_dje, 1 },
> + { "Enter",0, XK_Return, 3 },
> + { 0 }, /* New row */
> + { 0, 0, XK_Caps_Lock, 2 },
> + { "а","А", XK_Cyrillic_a, 1 },
> + { "с","С", XK_Cyrillic_es, 1 },
> + { "д","Д", XK_Cyrillic_de, 1 },
> + { "ф","Ф", XK_Cyrillic_ef, 1 },
> + { "г","Г", XK_Cyrillic_ghe, 1 },
> + { "х","Х", XK_Cyrillic_ha, 1 },
> + { "j","J̣̣", XK_Cyrillic_je, 1 },
> + { "к","К", XK_Cyrillic_ka, 1 },
> + { "л","Л", XK_Cyrillic_el, 1 },
> + { "ч","Ч", XK_Cyrillic_che, 1 },
> + { "ћ","Ћ", XK_Serbian_tshe, 1 },
> + { "ж","Ж", XK_Cyrillic_zhe, 1 },
> + { 0 }, /* New row */
> + { 0, 0, XK_Shift_L, 2 },
> + { "<",">", XK_less, 1 },
> + { "ж","Ж", XK_Cyrillic_zhe, 1 },

I see a letter similar to 'S' here instead of 'Ж'. But I don't know
nothing about this alphabet, maybe it is correct to have 'Ж' here.

> + { "џ","Џ", XK_Cyrillic_dzhe, 1 },
> + { "ц","Ц", XK_Cyrillic_tse, 1 },
> + { "в","В", XK_Cyrillic_ve, 1 },
> + { "б","Б", XK_Cyrillic_be, 1 },
> + { "н","Н", XK_Cyrillic_en, 1 },
> + { "м","М", XK_Cyrillic_em, 1 },
> + { ",",";", XK_comma, 1 },
> + { ".",":", XK_period, 1 },
> + { "-","_", XK_minus, 1 },
> + { 0, 0, XK_Shift_R, 2 },
> + { 0 }, /* New row */
> + { "Ctrl", 0, XK_Control_L, 2 },
> + { "Win", 0, XK_Super_L, 2 },
> + { "Alt", 0, XK_Alt_L, 2 },
> + { "", 0, XK_space, 5 },
> + { "Alt Gr", 0, XK_ISO_Level3_Shift, 2 },
> + { "Menu", 0, XK_Menu, 2 },
> + { "Ctrl", 0, XK_Control_R, 2 },
> +};
> +
> +Buttonmod buttonmods[] = {
> + { XK_Shift_L, Button2 },
> + { XK_Alt_L, Button3 },
> +};
> +
> +#define OVERLAYS 1
> +static Key overlay[OVERLAYS] = {
> + { 0, XK_Cancel },

This should be { 0, 0, XK_Cancel },

> +};
> +
> +#define LAYERS 1
> +static char* layer_names[LAYERS] = {
> + "sr",
> +};
> +
> +static Key* available_layers[LAYERS] = {
> + keys_sr,
> +};

Petr
Received on Mon Aug 02 2021 - 14:31:03 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 02 2021 - 15:36:08 CEST