Re: [hackers] [svkbd][PATCH] armenian layout

From: նորայր <norayr_AT_arnet.am>
Date: Sun, 29 Jan 2023 16:20:41 +0400

Hello,

Thank you for looking at it.

> There are some white-space issues in the patch, can you change it to TABs?

will do. my vim config changes everything to whitespaces automatically.

> Can you not reorder the keys_dialer section? Just change it in-place, this makes it
> slightly easier to review also.

understand.

> Can someone test if this layout is correct?

Are you asking me this? Or someone from the community? What does correct mean? The key positions, or that it doesn't crash the keyboard?

If the key positions, that is standard typewriter layout I use, and which was used in typewriters.

If otherwise, yes, would be glad to get comments, and get this code tested by someone, other than one of my friends who already tested it. I hope I did everything right and did not forget anything.

Will update soon.

On Sun, 29 Jan 2023 10:31:57 +0100
Hiltjo Posthuma <hiltjo_AT_codemadness.org> wrote:

> Hi,
>
> There are some white-space issues in the patch, can you change it to TABs? Can
> you not reorder the keys_dialer section? Just change it in-place, this makes it
> slightly easier to review also.
>
> Can someone test if this layout is correct?
>
> Thanks,
>
> On Sun, Jan 29, 2023 at 05:13:15AM +0400, norayr chilingarian wrote:
> > From: Norayr Chilingarian <norayr_AT_arnet.am>
> >
> > ---
> > layout.am.h | 85 +++++++++++++++++++++++++++
> > layout.mobile-intl.h | 135 ++++++++++++++++++++++++++++++++-----------
> > 2 files changed, 185 insertions(+), 35 deletions(-)
> > create mode 100644 layout.am.h
> >
> > diff --git a/layout.am.h b/layout.am.h
> > new file mode 100644
> > index 0000000..eb0a376
> > --- /dev/null
> > +++ b/layout.am.h
> > _AT_@ -0,0 +1,85 @@
> > +#define KEYS 63
> > +static Key keys_am[] = {
> > + { "՝","՜", XK_Armenian_exclam, 1 },
> > + { "ֆ","Ֆ", XK_Armenian_fe, 1 },
> > + { "ձ","Ձ", XK_Armenian_dza, 1 },
> > + { "֊","—", XK_Armenian_hyphen, 1 },
> > + { ",","՟", XK_comma, 1 },
> > + { "։","…", XK_Armenian_full_stop, 1 },
> > + { "՞","%", XK_Armenian_question, 1 },
> > + { "․","և", XK_Armenian_ligature_ew, 1 },
> > + { "՛","՚", XK_Armenian_accent, 1 },
> > + { ")","(", XK_parenright, 1 },
> > + { "օ","Օ", XK_Armenian_o, 1 },
> > + { "է","Է", XK_Armenian_e, 1 },
> > + { "ղ","Ղ", XK_Armenian_ghat, 1 },
> > + { "<-", 0, XK_BackSpace, 2 },
> > + { "Del", 0, XK_Delete, 1},
> > + { 0 }, /* New row */
> > + { "->|", 0, XK_Tab, 1 },
> > + { "ճ", "Ճ", XK_Armenian_tche, 1 },
> > + { "փ", "Փ", XK_Armenian_pyur, 1 },
> > + { "բ", "Բ", XK_Armenian_ben, 1 },
> > + { "ս", "Ս", XK_Armenian_se, 1 },
> > + { "մ", "Մ", XK_Armenian_men, 1 },
> > + { "ո", "Ո", XK_Armenian_vo, 1 },
> > + { "ւ", "Ւ", XK_Armenian_vyun, 1 },
> > + { "կ","Կ", XK_Armenian_ken, 1 },
> > + { "ը", "Ը", XK_Armenian_at, 1 },
> > + { "թ", "Թ", XK_Armenian_to, 1 },
> > + { "ծ", "Ծ", XK_Armenian_tsa, 1 },
> > + { "ց", "Ց", XK_Armenian_tso, 1 },
> > + { "Return", 0, XK_Return, 3 },
> > + { 0 }, /* New row */
> > + { 0, 0, XK_Caps_Lock, 2 },
> > + { "ջ", "Ջ", XK_Armenian_je, 1 },
> > + { "վ", "Վ", XK_Armenian_vev, 1 },
> > + { "գ", "Գ", XK_Armenian_gim, 1 },
> > + { "ե", "Ե", XK_Armenian_yech, 1 },
> > + { "ա", "Ա", XK_Armenian_ayb, 1 },
> > + { "ն", "Ն", XK_Armenian_nu, 1 },
> > + { "ի", "Ի", XK_Armenian_ini, 1 },
> > + { "տ", "Տ", XK_Armenian_tyun, 1 },
> > + { "հ", "Հ", XK_Armenian_ho, 1 },
> > + { "պ", "Պ", XK_Armenian_pe, 1 },
> > + { "ր", "Ր", XK_Armenian_re, 1 },
> > + { "\\","/", XK_backslash, 1 },
> > + { 0 }, /* New row */
> > + { 0, 0, XK_Shift_L, 3 },
> > + { "ժ", "Ժ", XK_Armenian_zhe, 1 },
> > + { "դ", "Դ", XK_Armenian_da, 1 },
> > + { "չ", "Չ", XK_Armenian_cha, 1 },
> > + { "յ", "Յ", XK_Armenian_hi, 1 },
> > + { "զ", "Զ", XK_Armenian_za, 1 },
> > + { "լ", "Լ", XK_Armenian_lyun, 1 },
> > + { "ք", "Ք", XK_Armenian_ke, 1 },
> > + { "խ", "Խ", XK_Armenian_khe, 1 },
> > + { "շ", "Շ", XK_Armenian_sha, 1 },
> > + { "ռ", "Ռ", XK_Armenian_ra, 1 },
> > + { 0, 0, XK_Shift_R, 2 },
> > + { 0 }, /* New row */
> > + { "Ctrl", 0, XK_Control_L, 2 },
> > + { "Alt", 0,XK_Alt_L, 2 },
> > + { "", 0,XK_space, 5 },
> > + { "Alt", 0,XK_Alt_R, 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, 0, XK_Cancel },
> > +};
> > +
> > +#define LAYERS 1
> > +static char* layer_names[LAYERS] = {
> > + "am",
> > +};
> > +
> > +static Key* available_layers[LAYERS] = {
> > + keys_am,
> > +};
> > diff --git a/layout.mobile-intl.h b/layout.mobile-intl.h
> > index 6b877ed..27c6896 100644
> > --- a/layout.mobile-intl.h
> > +++ b/layout.mobile-intl.h
> > _AT_@ -474,6 +474,101 @@ static Key keys_navigation[KEYS] = {
> > { 0 }, /* Last item (double 0) */
> > };
> >
> > +static Key keys_dialer[KEYS] = {
> > + { "Esc", 0, XK_Escape, 1 },
> > + { "1", "!" , XK_1, 1 },
> > + { "2", "_AT_", XK_2, 1 },
> > + { "3", "#", XK_3, 1 },
> > + { "-", "_", XK_minus, 1 },
> > + { ",", "<", XK_comma, 1 },
> > + { 0 }, /* New row */
> > +
> > + { "Shift", 0, XK_Shift_L, 1 },
> > + { "4", "$", XK_4, 1 },
> > + { "5", "%", XK_5, 1 },
> > + { "6", "^", XK_6, 1 },
> > + { "=", "+", XK_equal, 1 },
> > + { "/", "?", XK_slash, 1 },
> > + { 0 }, /* New row */
> > +
> > + { "abc", 0, XK_Mode_switch, 1 },
> > + { "7", "&", XK_7, 1 },
> > + { "8", "*", XK_8, 1 },
> > + { "9", "(", XK_9, 1 },
> > + { "⌫Bksp", 0, XK_BackSpace, 2 },
> > + { 0 }, /* New row */
> > +
> > + { "↺", 0, XK_Cancel, 1},
> > + { "", 0, XK_space, 1 },
> > + { "0", ")", XK_0, 1 },
> > + { ".", ">", XK_period, 1 },
> > + { "↲ Enter", 0, XK_Return, 2},
> > + { 0 }, /* New row */
> > + { 0 }, /* Last item (double 0) */
> > +};
> > +
> > +static Key keys_am[KEYS] = {
> > + { "՝","՜", XK_Armenian_exclam, 1 },
> > + { "ֆ","Ֆ", XK_Armenian_fe, 1 },
> > + { "ձ","Ձ", XK_Armenian_dza, 1 },
> > + { "֊","—", XK_Armenian_hyphen, 1 },
> > + { ",","՟", XK_comma, 1 },
> > + { "։","…", XK_Armenian_full_stop, 1 },
> > + { "՞","%", XK_Armenian_question, 1 },
> > + { "․","և", XK_Armenian_ligature_ew, 1 },
> > + { "՛","՚", XK_Armenian_accent, 1 },
> > + { ")","(", XK_parenright, 1 },
> > + { "օ","Օ", XK_Armenian_o, 1 },
> > + { "է","Է", XK_Armenian_e, 1 },
> > + { "ղ","Ղ", XK_Armenian_ghat, 1 },
> > + { 0 }, /* New row */
> > +
> > + { "ճ", "Ճ", XK_Armenian_tche, 1 },
> > + { "փ", "Փ", XK_Armenian_pyur, 1 },
> > + { "բ", "Բ", XK_Armenian_ben, 1 },
> > + { "ս", "Ս", XK_Armenian_se, 1 },
> > + { "մ", "Մ", XK_Armenian_men, 1 },
> > + { "ո", "Ո", XK_Armenian_vo, 1 },
> > + { "ւ", "Ւ", XK_Armenian_vyun, 1 },
> > + { "կ","Կ", XK_Armenian_ken, 1 },
> > + { "ը", "Ը", XK_Armenian_at, 1 },
> > + { "թ", "Թ", XK_Armenian_to, 1 },
> > + { "ծ", "Ծ", XK_Armenian_tsa, 1 },
> > + { "ց", "Ց", XK_Armenian_tso, 1 },
> > + { 0 }, /* New row */
> > +
> > + { "ջ", "Ջ", XK_Armenian_je, 1 },
> > + { "վ", "Վ", XK_Armenian_vev, 1 },
> > + { "գ", "Գ", XK_Armenian_gim, 1 },
> > + { "ե", "Ե", XK_Armenian_yech, 1 },
> > + { "ա", "Ա", XK_Armenian_ayb, 1 },
> > + { "ն", "Ն", XK_Armenian_nu, 1 },
> > + { "ի", "Ի", XK_Armenian_ini, 1 },
> > + { "տ", "Տ", XK_Armenian_tyun, 1 },
> > + { "հ", "Հ", XK_Armenian_ho, 1 },
> > + { "պ", "Պ", XK_Armenian_pe, 1 },
> > + { "ր", "Ր", XK_Armenian_re, 1 },
> > + { 0 }, /* New row */
> > +
> > + { "123", 0, XK_Mode_switch, 1 },
> > + { "ժ", "Ժ", XK_Armenian_zhe, 1 },
> > + { "դ", "Դ", XK_Armenian_da, 1 },
> > + { "չ", "Չ", XK_Armenian_cha, 1 },
> > + { "յ", "Յ", XK_Armenian_hi, 1 },
> > + { "զ", "Զ", XK_Armenian_za, 1 },
> > + { "լ", "Լ", XK_Armenian_lyun, 1 },
> > + { "ք", "Ք", XK_Armenian_ke, 1 },
> > + { "խ", "Խ", XK_Armenian_khe, 1 },
> > + { "շ", "Շ", XK_Armenian_sha, 1 },
> > + { "ռ", "Ռ", XK_Armenian_ra, 1 },
> > + { "⌫Bksp", 0, XK_BackSpace, 2 },
> > +
> > + { 0 }, /* New row */
> > + { "↺", 0, XK_Cancel, 1},
> > + { "Shift", 0, XK_Shift_L, 2 },
> > + { "", 0, XK_space, 2 },
> > + { "↲ Enter", 0, XK_Return, 2 },
> > +};
> >
> > static Key keys_ru[KEYS] = {
> > { "Esc", 0, XK_Escape, 1 },
> > _AT_@ -539,47 +634,16 @@ static Key keys_ru[KEYS] = {
> > { "↲ Enter", 0, XK_Return, 2 },
> > };
> >
> > -static Key keys_dialer[KEYS] = {
> > - { "Esc", 0, XK_Escape, 1 },
> > - { "1", "!" , XK_1, 1 },
> > - { "2", "_AT_", XK_2, 1 },
> > - { "3", "#", XK_3, 1 },
> > - { "-", "_", XK_minus, 1 },
> > - { ",", "<", XK_comma, 1 },
> > - { 0 }, /* New row */
> > -
> > - { "Shift", 0, XK_Shift_L, 1 },
> > - { "4", "$", XK_4, 1 },
> > - { "5", "%", XK_5, 1 },
> > - { "6", "^", XK_6, 1 },
> > - { "=", "+", XK_equal, 1 },
> > - { "/", "?", XK_slash, 1 },
> > - { 0 }, /* New row */
> > -
> > - { "abc", 0, XK_Mode_switch, 1 },
> > - { "7", "&", XK_7, 1 },
> > - { "8", "*", XK_8, 1 },
> > - { "9", "(", XK_9, 1 },
> > - { "⌫Bksp", 0, XK_BackSpace, 2 },
> > - { 0 }, /* New row */
> > -
> > - { "↺", 0, XK_Cancel, 1},
> > - { "", 0, XK_space, 1 },
> > - { "0", ")", XK_0, 1 },
> > - { ".", ">", XK_period, 1 },
> > - { "↲ Enter", 0, XK_Return, 2},
> > - { 0 }, /* New row */
> > - { 0 }, /* Last item (double 0) */
> > -};
> >
> > -#define LAYERS 6
> > +#define LAYERS 7
> > static char* layer_names[LAYERS] = {
> > "en",
> > "symbols",
> > "navigation",
> > "dialer",
> > "minimal",
> > - "ru",
> > + "am",
> > + "ru"
> > };
> >
> > static Key* available_layers[LAYERS] = {
> > _AT_@ -588,7 +652,8 @@ static Key* available_layers[LAYERS] = {
> > keys_navigation,
> > keys_dialer,
> > keys_minimal,
> > - keys_ru
> > + keys_am,
> > + keys_ru,
> > };
> >
> > Buttonmod buttonmods[] = {
> > --
> > 2.38.2
> >
> >
>
> --
> Kind regards,
> Hiltjo
>


-- 
There are two ways of constructing a software design.  One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
-- C.A.R. Hoare
Received on Sun Jan 29 2023 - 13:20:41 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 29 2023 - 13:24:34 CET