Customized Personalized Code table technology IBUs

Source: Internet
Author: User

In different user's working environment, according to the different character set of each use, and need to customize the input Code table, for example, a large number of Chinese characters in GB18030, perhaps because the input code table old, and difficult to use their familiar "Wubi" method of fast input, similarly, This is also true for users who need to face simple traditional operations.

In Scim, if you want to customize or add a user-defined code table, you need to know some relevant knowledge and techniques. First of all, SCIM's Code table directory is in "/usr/share/scim/tables/", the inside has stored a lot of extension ". bin" Code table files, as in other systems, these are processed files. Previously described how to get a code table file text format that is to say, as long as you are familiar with the Code table file into a plaintext file, you can enrich the custom code table.

Using the tools provided by SCIM to convert an existing code table to a plaintext, you can see the structure of the Code table file under SCIM.

# scim-make-table Wubi.bin-o NWubi.txt

The basic structure can be seen from the SCIM code table converted to cleartext as follows:

Scim_generic_table_phrase_library_text

Version_1_0

# # # Begin Table definition.

Begin_definition

UUID = 98E4CA3B-8321-4903-A59D-84ABCE 22f95a

Serial_number = 20040227

ICON =/usr/share/scim/icons/wubi.png

NAME = Wubi

name.zh_cn = Wubi Font

NAME.ZH_HK = five-pen font

NAME.ZH_TW = five-pen font

LANGUAGES = Zh_cn,zh_sg,zh_tw,zh_hk

# # # AUTHOR =

status_prompt = Medium

Keyboard_layout = Us_default

Valid_input_chars = Abcdefghijklmnopqrstuvwxy

# # # Key_end_chars =

Single_wildcard_char = Z

Multi_wildcard_char = *

Split_keys = Apostrophe

Commit_keys = Space

Forward_keys = Return

Select_keys = 1,2,3,4,5,6,7,8,9

Page_up_keys = Page_up,comma,minus

Page_down_keys = page_down,period,equal

Mode_switch_keys = Shift+keyrelease+shift_l,shift+keyrelease+shift_r

Full_width_punct_keys = Control+period

Full_width_letter_keys = Shift+space

Max_key_length = 4

Show_key_prompt = FALSE

Auto_select = TRUE

Auto_wildcard = TRUE

Auto_commit = TRUE

Auto_split = FALSE

Auto_fill = FALSE

Discard_invalid_key = TRUE

Dynamic_adjust = FALSE

Always_show_lookup = TRUE

Use_full_width_punct = TRUE

Def_full_width_punct = TRUE

Use_full_width_letter = TRUE

Def_full_width_letter = FALSE

Begin_char_prompts_definition

a work

B -Sub

C and

D Large

e -month

F Soil

King G

h -Mesh

I water

J Day

k -Port

L Tin

m Mountain

N has

o Fire

P 's

q Gold

r White

s Wood

t wo

u -Stand

v Female

W People

x si

y -word

End_char_prompts_definition

End_definition

# # # Begin Table data.

Begin_table

a engineering 52175

b , 65535 .

c to 65535

......

yyyy Classical Chinese

yyyy discourse 2

End_table

SCIM's Code table file is mainly by the description section (Begin_definition ... end_definition) and the Code table section (Begin_table ... End_table) consisting of two large chunks. The description part mainly is the input method some basic settings, such as the input method name, the input method icon and so on, the Code table part is each word, the word corresponding input code.

If some of the code table files that you need to work for yourself are added to the table in the same structure, you can make a custom SCIM code table file. The Code table file name, description, etc. can be modified as necessary, such as the design of a unique icon file (48x48 size PNG image), also to copy to/usr/share/scim/icons, and correct the seventh line of the "icon=" statement. In line fifth is the UUID number of this Code table, which is the unique identification number of the Code table, if the original code table is retained, and the new Code table is customized and renamed, you need to give a new UUID number, such as:

[Email protected] tables]# Uuidgen

38f7c0ff-a324-4848-a385-969d9c8507dc

[Email protected] tables]#

Custom-made Code table file, also need to convert to ". Bin" file, using the same command reverse completion.

# scim-make-table Nwubi.txt-b-O xwubi.bin

You can add the Code table in the "Common Code table" Group in the SCIM settings menu, or manually copy the new Code table file to the following directory.

CP Xwubi.bin/usr/share/scim/tables

CP Xwubi.png Usr/share/scim/icons

After restarting X, you can experience the new custom IME effect

Reference

Http://wiki.ubuntu.org.cn/IBus

Customized Personalized Code table technology IBUs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.