Bug 107231

Summary: Add Russian layout with punctuation from US layout and some 3rd-level keys.
Product: xkeyboard-config Reporter: Stepanenko Andrey <ftvkyo2011>
Component: GeneralAssignee: xkb
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium CC: ftvkyo2011
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: The patch

Description Stepanenko Andrey 2018-07-14 22:00:19 UTC
Hello. This is my attempt to add this-> https://github.com/ftvkyo2011/xkb-custom layout.
It's useful because you are able to remember only one position for all punctuation keys
and should not worry with "Where is the colon? What language am I typing in?"
It's tested on me for ~1 year at this moment.

Here are the files ("diffs" :D ):
They were tested on my computer (Arch Linux) with the following commands:

./autogen.sh
make
sudo make install
sudo mv /usr/local/share/X11/xkb /usr/share/X11/xkb
setxkbmap -layout "us,ru(unipunct)" -option "grp:caps_toggle,lv3:ralt_switch,grp_led:scroll"


//// FROM 579 LINE OF rules/base.extras.xml.in

        <variant>
          <configItem>
            <name>unipunct</name>
            <_description>Russian (with US punctuation and some 3rd-layer keys)</_description>
          </configItem>
        </variant>


//// THE VERY BEGINNING OF symbols/ru:

// Keyboard layouts for Russia.
// AEN <aen@logic.ru>
// 2001/12/23 by Leon Kanter <leon@blackcatlinux.com>
// 2005/12/09 Valery Inozemtsev <shrek@altlinux.ru>
// 2018/07/15 @a13 (a.k.a. @dbvvmpg) and Stepanenko Andrey <ftvkyo2011@yandex.ru>
...


//// THE VERY END OF symbols/ru:

partial alphanumeric_keys
xkb_symbols "unipunct" {

// Раскладка представляет собой обычную русскую раскладку, в которой
// некоторые редко используемые буквы убрали на третий уровень,
// и поставили все пунктуационные знаки на то же место, где они
// стоят на US раскладке.

// ru(unipunct):
// `~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+
// хХ бБ уУюЮ кК еЕэЭ нН гГ шШщЩ жЖ зЗ [{ ]} \|
// фФ ыЫ вВ аА пП рР оОёЁ лЛ дД ;: '"
// яЯ чЧцЦ сС мМ иИйЙ тТ ьЬъЪ ,< .> /?

 include "us(basic)"
 name[Group1]= "Russian (with US punctuation)";

 key <LatQ> { [ Cyrillic_ha,   Cyrillic_HA ] };
 key <LatW> { [ Cyrillic_be,   Cyrillic_BE ] };
 key <LatE> { [ Cyrillic_u,    Cyrillic_U, Cyrillic_yu, Cyrillic_YU ] };
 key <LatR> { [ Cyrillic_ka,   Cyrillic_KA ] };
 key <LatT> { [ Cyrillic_ie,   Cyrillic_IE, Cyrillic_e, Cyrillic_E ] };
 key <LatY> { [ Cyrillic_en,   Cyrillic_EN ] };
 key <LatU> { [ Cyrillic_ghe,  Cyrillic_GHE ] };
 key <LatI> { [ Cyrillic_sha,  Cyrillic_SHA, Cyrillic_shcha, Cyrillic_SHCHA ] };
 key <LatO> { [ Cyrillic_zhe,  Cyrillic_ZHE ] };
 key <LatP> { [ Cyrillic_ze,   Cyrillic_ZE ] };

 key <LatA> { [ Cyrillic_ef,   Cyrillic_EF ] };
 key <LatS> { [ Cyrillic_yeru, Cyrillic_YERU ] };
 key <LatD> { [ Cyrillic_ve,   Cyrillic_VE ] };
 key <LatF> { [ Cyrillic_a,    Cyrillic_A ] };
 key <LatG> { [ Cyrillic_pe,   Cyrillic_PE ] };
 key <LatH> { [ Cyrillic_er,   Cyrillic_ER ] };
 key <LatJ> { [ Cyrillic_o,    Cyrillic_O, Cyrillic_io, Cyrillic_IO ] };
 key <LatK> { [ Cyrillic_el,   Cyrillic_EL ] };
 key <LatL> { [ Cyrillic_de,   Cyrillic_DE ] };

 key <LatZ> { [ Cyrillic_ya,   Cyrillic_YA ] };
 key <LatX> { [ Cyrillic_che,  Cyrillic_CHE, Cyrillic_tse, Cyrillic_TSE ] };
 key <LatC> { [ Cyrillic_es,   Cyrillic_ES ] };
 key <LatV> { [ Cyrillic_em,   Cyrillic_EM ] };
 key <LatB> { [ Cyrillic_i,    Cyrillic_I, Cyrillic_shorti, Cyrillic_SHORTI ] };
 key <LatN> { [ Cyrillic_te,   Cyrillic_TE ] };
 key <LatM> { [ Cyrillic_softsign, Cyrillic_SOFTSIGN, Cyrillic_hardsign, Cyrillic
_HARDSIGN ] };
};
Comment 1 Stepanenko Andrey 2018-07-14 22:12:36 UTC
Created attachment 140640 [details] [review]
The patch
Comment 2 Sergey V. Udaltsov 2018-09-26 23:08:31 UTC
Thank you! Could you please comment is anyone else is using this variant? Was there any public discussion about it somewhere? I am always hesitant to commit single-user variants (even if they are theoretically useful)
Comment 3 Stepanenko Andrey 2018-09-27 02:47:51 UTC
This layout is being used by @a13 ( https://github.com/a13 ), originally he came up with idea of this layout.
There is also a telegram chats about keyboards and emacs ( https://t.me/ru_mechcult , https://t.me/emacs_ru ) where people know about this layout, and some of people use it.

One of unmentioned advantages of this layout that it becomes much easier to use custom keyboards (or keyboards with reduced set of buttons) (for example: ergodox, mitosis, olkb) with this layout, because these keyboards are made for US layout (26 alpha), and it's hard to map all alpha keys from Russian layout (33 alpha) so that they fit good without this layout. (And it's also easier to remember only one position for each punctuation symbol when you use it).

I will not be upset if you do not accept the patch, because I understand that it is not so widely used.
If there is some way to add layouts to xkeyboard-config not by editing files, but by adding new ones, tell me about this method, and then I can simply create a package with this layout so that it is installed correctly.
Comment 4 Sergey V. Udaltsov 2018-09-29 23:17:08 UTC
done, thank you! especially for putting it to extras

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.