Installing keyboard layouts

This post describes how to install any keyboard layout files I put up on this blog.

Windows

Uncompress the .zip file and run setup.exe. The new keyboard layout should now be enabled as an alternate layout.

Linux (XKB layout)

This guide assumes that the keyboard layout file is called ‘nameofkblayout’ – for configuring other layouts, just replace ‘nameofkblayout’ with the actual file name, change English to the layout’s target language, etc.

1. Copy the new keyboard layout

Go to /usr/share/X11/xkb/symbols. Copy and paste ‘nameofkblayout’ there.

2. Add your layout to the XKB rule

Go to /usr/share/X11/xkb/rules. Open evdev.xml, scroll to the first tag and paste this XML config right after it (modify it to match the desired layout):

<!-- Custom keyboard layout -->
<layout>
  <configItem>
    <name>nameofkblayout</name>
    <shortDescription>nameofkblayout</shortDescription>
    <description>English (Name of Keyboard Layout)</description>
    <languageList>
      <iso639Id>eng</iso639Id>
    </languageList>
  </configItem>
</layout>

Replace the relevant tag content with the appropriate language and layout name info.

3. (Optional) Add your layout to Ibus keyboard config

The XKB keyboard switcher only supports up to 4 keyboard layouts for some reason. To add even more keyboards, there is another way via the Ibus input method.

Go to /usr/share/ibus/component and open simple.xml. Scroll to the first tag and paste this XML config right after it (modify it to match the desired layout):

<engine>
    <name>xkb:eng::nameofkblayout</name>
    <language>en</language>
    <license>GPL</license>
    <author>pcdandy</author>
    <layout>nameofkblayout</layout>
    <longname>English (Name of Keyboard Layout)</longname>
    <description>English (Name of Keyboard Layout)</description>
                <icon>ibus-keyboard</icon>
    <rank>99</rank>
</engine>

https://askubuntu.com/questions/1242669/the-list-of-input-methods-in-ibus-preference-is-not-as-exhaustive-as-in-gnome-se

4. (for LXDE-based distros e.g. Lubuntu) Add your layout to LXPanel’s keyboard config

Go to /usr/share/lxpanel/xkeyboardconfig/. Open layouts.cfg and add the following at the end:

nameofkblayout = English (Name of Keyboard Layout)

Failure to do this step will not enable the custom layout in the keyboard layout handler.

Linux (IBus m17n layout)

For some scripts, a more complex input method is required due to large amount of characters. For this, the IBus m17n library provides a good way to map multiple keys to a character.

This guide assumes that the keyboard layout file is called ‘nameofkblayout.mim’ – for any other layout name, just replace ‘nameofkblayout.mim’ with the actual file name, etc.

1. Copy the new keyboard layout

Go to /usr/share/m17n. Copy and paste ‘nameofkblayout.mim’ there.

2. Restart IBus

This is so that the IBus selection menu shows your new input method.

Sample m17n layout

;; Cherokee ASB phonetic input method for m17n library

(input-method chr asb3)

(description "Cherokee syllabary input method by the Alternate Script Bureau.
")

(title "Cherokee ASB Phonetic Layout")

(map
 (map
  ("a" ?Ꭰ)
  ("e" ?Ꭱ)
;; ...
  ("_" ?̣)
  ("~" ?̤)
;; ...
  ("wa" ?Ꮹ)
  ("wi" ?Ꮻ)
  ("wo" ?Ꮼ)
  ("w" ?Ꮾ)

  ))

(state
 (init
  (map)))

;; Local Variables:
;; coding: utf-8
;; mode: lisp
;; End:

https://wikis.swarthmore.edu/ling073/Spring_2017/Making_a_keyboard_layout

http://www.nongnu.org/m17n/manual-en/m17nDBTutorial.html

Android

1. Install Multiling O Keyboard on your phone

If you don’t have Multiling O Keyboard already, look it up in the Play Store and install it. Multiling O has a small storage footprint (around less than 2 MB) and should not cause storage issues.

2. Enable Multiling O

Screenshot_20190201-165904

Follow the on-screen instructions to enable Multiling O for input.

3. Download the layout file onto your phone

Save it somewhere, e.g. the Downloads folder.

4. Copy the layout text file on your phone

Open the layout text file in a text editor, select all contents, and copy everything.

5. Paste into Multiling O

Long press the space bar and drag your finger over to the Layouts… button. In the resulting list, press [ + DIY ], then press the Paste button.

A dialog should pop up informing if this is the custom layout you want to install. Press Ok and the layout is ready to use!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.