Make rime input method use kaomoji

Original link: https://hellodk.cn/post/1136

Detailed process

How to make the rime input method (Xiaolanghao, Shuxuguan, Zhongzhou Yun) input kaomoji? Similar to the implementation mechanism of custom_phrase.txt , we define a dictionary xxx.dict.yaml file, and then define attributes such as name version sort . The content in the dictionary is divided into three columns

  • screen text
  • code
  • Weights

The default user directories of rime on the three basic desktop system platforms are as follows

  • [Windows] %APPDATA%\Rime
  • [macOS] ~/Library/Rime
  • [Linux] ~/.config/ibus/rime (versions below 0.9.1 are ~/.ibus/rime )

Take windows as an example, create the file kaomoji.dict.yaml under the %APPDATA%\Rime path

Save the following

 # Rime dictionary - kaomoji # encoding: utf-8 # ref: https://tool.lmeee.com/yanwenzi # description: https://zh.wikipedia.org/zh-sg/%E9%A2%9C%E6%96%87%E5%AD%97 --- name: kaomoji version: "2023-07-20" sort: origin ... (。・∀・)ノkmj 1 ( ̄ε(# ̄) kmj 1 <(  ̄^ ̄)> kmj 1

Special attention:

  1. The file needs to be saved with utf-8 encoding
  2. You need to use tabs instead of spaces between the text权重上屏文本

After saving this file, check the input scheme you are currently using. For example, I use Xiaohe Shuangpin. Find the file double_pinyin_flypy.schema.yaml to check which dictionary file is used for translator/dictionary item, such as mine

rime kaomoji 1.jpg

So search globally for name: rime_ice (it is recommended to use vscode to open the user data directory) to find rime_ice.dict.yaml file, then find import_tables item, and add kaomoji as the kaomoji thesaurus.

rime kaomoji 2.jpg

Then redeploy rime and you can select the kaomoji by inputting kmj . The reason why kmj is used as the key is because the English word for kaomoji is called kaomoji , so I personally think that kmj is very suitable as a key, and it is also very easy to input on a 26-key keyboard.

rime kaomoji 3.jpg

I have organized kaomoji.dict.yaml

The source of emoji is mainly provided by this website , which contains more than 400 emoji entries

Open F12 and write a piece of js to get all emoji texts

 var pTags = document.querySelectorAll('#ywzList li p'); for (var i = 0; i < pTags.length; i++) { console.log(pTags[i].textContent); }

Now provide the yaml file I have organized for you to download, please use it.

Download link https://emby.940304.xyz:23399/f/685586dd6bb240f9aadc/ (The link will expire at 2024-01-17 20:28:42, please contact me again if it expires)

refer to

This article is transferred from: https://hellodk.cn/post/1136
This site is only for collection, and the copyright belongs to the original author.