📜 ⬆️ ⬇️

Layouts for Mac OS X on Ukelele

In response to a topic that solves the problem of the lack of Russian typographical layouts for Mac OS X, I decided to write my own solution (this is the tautology). Maybe something more universal.

For those who know makovodov, it is not a secret that Mac OS X has the ability to visually create your own layouts to your taste and color using the wonderful Ukelele program. About this program has already been written in many places, so it is surprising that such an article did not flash on Habré during the fertility season.

Ukelele has been updated to version 1.8 this summer and is now distributed as Universal Binary, which implies the ability to run this utility on Mac OS X 10.5 Leopard. Everything you need, including a set of ready-made layouts and the program itself, is included in the .dmg image downloaded from the official site.
')
So what can you do in Ukelele?

The keys are hot and not very


Let's take a few basic tricks with you on how to work with Ukelele. When creating a new layout (and this is what you need), you will be prompted to create an absolutely empty one, either based on the system one or the finished one. It is safer to choose the third option and click "OK" to find the Russian received from the layout program (Cyrillic / Russian.keylayout). You will see a ready-made layout, which can be changed at our discretion.

Installing each key takes place after double clicking on it. As you can see, the “” key is not exactly in the usual place for a user with a history of friendship with Windows. We will transfer it to where the tilde button is located on almost all PC keyboards, familiar to gamers in the usual bindu on the gaming console. Double-clicking will cause a simple window with a single input field, where, in fact, you need to literally enter or insert the desired character (in this case, the letter “”).


After changing the character, we have not finished yet. Then you can hold Shift and - without releasing it - re-double-click on the “tilde”. Then we enter the title "E".

As you might guess, changing the characters received from the keys in combination with the control keys (Shift, Ctrl, Alt) can be set by simply clamping these keys and, after double clicking on the desired button, setting the desired value. In the same way, you can hold down Alt and adjust the minus key for the long dash used in Russian typography. The only question is - where can I get it? Clearly where. Go to the layout settings (System Preferences → International → Input Menu) and tick the “Character Palette” (at the very top of the list) and the “Show input menu in menu bar”.



Now this tool will be available from the menu, called by clicking on the layout indicator.


In the default character palette, everything is divided into groups and it is not so difficult to find the right one.


The keys are dead, long live the keys!


Another important and interesting point that can be implemented in your layout is the dead keys (they are dead keys). They came from typewriters and in themselves do not enter anything, but they affect the next character entered after them. With this technique, you can make, for example, a transliterated layout, where "y" is a dead key, and pressed after it "a", "e", "o" and "u" give "I", "e", "e" and "y", respectively. Although, it would be obvious to apply them for placing accents on letters (for example, “ā”, “á”, “ǎ”, “à”).

To install a dead key in Ukelele, select in the menu Keyboard → Edit Dead Key ... or press Cmd-E. In the opened window, create a new one or edit an existing one by pressing the corresponding button. If you select “New”, you will need to click with one click which key you want to make “dead”. After that, you will see a new layout - you are in the edit mode of the specified dead key. Here, individual clicks and combinations are entered in the usual way - by double clicking. Select Keyboard → Finish Dead Key from the menu to save the dead key settings and exit edit mode back to the normal layout.

Double-clicking on an existing dead key (they will be highlighted with a white frame) shows a window in which you can delete or edit the key, or specify its terminator. A terminator is a character that will be entered if a friend was pressed while the dead key was active and no character was assigned to it. That is, if we have all the same dead "y", through which you can enter only characters on "a", "e", "o" and "u", then successively pressing "y" and "x" will either lead To enter a terminator character, or it will lead to nothing at all (if the terminator is not installed).



Test Drive


In order for the system to be “seen” by the system, it must be marked in one of three folders:
/ Library / Keyboard Layout - Layout will work for all users on this computer;
~ / Library / Keyboard Layouts - the layout will work only for you;
/ Network / Library / Keyboard Layouts - The layout will be available on the local network.

You can change layouts as usual in System Preferences → International → Input Menu. Incidentally, by the way, you can put a tick in the “Keyboard Viewer”, after which, when you click on the layout indicator in the upper right corner, you can open it just as we opened the “Character Palette”, and test all your layout by successively pressing various keyboard shortcuts.

Remember that the freshly layout will not work in already running programs. Restart the necessary applications or, for reliability, log out and log back in.

Note for the technically-savvy (of which, I hope, most of them are on Habré): the layout file is plain XML, which in the field can be easily opened and edited in any text editor.

Well, to complete the topic of typographic layout, I share with you my own . I did it as a copy of the Birman layout for Windows , slightly expanding the set of special characters. Plus, maybe someone can use my version of the transliteration layout (although there is a Baltic approach to this business - the “I”, for example, is obtained from “ja” and not from “ya”, but this is fixable).

This article was published on MacSpoon.ru .

Source: https://habr.com/ru/post/38628/


All Articles