fcitx / fcitx5-unikey

32 stars 10 forks source link

How to use user-defined input method? #20

Closed RPGReki closed 2 years ago

RPGReki commented 2 years ago

I can't seem to find the place to edit user-defined input method. This seems to be missing from any unikey implementation for linux.

wengxt commented 2 years ago

@0xReki What functionality are you actually talking about? Are you talking about the macro?

RPGReki commented 2 years ago

No, not macro, but user-defined alternative input method like VNI, VIQR, etc. There is the option UserIM in the configuration tool, but no place to configure said UserIM. Screenshot_2022-05-18_12-18-51

I already have a configuration file, so just knowing where to put it, so https://github.com/fcitx/fcitx5-unikey/blob/master/unikey/usrkeymap.cpp can parse it, would already be helpful.

An UI for creating that file, would be better. Here's a screenshot of the editor of the Windows UniKey tool. Screenshot_2022-05-18_12-12-56

wengxt commented 2 years ago

Thanks, I guess it's never properly supported :| .

I'll try to add the support now.

wengxt commented 2 years ago

With the latest git, you should be able to load user keymap from ~/.config/fcitx5/unikey/keymap.txt .

I'll add an keymap editor as the next step.

RPGReki commented 2 years ago

Thanks. It works like as expected.

Btw, you have make sure the file uses unix style new lines. Importing an existing file from Windows with Windows style new lines will result in parsing errors: "Error in user key layout, line xx: command not found".

wengxt commented 2 years ago

Thanks for the heads up. The latest git should be fine with both line endings.

wengxt commented 2 years ago

I added the keymap editor in the latest commit, feel free to give it a try.