GithubHelp home page GithubHelp logo

fcitx / fcitx5-cskk Goto Github PK

View Code? Open in Web Editor NEW
30.0 6.0 2.0 348 KB

SKK input method plugin for fcitx5 that uses LibCSKK

License: GNU General Public License v3.0

CMake 11.09% Shell 0.96% C++ 86.82% C 1.12%
fcitx5 input-method skk

fcitx5-cskk's Introduction

cskk logo fcitx5-cskk

Fcitx5 でskk入力方式で入力するためのインプットメソッドプラグイン。

libcskk を用いる。

説明書はCSKK Docsに公開。

インストール方法

Required libraries

Same as other fcitx5 plugin project.

For example in Debian,

$ sudo apt install gettext cmake extra-cmake-modules fcitx5-modules-dev qtbase5-dev qtdeclarative5-dev libfcitx5-qt-dev

For full features.

Install

$ rm -rf ./build
$ mkdir build
$ cd build  
$ cmake ..
$ make && make install

システムによっては、アイコン類の読み込みのために再起動が必要です。

アンインストール方法

$ cd build
$ make uninstall

テスト実行方法

$ rm -rf ./build 
$ mkdir build
$ cd build
$ cmake -DGOOGLETEST=on ..
$ make runTest 
$ ./test/runTest

GOOGLETESTフラグはキャッシュされるのでライブラリ生成時には注意が必要

開発状況

実装予定(いつかは)

  • ひらがな・カタカナ・漢字入力

  • 変換候補リスト表示

  • 変換候補リスト ラベル選択

  • 設定項目

    • 入力モード初期値設定
    • 漢字変換候補ラベル((a,b,c...), (1,2,3...) etc.)
    • 句読点スタイル ((,.),(、。),(、.)... )
    • 変換候補リスト表示までの変換候補数
    • 変換候補リストのサイズ

実装内容・予定不明

  • 優先度、読み書き可不可の辞書リスト設定

辞書

辞書の形式は skk-dev で配布されているものを想定している。

デフォルトでは/usr/share/skk/SKK-JISYO.L が euc-jp の読み取り専用辞書として使われる。

辞書はfcitx5のconfigtoolから設定可能。

直接編集する場合は ~/.local/share/fcitx5/cskk/dictionary_list に保存されている。 ','区切りのkey=valueリストで、type,file,mode,encoding,completeを指定する。 例として、

type=file,file=/usr/share/skk/SKK-JISYO.L,mode=readonly,encoding=euc-jp,complete=false
type=file,file=$FCITX_CONFIG_DIR/cskk/user.dict,mode=readwrite,complete=true

typeはfileのみ。必須。

fileはファイルへのパスを指定する。必須。唯一文頭でのみ$FCITX_CONFIG_DIRのみ変数として使え、fcitx5の設定ディレクトリ(通常は~/.local/share/fcitx5)を指す。

modeはreadonlyまたはreadwrite。必須。

encodingに指定できる内容はlibcskkに準じる。必須。少なくとも"euc-jp"や"utf-8"が使える。

completeは補完機能に用いるかどうか。trueかfalse。デフォルトはfalse。

著作権表示

Copyright (C) 2021 Naoaki Iwakiri

ライセンス

GNU GPL v3 or later.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

fcitx5-cskk's People

Contributors

naokiri avatar wengxt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jj1uzh wengxt

fcitx5-cskk's Issues

Doesn't work with Ubuntu21.04 binary fctix5

Haven't looked into deep but local built fcitx5 of tag: 5.0.5 can load this addon but the official hirsute release fcitx5 cannot load.

D2021-05-01 22:12:59.853884 addonmanager.cpp:143] Call loadAddon() with cskk checkDependencies() returns 0 Dep: [] OptDep: []

But after that no debug message is shown. No 'Failed to load library for addon...' or 'Loaded addon ...'.

Setup minimal unit test

Current unit test is an empty placeholder and doesn't run on github actions.
Add single any unit test and run on github actions.

Use your own name for input context property.

https://github.com/naokiri/fcitx5-cskk/blob/3773af3b0ef697502d98e5f4ab6afb9d1c391afb/src/cskk.cpp#L26

I know you probably take fcitx5-skk as a reference, but the input context property name need to be globally unique. This would cause problem if cskk and skk are loaded at the same time since they both use "skkState".

It is defined as a meaningful string instead of a random string just in case any external module want to reuse it, but usually the name itself doesn't matter.

fcitx5-cskk の辞書設定ファイルを構造化する

cskkで辞書毎に設定を増やすために、fcitx5-cskkの辞書設定ファイルを定義なしcsvのようなファイルから構造のあるファイルに変える。
Qtでサポートのあるjsonが第一候補。

Copy & Paste, especially paste

Need more investigation on how fcitx5 handles clipboard copy/paste, but want to be able to paste on register mode.

Is it pass-through to wayland that we get some file descriptor on paste? Or have to call or register callback on fcitx5?

Bug: 候補ウィンドウ表示時に直前のアノテーション表示が残る

バグの簡潔な説明 Describe the bug

候補を複数から選ぶ直前の候補にアノテーションがあると、そのアノテーション表示が消えない。

再現手順 To Reproduce

  1. リスト表示をするまでの候補数を2と設定する
  2. 3つ以上候補が存在する変換候補の2番目の候補にアノテーションを入れる
  3. 次の候補選択を繰り返し、3つ目以降の候補をリスト表示させる
  4. 候補リストの上に2つめの候補のアノテーションが表示されたままになる。

期待した動作 Expected behavior

リストのみ表示される

動作環境 (次の内容を挙げてください) Environment (please complete the following information):

fcitx5-cskk 1.0.0
cskk 1.1.0

その他の情報 Additional context

Pretty format of preedit

Update cskk lib dependency and make preedit's text not committing text into NoCommit format,
Also set underline to not confirmed messages.

Feature: アノテーション表示の有無を設定可能項目にする

Preeditの表示位置と候補リストの表示位置をアドオンから制御できないので、アノテーションの有無によって候補リストの位置が上下して選択する際に邪魔となる。
フロントエンドによってはどうやら制御できないので、fcitx本体で修正するのも難しそうである。
よって、アノテーションを表示するか否かを設定可能項目にして、候補リストの表示がガタガタとぶれる問題への対処とする。

期待される動作

  1. 設定項目にアノテーション表示を常に表示、単候補のみ表示、常に表示しないの中から選べるようにする。
  2. 設定に応じ、アノテーションを表示するかしないか変更する。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.