How to Replace Characters in Keyboard Layout

I use Ilya Birman’s typography layout on my Mac. It is very convenient, but it still doesn’t fully satisfy me. For example, I want to type the symbol # by pressing Shift+3 in the Russian layout because I often write in Markdown. Also, I want to type quotes by clicking the tilde key in any layout.

The simplest way to do this is to modify the layout file. Birman’s layout consists of XML files created in Ukelele.

What You Need to Do

  1. Go to /Library/Keyboard Layouts/
  2. Click on Ilya Birman Typography Layout.bundle → Show Package Contents
  3. Find the .keylayout files inside, open them, and make the necessary changes
  4. Restart your Mac or log out and log in again
How to Replace Characters in Keyboard Layout

Lifehack

I used Cursor to open and edit the files. It found them in the system, opened them, and made the necessary changes.

What Else I Tried

Hammerspoon. The scripts were supposed to change characters on the fly. It didn’t work — they failed after sleep mode or a restart. This could be fixed, but it still required keeping the program open constantly, which was unnecessary.

Karabiner. I tried replacing characters during typing — it was slow. I also tried writing a terminal command to insert the # symbol by pressing Shift+3 instead of the standard symbol, but the delay of 0.5 seconds was annoying. We type faster.

keyboard_arrow_up