「Fcitx5」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎設定ツール: 章「テーマ」を訳出)
(同期)
 
(7人の利用者による、間の98版が非表示)
1行目: 1行目:
[[Category:国際化]]
+
[[Category:インプットメソッド]]
 
[[en:Fcitx5]]
 
[[en:Fcitx5]]
  +
[[zh-hans:Fcitx5]]
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|Fcitx}}
 
{{Related|Fcitx}}
 
{{Related|IBus}}
 
{{Related|IBus}}
 
{{Related articles end}}
 
{{Related articles end}}
  +
[https://fcitx-im.org/wiki/Fcitx_5 Fcitx5] は、軽量コアを備えた[[インプットメソッド]]フレームワークであり、アドオンを介して追加の言語サポートを提供します。 [[Fcitx]] の後継です。
 
Fcitx5 は [[Fcitx]] の後継プログラムとして開発されているインプットメソッドです。
 
   
 
== インストール ==
 
== インストール ==
12行目: 12行目:
 
{{Pkg|fcitx5}} パッケージを[[インストール]]してください。
 
{{Pkg|fcitx5}} パッケージを[[インストール]]してください。
   
== インプットメソッドモジュールの環境変数の設定 ==
+
{{Grp|fcitx5-im}} パッケージグループは、メインの {{Pkg|fcitx5}} パッケージと、[[#インプットメソッドモジュール]] 一部、そして [[#設定ツール]] を提供します。
   
  +
{{Note|{{Pkg|fcitx5}} パッケージ自体は、英語サポートのみの基本的なフレームワークしか提供しません。中国語や日本語などの他の言語を入力する場合は、インプットメソッドエンジン (IME) が必要です。}}
Fcitx5を常用する場合は、環境変数を変更する必要があります。
 
   
  +
使用可能な IME のリストについては、[[インプットメソッド#使用可能なインプトメソッドエディターの一覧]] を参照してください。
{{hc|~/.pam_environment|<nowiki>
 
  +
GTK_IM_MODULE DEFAULT=fcitx
 
  +
=== インプットメソッドモジュール ===
QT_IM_MODULE DEFAULT=fcitx
 
  +
XMODIFIERS DEFAULT=@im=fcitx</nowiki>
 
  +
一部の GUI ツールキットは、アプリケーションでのインプットメソッド統合のためのインプットメソッドモジュールのサポートを提供します。しかし、これらは必ずしも必要であるわけではなく、[[#Wayland]] ネイティブなプロトコルのほうがより優れたパフォーマンスを得られるかもしれません。詳細は [[#統合]] を参照してください。
  +
  +
* [[Qt]]5/6: {{Pkg|fcitx5-qt}}。
  +
* [[GTK]]: {{Pkg|fcitx5-gtk}}。
  +
* Qt4: {{AUR|fcitx5-qt4-git}}。
  +
  +
=== プラグイン ===
  +
  +
日付と時刻のサポートは {{Pkg|fcitx5-lua}} をインストールしてください。
  +
  +
== 使用方法 ==
  +
  +
=== 統合 ===
  +
  +
インプットメソッドを実際に使用するには、アプリケーション側が入力イベントをインプットメソッドにリダイレクトする必要があります。そのような目的のために使用されるプロトコルは、ディスプレイサーバ (つまり、[[Wayland]] の ''text-input'' や [[Xorg]] の ''XIM'') や GUI ツールキットのインプットメソッドモジュールが提供していることがあります。
  +
  +
==== Wayland ====
  +
  +
通常、Wayland のネイティブな ''text-input'' プロトコルでは、インプットメソッドモジュールよりも良い結果を得られます。なので、[[#IM モジュール]] は [[Xwayland]] アプリケーションでのみ使用することが推奨されます。加えて、レガシーな X11 アプリケーションに対しては [[#XIM]] を有効化してください。[https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#TL.3BDR_Do_we_still_need_XMODIFIERS.2C_GTK_IM_MODULE_and_QT_IM_MODULE.3F]
  +
  +
{{Note|
  +
* ''text-input'' は、Wayland コンポジタとクライアントが使用しているプロトコルのバージョンが同じである必要があります。一部のアプリケーションでプロトコルのバージョンが異なる場合は、[[#IM モジュール]] を使用したほうが良いかもしれません。特に、Qt < 6.7 は ''text-input-v3'' プロトコルをサポートしていません (2024年3月現在、[[GNOME]] と [[Sway]] はこのバージョンのプロトコルしかサポートしていません)。
  +
* [[KDE]] Wayland では、インプットメソッドのプロセスが KWin によって実行される必要があります。[https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma] そうするには、実行中の Fcitx 5 プロセスを終了し、''System Settings > Input Devices > Virtual Keyboard'' を開き、そこで ''Fcitx 5'' を選択してください。
 
}}
 
}}
   
  +
==== IM モジュール ====
== デスクトップ環境での自動起動 ==
 
   
  +
以下の[[環境変数]][https://fcitx-im.org/wiki/Setup_Fcitx_5#Environment_variables]を、[[環境変数#Xorg セッションごと|X11 を使用している場合はグローバルに]]、''text-input'' サポートのある Wayland コンポジタを使用している場合は [[環境変数#アプリケーションごと|Xwayland アプリケーション毎に]]、設定してください。
デスクトップの起動時に {{Pkg|fcitx5}} の自動起動が必要な場合は、[[Fcitx#デスクトップ環境での自動起動]] を参照してください。
 
   
  +
GTK_IM_MODULE=fcitx
== インプットメソッドエンジン ==
 
  +
QT_IM_MODULE=fcitx
   
  +
{{Note|
=== 日本語 ===
 
  +
* SDL2 ライブラリの特定のバージョンを使用する一部のゲームのサポートを有効化するには、{{ic|1=SDL_IM_MODULE=fcitx}} を[[追加]]してください。
  +
* [[kitty]] でのサポートを有効化するには {{ic|1=GLFW_IM_MODULE=ibus}} を[[追加]]してください。この環境変数の値として使えるのは {{ic|ibus}} のみです。[https://fcitx-im.org/wiki/Setup_Fcitx_5#Other_less_common_setup]
  +
}}
   
  +
あるいは、Wayland ネイティブな GTK アプリケーションに影響を与えずに、X11/XWayland で実行されている GTK アプリケーションに IM モジュールを使用させるには、GTK3 に対しては {{ic|1=gtk-im-module=fcitx}} を、GTK2 に対しては {{ic|1=gtk-im-module="fcitx"}} を、[[GTK#設定]] で書かれてあるような設定ファイルに書き込んでください。
* {{Pkg|fcitx5-anthy}} は人気の日本語入力エンジンです。ただし、開発は滞っています。
 
* {{Pkg|fcitx5-skk}} は {{Pkg|libskk}} がベースの日本語仮名漢字入力エンジンです。
 
* {{AUR|fcitx5-mozc}} Google 日本語入力のオープンソース版である [[Mozc]] がベース。
 
   
  +
ロケールが {{ic|en_US.UTF-8}} であり、GTK2 アプリケーションが fcitx5 をアクティブ化できない場合は、[[環境変数#アプリケーションごと|そのアプリケーションに対して個別に]] {{ic|1=GTK_IM_MODULE=xim}} を設定することで解決します。
=== 中国語 ===
 
   
  +
{{Note|GTK3 のプログラムにも影響するので、グローバルに {{ic|GTK_IM_MODULE}} を xim に設定しないようにしてください。XIM はいろいろと問題があるので (再起動すると入力できなくなるなど)、なるべく使わないでください。}}
* {{Pkg|fcitx5-chinese-addons}} には中国語に関連するアドオンが含まれています。fcitx4 にバンドルされている IME も含まれます。
 
  +
* {{Pkg|fcitx5-rime}} は [[Rime IME]] プロジェクトのスキーマを基にしています。
 
  +
==== XIM ====
* {{Pkg|fcitx5-chewing}} は {{Pkg|libchewing}} に基づく繁体字の注音入力エンジンです。
 
  +
  +
[[X11]] アプリケーションに対しては、以下の環境変数で XIM サポートを有効化してください:
  +
  +
XMODIFIERS=@im=fcitx
  +
  +
=== 自動起動 ===
  +
  +
使用している[[デスクトップ環境]]が [[XDG Autostart]] を実装している場合、[[自動起動#デスクトップ環境のスタートアップ時]] を参照してください。
  +
  +
[[自動起動#Xorg のスタートアップ時]] を参照し、必要に応じて [[自動起動#ウィンドウマネージャのスタートアップ時]] も見てください。
  +
  +
{{Tip|Fcitx5 が正しく動作しているか確認するには、何らかのアプリケーションを開き、{{ic|Ctrl+Space}} を押してインプットメソッド (設定されていれば) を切り替えて、何か入力してみてください。}}
  +
  +
{{Note|KDE Wayland で Wayland の ''text-input'' プロトコルを使うには、[[#Wayland]] に書かれてあるノートにも従ってください。}}
  +
  +
=== 単語ライブラリ ===
  +
  +
==== 中国語 ====
  +
  +
For the Chinese input method of Fcitx5, several words libraries are currently provided in the repository:
  +
  +
* {{Pkg|fcitx5-pinyin-zhwiki}}: A words library created by felixonmars based on Chinese Wikipedia. Applicable to '''Pinyin input method'''.
  +
* {{Pkg|rime-pinyin-zhwiki}}: A words library for [[Rime]] input method.
  +
*{{AUR|fcitx5-pinyin-moegirl}} : A words library created by outloudvi based on Moegirlpedia.
  +
* {{AUR|fcitx5-pinyin-moegirl-rime}}: A words library for [[Rime]] input method.
  +
* [https://github.com/cathaysia/fcitx5_dicts/releases/tag/0.0.1 cedict]: A words library converted from [https://www.mdbg.net/chinese/dictionary?page=cc-cedict cedict dictionary].
  +
  +
{{Note|Manually downloaded words library files can be directly placed in the path of {{ic|~/.local/share/fcitx5/pinyin/dictionaries}}. The suffix of the words library file should be .dict}}
  +
  +
=== カスタムの単語ライブラリ ===
  +
  +
==== 中国語 ====
  +
  +
Generally speaking, since {{Pkg|fcitx5}} supports [[#Import Sogou words library|importing the Sogou words library]], there is no need to customize words library to a large extent, but {{Pkg|fcitx5}} still provides related tools.
  +
  +
* Install {{Pkg|libime}}
  +
  +
The original words library file is a text file, its format is: {{ic|Character Pinyin Frequency}}
  +
  +
After getting the original dictionary file, execute {{ic|libime_pinyindict ''words-library.txt'' ''words-library.dict'' }}.
  +
  +
The custom dictionary file can be placed in {{ic|~/.local/share/fcitx5/pinyin/dictionaries}}
  +
  +
{{Note|The following projects may help:
  +
* [https://pypi.org/project/pypinyin/ Chinese characters to Pinyin]
  +
* [https://pypi.org/project/OpenCC/ Simplified and Traditional Chinese Conversion]
  +
}}
  +
  +
== 設定 ==
  +
  +
=== 設定ツール ===
  +
  +
{{Pkg|fcitx5}} の設定ファイルは、{{ic|~/.config/fcitx5}} にあります。テキストエディタを使用して設定ファイルを編集できますが、GUIを使った方が明らかに便利です。{{Pkg|fcitx5-configtool}} パッケージをインストールします。
  +
  +
=== XKB の設定を上書きしないようにする ===
  +
  +
Fcitx5 はデフォルトで X のキーボード設定を上書きします。({{ic|setxkbmap}} コマンドや [[デスクトップ環境]] が提供するグラフィカルなツールで設定できるものです) これを望んでいない場合は、{{ic|fcitx5-configtool}} を実行して、''Addons > XCB > Allow Overriding System XKB Settings'' のチェックを外してください。
  +
  +
=== テーマと外観 ===
  +
  +
==== テーマ ====
  +
  +
収録されているテーマは非常に少ないですが、[https://github.com/search?q=fcitx5+theme&type=Repositories GitHub] でより多くのテーマを見つけることができます。
  +
* {{Pkg|fcitx5-breeze}}: KDE Breeze スタイルにマッチする Fcitx5 テーマ。
  +
* {{Pkg|fcitx5-nord}}: [https://github.com/tonyfettes/fcitx5-nord Nord Color Themes]。
  +
* {{Pkg|fcitx5-material-color}}: このテーマは Microsoft PinYin のような感じです。公式のリポジトリは [https://github.com/hosxy/Fcitx5-Material-Color GitHub: Fcitx5-Material-Color] にあります。README.md に、ワンラインモードの美しい設定がいくつかあります。
  +
* {{AUR|fcitx5-solarized}}: Fcitx5 のための [https://github.com/mingyech/fcitx5-solarized Solarized] カラーのテーマ。
  +
* {{AUR|fcitx5-skin-fluentdark-git}}: ぼかし効果と影のある Fluent デザインのダークテーマ。
  +
  +
{{Tip|KDE Plasma で KCM を使用している場合は、''Setting > Regional Settings > Input Method > Configure addons > Classic User Interface > Theme'' でテーマを切り替えられます。}}
  +
  +
{{Note|GNOME 環境で {{AUR|gnome-shell-extension-kimpanel-git}} を使用している場合、Fcitx5 でテーマを設定することはできません。[https://yanqiyu.info/2020/11/06/fcitx5-fedora-updated/#60d50c0a87a8c64ae965e403]}}
  +
  +
==== シングルラインモードの有効化 ====
  +
  +
ピンイン入力メソッド (または Rime 入力メソッド) の設定で、''Show preedit within application'' を有効にすると、シングルラインモードが有効になります。
  +
  +
== トラブルシューティング ==
  +
  +
=== 問題の診断 ===
  +
  +
​fcitx5 の使用に問題がある場合 (例: ​{{ic|Ctrl+Space}} がすべてのアプリケーションで機能しないなど)、最初に試すべきことは、{{ic|fcitx5-diagnose}} を使用して診断することです。​{{ic|fcitx5-diagnose}} の出力には、最も一般的な問題の手がかりが含まれているはずです。
  +
  +
=== Fcitx5 シングルラインモードが一部のアプリケーションで動作しない ===
  +
  +
# シングルラインモードが [[Firefox]] などの gtk アプリケーションで動作しない場合、{{Pkg|fcitx5-gtk}} をインストールしてください。
  +
# シングルラインモードが [[WPS Office]] と Sublime Text で動作しない場合、これは [[WPS Office]] と Sublime Text 自体の問題であり、{{Pkg|fcitx5}} の問題ではありません。[https://github.com/fcitx/fcitx5/issues/60]
  +
  +
=== JetBrains IDE で Fcitx5 の位置がおかしい ===
  +
  +
IDE と同梱されている IDE に同梱されている JBR が正しくないことが原因です。この問題を解決するには、以下のことを行う必要があります:
  +
  +
{{AUR|jbr17-imfix}}{{Broken package link|package not found}} をインストールするか、[https://github.com/RikudouPatrickstar/JetBrainsRuntime-for-Linux-x64/releases 代替の JetBrainRuntime] をダウンロードし、展開してください。そして、[https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under JetBrains のサポート]に従って IDE の JBR を変更してください。
  +
  +
=== Fcitx5 が JetBrains IDE で動作しない ===
  +
  +
システムの[[ロケール]]が正しく設定されていて、かつロケールが正しく生成されていることを確認してください。ロケールが不適切であると、Fcitx5 が JetBrains IDE で適切に動作しなくなる原因になります。
  +
  +
=== 候補ボックス内で絵文字の表示がおかしい ===
  +
  +
* 絵文字のフォント (例えば {{Pkg|noto-fonts-emoji}}) がインストールされていることを確認します。
  +
* システムフォントを (日本語の場合は) {{ic|Noto Sans CJK JP}} などにします。
  +
* 次のコマンドを使用して、Fcitx5 を再起動します:
  +
  +
$ kill `ps -A | grep fcitx5 | awk '{print $1}'` && fcitx5&
  +
  +
=== RStudio で Fcitx5 が利用できない ===
  +
  +
以下のコマンドを実行してください:
  +
  +
$ strings /usr/lib/rstudio/lib/libQt5Core.so.5 | grep "Qt 5"
  +
  +
Qt ライブラリのバージョンを確認し、そのバージョンを使って {{Pkg|fcitx5-qt}} の {{ic|libfcitx5platforminputcontextplugin.so}} を再コンパイルし、成果物を {{ic|/usr/lib/rstudio/plugins/platforminputcontexts/}} ディレクトリ内に置いてください。
  +
  +
{{AUR|rstudio-desktop-bin}} を使用している場合、{{AUR|rstudio-fcitx5}} を直接インストールできます。
  +
  +
=== Steam と Dota 2 で Fcitx5 が利用できない ===
  +
  +
{{ic|Ctrl+Shift}} ではなく {{ic|Ctrl+Space}} を使うことで、Steam の Big Screen モードと Dota 2 で IME を有効化することができます。[https://github.com/fcitx/fcitx5/issues/442]
  +
  +
=== Wayland で実行すると Chromium で Fcitx5 が利用できない ===
  +
  +
この問題は Chromium が Wayland で GTK IM をまだサポートしていないことが原因です。これは、スタートアップフラグに {{ic|1=--gtk-version=4}} を追加することで解決できます。これでうまく行かない場合、{{Pkg|gtk4}} がインストールされていることを確認してください。[https://bugs.chromium.org/p/chromium/issues/detail?id=1183262]
  +
  +
=== GTK 環境の HiDPI モードで候補ポップアップがずれる ===
  +
  +
候補ポップアップの位置がカーソル位置に固定されていない場合は、{{Pkg|fcitx5-gtk}} を [[インストール]] して下さい。
  +
  +
=== kitty で fcitx5 を使用できない ===
  +
  +
こちらを参照 [[kitty#IME サポートを有効にする]]
  +
  +
=== Electron アプリケーションで Fcitx5 右 alt キーが効かない ===
  +
  +
非システムキーボードが何らかのアプリケーション (Discord、Element など) によって使用されている場合、そのアプリケーションはインプットメソッドよりも前に {{ic|ISO_Level3_Shift}} を処理することができます。その結果、一部のインプットソッドは特定のアプリケーションで動作しなくなります。解決策の一つとして、他のインプットメソッドグループを追加し、システムレイアウトをキーボードにお対応するように設定するというものがあります。例えば、プライマリシステムキーボードとして英語 QWERTY キーボードを使っている場合に {{ic|ąćęłńóśźż}} といったポーランド語の文字を入力するには、Fcitx5 Configuration GUI で以下のようにできます:
  +
  +
# ''Add Group'' のプラスボタンをクリックする。
  +
# ドロップダウンの中からそのグループを選択肢、インプットメソッドを追加する (キーボード。例えば ''Keyboard - Polish'')。
  +
# ''Select system keyboard layout'' でこのインプットメソッドと一致するものを選び、変更を適用する。
  +
  +
他の解決策が欲しい場合は、Fcitx5 の開発者たちのコメントを参照してください。[https://github.com/fcitx/fcitx5/issues/740]
  +
  +
=== Wayland 入力プロトコルを使用するソフトウェアで Wayland のポップアップウィンドウが出ない ===
  +
  +
{{Accuracy|下記の要約に反して、GTK には text-input-v3 のサポートがあります。}}
  +
  +
Wayland 入力プロトコルを使用するソフトウェア (環境変数 {{ic|1=GTK_IM_MODULE=wayland}} が設定されている場合の wezterm や GTK ソフトウェア) は、編集することはできますが、text-input-v3 サポートが存在しないためポップアップウィンドウが表示されません。
  +
  +
Qt ソフトウェアや GTK ソフトウェアの Wayland でのサポートについて、fcitx5 の開発者は以下のように述べています [https://www.csslayer.info/wordpress/linux/use-plasma-5-24-to-type-in-alacritty-or-any-other-text-input-v3-client-with-fcitx-5-on-wayland/]:
  +
  +
: Qt には text-input-v2 サポートがあります。QT_IM_MODULE が空であれば、使用することはできますが、プリエディットに関してマイナーな問題が発生します。加えて、Wayland インプットメソッドプロトコルの現在のバージョンでは、Wayland は1つのグローバルなインプットコンテキストしか持てません。なので現在、Fcitx 5 によってサポートされている「アプリケーション毎」の入力状態を使いたい場合に問題となります。しかし、Qt のテキスト入力プロトコルを使うことには、入力ウィンドウがチラつかないという利点があります。
  +
: Gtk には text-input-v3 サポートがありますが、プリエディットのスタイルは貧弱で、太字のフォントがハイライトされてしまいます。加えて、テキストサポートも貧弱です。なので現在、すべての Fcitx 機能を使いたい場合、{{ic|1=GTK_IM_MODULE=fcitx}} を使うのが依然として良い選択かもしれません。
  +
  +
==== Sway ====
  +
  +
Sway でのインプットメソッドのポップアップサポートは[https://github.com/swaywm/sway/pull/7226 マージされました]が、まだ安定リリースには至っていません。必要であれば、{{AUR|sway-im}} や {{AUR|sway-git}} で利用可能です。
  +
  +
==== GNOME ====
  +
  +
{{AUR|gnome-shell-extension-kimpanel-git}} プラグインをインストールしてください。
  +
  +
=== 一部のアプリケーションで Fcitx5 が利用できない ===
  +
  +
一部のアプリケーション (例: [[Anki]] Qt6) で Fcitx5 が利用できない場合、{{ic|~/.xprofile}} が存在することを確認してください。このファイルが存在しない場合は作成し、[[#統合|必要な環境変数]]を {{ic|~/.xprofile}} 内に記述してください。グラフィカルセッションを再起動し、確認してください。
  +
  +
== ヒントとテクニック ==
  +
  +
=== 繁体字と簡体字の変換をカスタマイズする ===
  +
  +
一部の IME はデフォルトで簡体字を想定しているため、簡体字入力を使用すると正しくない文字が表示されてしまいます (例: 為什麼 ではなく 爲什麼 になってしまう)。これを修正するために、{{ic|Simplified and Traditional Chinese Translation}} の使用をカスタマイズできます。
  +
  +
変換を設定するには、{{ic|OpenCC profile for Simplified to Traditional}} を以下のどれかの値に設定してください:
  +
* s2t - 簡体字から繁体字 (OpenCC) (これはデフォルトであり、おそらくあなたが望んでいるものではありません)
  +
* s2tw - 簡体字から繁体字 (台湾)
  +
* s2twp - 簡体字から繁体字 (台湾)。台湾語の熟語付き。
  +
* s2hk - 簡体字から繁体字 (香港)
  +
  +
逆の変換を行うには、{{ic|OpenCC profile for Traditional to Simplified}} を以下のどれかの値に設定してください:
  +
* t2s - 繁体字 (OpenCC) から 簡体字 (OpenCC) (これはデフォルトであり、おそらくあなたが望んでいるものではありません)
  +
* tw2s - 繁体字 (台湾) から 簡体字 (OpenCC)
  +
* tw2sp - 繁体字 (台湾) から 簡体字 (OpenCC)。本土中国語の熟語付き。
  +
* t2hk - 繁体字 (OpenCC) から香港繁体字
  +
* t2tw - 繁体字 (OpenCC) から台湾繁体字
  +
* tw2t - 繁体字 (台湾) から 繁体字 (OpenCC)
  +
* hk2s - 繁体字 (香港) から 簡体字 (OpenCC)
  +
* hk2t - 繁体字 (香港) から 繁体字中国語 (OpenCC)
  +
* t2jp - 旧字体 から日本語の新字体
  +
* jp2t - 日本語の新字体から旧字体
  +
  +
最新のリストはここにあります: [https://github.com/BYVoid/OpenCC OpenCC]
  +
  +
=== 選択した文字列の Unicode エンコードを表示する ===
  +
  +
* テキストエディタで選択したテキストの Unicode エンコードを表示したい場合、テキストを直接選択し、ショートカットキー {{ic|Ctrl+Alt+Shift+u}} を使うことで、選択したテキストのエンコーディングを表示することができます。
  +
* (この Wiki のような) 非編集可能領域のテキストの Unicode エンコードを表示する場合は、まずテキストをクリップボードにコピーしてから、編集可能な領域 (検索ボックスなど) をクリックする必要があります。次に、ショートカットキー {{ic|Ctrl+Alt+Shift+u}} を使用して、クリップボード内のテキストのエンコーディングを表示できます。
  +
  +
=== 特殊文字を入力する ===
  +
  +
一般に、{{ic|≤}}、{{ic|ā}}、{{ic|á}}、{{ic|©}} などの単純な記号は、[[Xorg でのキーボード設定#コンポーズキーの設定|コンポーズキーを設定する]]ことで入力できますが、{{ic|②}}、{{ic|③}}、{{ic|④}} などの特殊記号の場合は、{{ic|~/.XCompose}} をカスタマイズするか、Fcitx5 の Unicode 機能を使用します。
  +
  +
{{ic|①}} を例にとってみましょう:
  +
  +
任意の入力ボックスにカーソルを置いて {{ic|Ctrl+Alt+Shift+u}} を押し、{{ic|circle one}} と入力すると、{{ic|①}} どの特殊文字が表示されます。
  +
  +
=== 半角/全角句読点の切り替え ===
  +
  +
{{Pkg|fcitx5-chinese-addons}} では、デフォルトで全角句読点が使用されますが、{{ic|Ctrl+.}} で半角と全角の句読点を切り替えることができます。
  +
  +
=== vim で自動的に入力メソッドを切り替える ===
  +
  +
[https://github.com/lilydjwg/fcitx.vim fcitx.vim] プラグインを使用することが推奨されています。このプラグインは、それぞれの insert モードにおいてバッファの入力メソッドの状態を個別に保持します。
  +
  +
シンプルなソリューションとしては、以下のコードを {{ic|~/.vimrc}} の末尾に追加できます: [https://www.zhihu.com/question/341748857/answer/1739052604][https://sur.moe/post/vim%E8%BE%93%E5%85%A5%E6%B3%95%E5%88%87%E6%8D%A2%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%8F%92%E4%BB%B6/]
  +
  +
{{hc|~/.vimrc|<nowiki>
  +
let fcitx5state=system("fcitx5-remote")
  +
autocmd InsertLeave * :silent let fcitx5state=system("fcitx5-remote")[0] | silent !fcitx5-remote -c " Disable the input method when exiting insert mode and save the state
  +
autocmd InsertEnter * :silent if fcitx5state == 2 | call system("fcitx5-remote -o") | endif " 2 means that the input method was opened in the previous state, and the input method is started when entering the insert mode
  +
</nowiki>}}
  +
  +
{{Pkg|neovim}} を使用している場合、上記のコードを {{ic|~/.config/nvim/init.vim}} の末尾に追加してください。
  +
  +
Vim9 を使用している場合、コードは以下のようになります:
  +
  +
{{hc|~/.vimrc|<nowiki>
  +
# Only taking affect after using vim9script grammar or has `vim9script` keyword.
  +
var fcitx5state = system("fcitx5-remote")
  +
autocmd InsertLeave * :silent fcitx5state = system("fcitx5-remote")[0] | silent !fcitx5-remote -c
  +
autocmd InsertEnter * :silent if fcitx5state == '2' | call system("fcitx5-remote -o") | endif
  +
</nowiki>}}
  +
  +
{{Note|vim.cmd にこのコードを追加する場合、アンコメントする必要があるかもしれません。}}
  +
  +
VSCodeVim を使用している場合、以下のスニペットを設定ファイルに追加してください:
  +
  +
"vim.autoSwitchInputMethod.enable": true,
  +
"vim.autoSwitchInputMethod.defaultIM": "1",
  +
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/fcitx5-remote",
  +
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/fcitx5-remote -t {im}",
  +
  +
=== ピンイン入力メソッド ===
  +
  +
{{Note|The following functions are only valid for the Pinyin input method in {{Pkg|fcitx5-chinese-addons}}, please explore other input methods by yourself. }}
  +
  +
==== Sogou 単語ライブラリをインポートする ====
  +
  +
* For [[KDE]] users, you can import Sogou words library through ''Settings > Regional Settings > Input Method > Pinyin > Dictionary > Import''.
  +
* For users who use {{Pkg|fcitx5-configtool}}, you need to manually open the software "Fcitx5 Configuration" and manually configure it in the Pinyin input method.
  +
  +
You can import local words library or browse and import online words library.
  +
  +
==== Cloud Pinyin ====
  +
  +
On the settings page of the Pinyin input method, you can enable Cloud Pinyin. But if you need to change the default backend of Cloud Pinyin, you need to change it in the global settings of {{Pkg|fcitx5}}. Provided backends are {{ic|Google}}, {{ic|Baidu}}, {{ic|GoogleCN}}.
  +
  +
==== Stroke Filter ====
  +
  +
Set the shortcut key after the "stroke filter" of the pinyin input method you set (the default is {{ic|`}})
  +
Then after entering the text, press the shortcut key, the words '''stroke filter''' will appear in the candidate box of the input method, and the words can be filtered by strokes. The specific rules are: h horizontal stroke, s vertical stroke, p left-falling stroke, n right-falling stroke, z turning stroke.
  +
  +
By default, the stroke filter is to filter the first character of a sentence, but you can switch between different characters in a sentence by using '''determining characters by word'''.
  +
  +
For example, to perform stroke filtering on the third character in the word 中华人民共和国, you can press {{ic|]}} twice in a row after enabling stroke filtering to let {{Pkg|fcitx5}} perform stroke filtering on it.
  +
  +
{{Note|By default, the shortcut keys of '''Determining characters with words''' are {{ic|[}} and {{ic|]}}, and the shortcut keys can be viewed in the settings of '''Pinyin input method'''.}}
  +
  +
=== RIME/Zhongzhou rhyme ===
  +
  +
{{Tip|All changes need to be redeployed to take effect.}}
  +
  +
==== 単語ライブラリをインポートする ====
  +
  +
Take importing words library {{Pkg|rime-pinyin-zhwiki}} and {{AUR|fcitx5-pinyin-moegirl-rime}} as an example.
  +
  +
{{Tip|It is also possible to put the custom words library into {{ic|~/.local/share/fcitx5/rime/}}, and the file name (filename.dict.yaml) should be the same as the words library name ([https://github.com/rime/home/wiki/RimeWithSchemata#%E7%A2%BC%E8%A1%A8%E8%88%87%E8%A9%9E%E5%85%B8 words library format]) }}
  +
  +
1. Change the {{ic|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml}} file (take {{ic|luna_pinyin}} as an example, and modify the name of the other input schemes)
  +
  +
{{hc|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml|
  +
# There should only be one "patch:" in the file, if it already exists, just paste the following code
  +
# This file is used to modify a specific input scheme, change the above luna_pinyin to other input scheme names to complete the modification of other input schemes
  +
patch:
  +
"translator/dictionary": extended #The dictionary name can be customized, just keep the same as the file name below
  +
}}
  +
  +
2. Create a new {{ic|~/.local/share/fcitx5/rime/extended.dict.yaml}} file
  +
  +
{{Tip|Import custom words library just add the words library name after "import_tables:"}}
  +
  +
{{hc|~/.local/share/fcitx5/rime/extended.dict.yaml|
  +
# The following disables the default words library and does not enable the default "Baguwen" words library and word frequency system, if you do not want traditional characters and box characters to appear in candidate words
  +
---
  +
name: extended
  +
version: "2021.02.19"
  +
sort: by_weight
  +
use_preset_vocabulary: false #Whether to enable the default "Baguwen" words library and word frequency system, if you want to enable it, please set it to true.
  +
import_tables:
  +
# - luna_pinyin #Default words library, please uncomment if you want to enable it
  +
- zhwiki
  +
- moegirl
  +
# - custom words library name
  +
...
  +
}}
  +
  +
==== 模糊音の設定 ====
  +
  +
Please comment (#) or delete unnecessary fuzzy sounds as needed. If you need to add other fuzzy sounds, please refer to [https://gist.github.com/2320943 Mingyue Pinyin fuzzy sound custom template]
  +
  +
If the {{ic|luna_pinyin.custom.yaml}} file does not exist
  +
  +
{{hc|~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml|
  +
patch:
  +
"speller/algebra":
  +
- derive/^([zcs])h/$1/ #zh,ch,sh->z,c,s
  +
- derive/^([zcs])([^h])/$1h$2/ #z,c,s->zh,ch,sh
  +
- derive/^n/l #n->l
  +
- derive/^l/n #l->n
  +
- derive/([ei])n$/$1ng/ # en -> eng, in -> ing
  +
- derive/([ei])ng$/$1n/ # eng->en, ing -> in
  +
- abbrev/^([a-z]).+$/$1/ #Jianpin support
  +
- abbrev/^([zcs]h).+$/$1/ #fuzzy sounds support for Jianpin
  +
delimiter: " '" #delimiter
  +
}}
   
  +
If the file exists, paste the part below {{ic|patch:}} to the end of the file (there is only one {{ic|patch:}} in {{ic|luna_pinyin.custom.yaml}})
=== 他の言語 ===
 
   
  +
==== 特殊記号 ====
* {{Pkg|fcitx5-hangul}} は {{Pkg|libhangul}} ベースの韓国語ハングル入力エンジンです。
 
* {{Pkg|fcitx5-unikey}} はベトナム文字入力エンジンです。
 
   
  +
{{Note|Fcitx5 には特殊記号の組み込みサポートがあります。[[#特殊文字を入力する]] を参照してください。}}
== インプットメソッドモジュール ==
 
   
  +
Import the {{ic|symbols.dict.yaml}} words library in the [https://github.com/yangshann/rime-dict rime-dict] project to input Greek letters, some mathematical symbols and Emoji expressions in Pinyin.
より良いエクスペリエンスを得るために、以下のモジュールもインストールすると良いでしょう。モジュールをインストールしなくても大抵のアプリケーションでインプットメソッドは動作しますが、インプットメソッドがフリーズしたり、プレビューウィンドウの位置がずれたり、プレビューが表示されなかったりする可能性があります。
 
   
  +
Example:
* Qt5 プログラムのモジュールは {{Pkg|fcitx5-qt}} をインストールしてください。
 
* GTK プログラムのモジュールは {{Pkg|fcitx5-gtk}} をインストールしてください。
 
* Qt4 プログラムのモジュールは {{AUR|fcitx5-qt4-git}} をインストールしてください。
 
   
  +
* Greek letters: input {{ic|alpha}} to output {{ic|α}}
{{Tip|通常、{{Pkg|fcitx5-qt}} と {{Pkg|fcitx5-gtk}} をインストールすると、あらゆる状況に対応できます。}}
 
   
  +
* Mathematical symbols: input {{ic|jifen}} to output {{ic|∫}}
== 設定ツール ==
 
   
  +
* Special symbols: Input {{ic|cha}} to output {{ic|✕,✖}}
{{Pkg|fcitx5}} の設定ファイルは、{{ic|~/.local/share/fcitx5}} にあります。テキストエディタを使用して設定ファイルを編集できますが、GUIを使った方が明らかに便利です:
 
   
  +
* Serial number: input {{ic|qi}} to output {{ic|Ⅶ,⑦}}
* {{Pkg|kcm-fcitx5}}: KDE向けに作られた、KCMに統合された設定ツール
 
* {{AUR|fcitx5-config-qt-git}}: Qtフロントエンドの fcitx5 設定ツールです。{{Pkg|kcm-fcitx5}} と競合します。
 
   
  +
* Emoji expression: Input {{ic|haha}} to output {{ic|😃,😆}}
{{Note|fcitx5 の開発者は gtk の設定ツールを開発する予定はないと明言しています。KDE 以外のインターフェイスでは、{{AUR|fcitx5-config-qt-git}} を使うことができます。このパッケージは、{{Pkg|kcm-fcitx5}} と競合するので、'''手動でアンインストールする必要があります'''。}}
 
   
  +
==== librime-lua プラグインをロードする ====
== テーマ ==
 
   
  +
If you want to load the librime-lua plugin, you must add the {{ic|lua}} module in the Rime input method settings of the fcitx configuration tool.
収録されているテーマは非常に少なく、[https://github.com/search?q=fcitx5+theme&type=Repositories GitHub] でより多くのテーマを見つけることができます。
 
* {{Pkg|fcitx5-material-color}}: このテーマはマイクロソフトの PinYin のような感じです。公式版は[https://github.com/hosxy/Fcitx5-Material-Color GitHub: Fcitx5-Material-Color] にあります。README.md ファイルに1行モードの美しい感じを設定するためのガイダンスがあります。
 
   
  +
{{TranslationStatus|Fcitx5|2024-03-27|804681}}
{{Tip|KCM を使用している場合は、''Setting -> Location -> input method -> Configure addons -> Classic user interface -> Theme'' でテーマを切り替えます。}}
 

2024年3月27日 (水) 10:36時点における最新版

関連記事

Fcitx5 は、軽量コアを備えたインプットメソッドフレームワークであり、アドオンを介して追加の言語サポートを提供します。 Fcitx の後継です。

目次

インストール

fcitx5 パッケージをインストールしてください。

fcitx5-im パッケージグループは、メインの fcitx5 パッケージと、#インプットメソッドモジュール の一部、そして #設定ツール を提供します。

ノート: fcitx5 パッケージ自体は、英語サポートのみの基本的なフレームワークしか提供しません。中国語や日本語などの他の言語を入力する場合は、インプットメソッドエンジン (IME) が必要です。

使用可能な IME のリストについては、インプットメソッド#使用可能なインプトメソッドエディターの一覧 を参照してください。

インプットメソッドモジュール

一部の GUI ツールキットは、アプリケーションでのインプットメソッド統合のためのインプットメソッドモジュールのサポートを提供します。しかし、これらは必ずしも必要であるわけではなく、#Wayland ネイティブなプロトコルのほうがより優れたパフォーマンスを得られるかもしれません。詳細は #統合 を参照してください。

プラグイン

日付と時刻のサポートは fcitx5-lua をインストールしてください。

使用方法

統合

インプットメソッドを実際に使用するには、アプリケーション側が入力イベントをインプットメソッドにリダイレクトする必要があります。そのような目的のために使用されるプロトコルは、ディスプレイサーバ (つまり、Waylandtext-inputXorgXIM) や GUI ツールキットのインプットメソッドモジュールが提供していることがあります。

Wayland

通常、Wayland のネイティブな text-input プロトコルでは、インプットメソッドモジュールよりも良い結果を得られます。なので、#IM モジュールXwayland アプリケーションでのみ使用することが推奨されます。加えて、レガシーな X11 アプリケーションに対しては #XIM を有効化してください。[1]

ノート:
  • text-input は、Wayland コンポジタとクライアントが使用しているプロトコルのバージョンが同じである必要があります。一部のアプリケーションでプロトコルのバージョンが異なる場合は、#IM モジュール を使用したほうが良いかもしれません。特に、Qt < 6.7 は text-input-v3 プロトコルをサポートしていません (2024年3月現在、GNOMESway はこのバージョンのプロトコルしかサポートしていません)。
  • KDE Wayland では、インプットメソッドのプロセスが KWin によって実行される必要があります。[2] そうするには、実行中の Fcitx 5 プロセスを終了し、System Settings > Input Devices > Virtual Keyboard を開き、そこで Fcitx 5 を選択してください。

IM モジュール

以下の環境変数[3]を、X11 を使用している場合はグローバルにtext-input サポートのある Wayland コンポジタを使用している場合は Xwayland アプリケーション毎に、設定してください。

GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
ノート:
  • SDL2 ライブラリの特定のバージョンを使用する一部のゲームのサポートを有効化するには、SDL_IM_MODULE=fcitx追加してください。
  • kitty でのサポートを有効化するには GLFW_IM_MODULE=ibus追加してください。この環境変数の値として使えるのは ibus のみです。[4]

あるいは、Wayland ネイティブな GTK アプリケーションに影響を与えずに、X11/XWayland で実行されている GTK アプリケーションに IM モジュールを使用させるには、GTK3 に対しては gtk-im-module=fcitx を、GTK2 に対しては gtk-im-module="fcitx" を、GTK#設定 で書かれてあるような設定ファイルに書き込んでください。

ロケールが en_US.UTF-8 であり、GTK2 アプリケーションが fcitx5 をアクティブ化できない場合は、そのアプリケーションに対して個別に GTK_IM_MODULE=xim を設定することで解決します。

ノート: GTK3 のプログラムにも影響するので、グローバルに GTK_IM_MODULE を xim に設定しないようにしてください。XIM はいろいろと問題があるので (再起動すると入力できなくなるなど)、なるべく使わないでください。

XIM

X11 アプリケーションに対しては、以下の環境変数で XIM サポートを有効化してください:

XMODIFIERS=@im=fcitx

自動起動

使用しているデスクトップ環境XDG Autostart を実装している場合、自動起動#デスクトップ環境のスタートアップ時 を参照してください。

自動起動#Xorg のスタートアップ時 を参照し、必要に応じて 自動起動#ウィンドウマネージャのスタートアップ時 も見てください。

ヒント: Fcitx5 が正しく動作しているか確認するには、何らかのアプリケーションを開き、Ctrl+Space を押してインプットメソッド (設定されていれば) を切り替えて、何か入力してみてください。
ノート: KDE Wayland で Wayland の text-input プロトコルを使うには、#Wayland に書かれてあるノートにも従ってください。

単語ライブラリ

中国語

For the Chinese input method of Fcitx5, several words libraries are currently provided in the repository:

ノート: Manually downloaded words library files can be directly placed in the path of ~/.local/share/fcitx5/pinyin/dictionaries. The suffix of the words library file should be .dict

カスタムの単語ライブラリ

中国語

Generally speaking, since fcitx5 supports importing the Sogou words library, there is no need to customize words library to a large extent, but fcitx5 still provides related tools.

The original words library file is a text file, its format is: Character Pinyin Frequency

After getting the original dictionary file, execute libime_pinyindict words-library.txt words-library.dict .

The custom dictionary file can be placed in ~/.local/share/fcitx5/pinyin/dictionaries

ノート: The following projects may help:

設定

設定ツール

fcitx5 の設定ファイルは、~/.config/fcitx5 にあります。テキストエディタを使用して設定ファイルを編集できますが、GUIを使った方が明らかに便利です。fcitx5-configtool パッケージをインストールします。

XKB の設定を上書きしないようにする

Fcitx5 はデフォルトで X のキーボード設定を上書きします。(setxkbmap コマンドや デスクトップ環境 が提供するグラフィカルなツールで設定できるものです) これを望んでいない場合は、fcitx5-configtool を実行して、Addons > XCB > Allow Overriding System XKB Settings のチェックを外してください。

テーマと外観

テーマ

収録されているテーマは非常に少ないですが、GitHub でより多くのテーマを見つけることができます。

ヒント: KDE Plasma で KCM を使用している場合は、Setting > Regional Settings > Input Method > Configure addons > Classic User Interface > Theme でテーマを切り替えられます。
ノート: GNOME 環境で gnome-shell-extension-kimpanel-gitAUR を使用している場合、Fcitx5 でテーマを設定することはできません。[5]

シングルラインモードの有効化

ピンイン入力メソッド (または Rime 入力メソッド) の設定で、Show preedit within application を有効にすると、シングルラインモードが有効になります。

トラブルシューティング

問題の診断

​fcitx5 の使用に問題がある場合 (例: ​Ctrl+Space がすべてのアプリケーションで機能しないなど)、最初に試すべきことは、fcitx5-diagnose を使用して診断することです。​fcitx5-diagnose の出力には、最も一般的な問題の手がかりが含まれているはずです。

Fcitx5 シングルラインモードが一部のアプリケーションで動作しない

  1. シングルラインモードが Firefox などの gtk アプリケーションで動作しない場合、fcitx5-gtk をインストールしてください。
  2. シングルラインモードが WPS Office と Sublime Text で動作しない場合、これは WPS Office と Sublime Text 自体の問題であり、fcitx5 の問題ではありません。[6]

JetBrains IDE で Fcitx5 の位置がおかしい

IDE と同梱されている IDE に同梱されている JBR が正しくないことが原因です。この問題を解決するには、以下のことを行う必要があります:

jbr17-imfixAUR[リンク切れ: package not found] をインストールするか、代替の JetBrainRuntime をダウンロードし、展開してください。そして、JetBrains のサポートに従って IDE の JBR を変更してください。

Fcitx5 が JetBrains IDE で動作しない

システムのロケールが正しく設定されていて、かつロケールが正しく生成されていることを確認してください。ロケールが不適切であると、Fcitx5 が JetBrains IDE で適切に動作しなくなる原因になります。

候補ボックス内で絵文字の表示がおかしい

  • 絵文字のフォント (例えば noto-fonts-emoji) がインストールされていることを確認します。
  • システムフォントを (日本語の場合は) Noto Sans CJK JP などにします。
  • 次のコマンドを使用して、Fcitx5 を再起動します:
$ kill `ps -A | grep fcitx5 | awk '{print $1}'` && fcitx5&

RStudio で Fcitx5 が利用できない

以下のコマンドを実行してください:

$ strings /usr/lib/rstudio/lib/libQt5Core.so.5 | grep "Qt 5"

Qt ライブラリのバージョンを確認し、そのバージョンを使って fcitx5-qtlibfcitx5platforminputcontextplugin.so を再コンパイルし、成果物を /usr/lib/rstudio/plugins/platforminputcontexts/ ディレクトリ内に置いてください。

rstudio-desktop-binAUR を使用している場合、rstudio-fcitx5AUR を直接インストールできます。

Steam と Dota 2 で Fcitx5 が利用できない

Ctrl+Shift ではなく Ctrl+Space を使うことで、Steam の Big Screen モードと Dota 2 で IME を有効化することができます。[7]

Wayland で実行すると Chromium で Fcitx5 が利用できない

この問題は Chromium が Wayland で GTK IM をまだサポートしていないことが原因です。これは、スタートアップフラグに --gtk-version=4 を追加することで解決できます。これでうまく行かない場合、gtk4 がインストールされていることを確認してください。[8]

GTK 環境の HiDPI モードで候補ポップアップがずれる

候補ポップアップの位置がカーソル位置に固定されていない場合は、fcitx5-gtkインストール して下さい。

kitty で fcitx5 を使用できない

こちらを参照 kitty#IME サポートを有効にする

Electron アプリケーションで Fcitx5 右 alt キーが効かない

非システムキーボードが何らかのアプリケーション (Discord、Element など) によって使用されている場合、そのアプリケーションはインプットメソッドよりも前に ISO_Level3_Shift を処理することができます。その結果、一部のインプットソッドは特定のアプリケーションで動作しなくなります。解決策の一つとして、他のインプットメソッドグループを追加し、システムレイアウトをキーボードにお対応するように設定するというものがあります。例えば、プライマリシステムキーボードとして英語 QWERTY キーボードを使っている場合に ąćęłńóśźż といったポーランド語の文字を入力するには、Fcitx5 Configuration GUI で以下のようにできます:

  1. Add Group のプラスボタンをクリックする。
  2. ドロップダウンの中からそのグループを選択肢、インプットメソッドを追加する (キーボード。例えば Keyboard - Polish)。
  3. Select system keyboard layout でこのインプットメソッドと一致するものを選び、変更を適用する。

他の解決策が欲しい場合は、Fcitx5 の開発者たちのコメントを参照してください。[9]

Wayland 入力プロトコルを使用するソフトウェアで Wayland のポップアップウィンドウが出ない

この記事またはセクションの正確性には問題があります。
理由: 下記の要約に反して、GTK には text-input-v3 のサポートがあります。 (議論: トーク:Fcitx5#)

Wayland 入力プロトコルを使用するソフトウェア (環境変数 GTK_IM_MODULE=wayland が設定されている場合の wezterm や GTK ソフトウェア) は、編集することはできますが、text-input-v3 サポートが存在しないためポップアップウィンドウが表示されません。

Qt ソフトウェアや GTK ソフトウェアの Wayland でのサポートについて、fcitx5 の開発者は以下のように述べています [10]:

Qt には text-input-v2 サポートがあります。QT_IM_MODULE が空であれば、使用することはできますが、プリエディットに関してマイナーな問題が発生します。加えて、Wayland インプットメソッドプロトコルの現在のバージョンでは、Wayland は1つのグローバルなインプットコンテキストしか持てません。なので現在、Fcitx 5 によってサポートされている「アプリケーション毎」の入力状態を使いたい場合に問題となります。しかし、Qt のテキスト入力プロトコルを使うことには、入力ウィンドウがチラつかないという利点があります。
Gtk には text-input-v3 サポートがありますが、プリエディットのスタイルは貧弱で、太字のフォントがハイライトされてしまいます。加えて、テキストサポートも貧弱です。なので現在、すべての Fcitx 機能を使いたい場合、GTK_IM_MODULE=fcitx を使うのが依然として良い選択かもしれません。

Sway

Sway でのインプットメソッドのポップアップサポートはマージされましたが、まだ安定リリースには至っていません。必要であれば、sway-imAURsway-gitAUR で利用可能です。

GNOME

gnome-shell-extension-kimpanel-gitAUR プラグインをインストールしてください。

一部のアプリケーションで Fcitx5 が利用できない

一部のアプリケーション (例: Anki Qt6) で Fcitx5 が利用できない場合、~/.xprofile が存在することを確認してください。このファイルが存在しない場合は作成し、必要な環境変数~/.xprofile 内に記述してください。グラフィカルセッションを再起動し、確認してください。

ヒントとテクニック

繁体字と簡体字の変換をカスタマイズする

一部の IME はデフォルトで簡体字を想定しているため、簡体字入力を使用すると正しくない文字が表示されてしまいます (例: 為什麼 ではなく 爲什麼 になってしまう)。これを修正するために、Simplified and Traditional Chinese Translation の使用をカスタマイズできます。

変換を設定するには、OpenCC profile for Simplified to Traditional を以下のどれかの値に設定してください:

  • s2t - 簡体字から繁体字 (OpenCC) (これはデフォルトであり、おそらくあなたが望んでいるものではありません)
  • s2tw - 簡体字から繁体字 (台湾)
  • s2twp - 簡体字から繁体字 (台湾)。台湾語の熟語付き。
  • s2hk - 簡体字から繁体字 (香港)

逆の変換を行うには、OpenCC profile for Traditional to Simplified を以下のどれかの値に設定してください:

  • t2s - 繁体字 (OpenCC) から 簡体字 (OpenCC) (これはデフォルトであり、おそらくあなたが望んでいるものではありません)
  • tw2s - 繁体字 (台湾) から 簡体字 (OpenCC)
  • tw2sp - 繁体字 (台湾) から 簡体字 (OpenCC)。本土中国語の熟語付き。
  • t2hk - 繁体字 (OpenCC) から香港繁体字
  • t2tw - 繁体字 (OpenCC) から台湾繁体字
  • tw2t - 繁体字 (台湾) から 繁体字 (OpenCC)
  • hk2s - 繁体字 (香港) から 簡体字 (OpenCC)
  • hk2t - 繁体字 (香港) から 繁体字中国語 (OpenCC)
  • t2jp - 旧字体 から日本語の新字体
  • jp2t - 日本語の新字体から旧字体

最新のリストはここにあります: OpenCC

選択した文字列の Unicode エンコードを表示する

  • テキストエディタで選択したテキストの Unicode エンコードを表示したい場合、テキストを直接選択し、ショートカットキー Ctrl+Alt+Shift+u を使うことで、選択したテキストのエンコーディングを表示することができます。
  • (この Wiki のような) 非編集可能領域のテキストの Unicode エンコードを表示する場合は、まずテキストをクリップボードにコピーしてから、編集可能な領域 (検索ボックスなど) をクリックする必要があります。次に、ショートカットキー Ctrl+Alt+Shift+u を使用して、クリップボード内のテキストのエンコーディングを表示できます。

特殊文字を入力する

一般に、āá© などの単純な記号は、コンポーズキーを設定することで入力できますが、 などの特殊記号の場合は、~/.XCompose をカスタマイズするか、Fcitx5 の Unicode 機能を使用します。

を例にとってみましょう:

任意の入力ボックスにカーソルを置いて Ctrl+Alt+Shift+u を押し、circle one と入力すると、 どの特殊文字が表示されます。

半角/全角句読点の切り替え

fcitx5-chinese-addons では、デフォルトで全角句読点が使用されますが、Ctrl+. で半角と全角の句読点を切り替えることができます。

vim で自動的に入力メソッドを切り替える

fcitx.vim プラグインを使用することが推奨されています。このプラグインは、それぞれの insert モードにおいてバッファの入力メソッドの状態を個別に保持します。

シンプルなソリューションとしては、以下のコードを ~/.vimrc の末尾に追加できます: [11][12]

~/.vimrc
let fcitx5state=system("fcitx5-remote")
autocmd InsertLeave * :silent let fcitx5state=system("fcitx5-remote")[0] | silent !fcitx5-remote -c " Disable the input method when exiting insert mode and save the state
autocmd InsertEnter * :silent if fcitx5state == 2 | call system("fcitx5-remote -o") | endif " 2 means that the input method was opened in the previous state, and the input method is started when entering the insert mode

neovim を使用している場合、上記のコードを ~/.config/nvim/init.vim の末尾に追加してください。

Vim9 を使用している場合、コードは以下のようになります:

~/.vimrc
# Only taking affect after using vim9script grammar or has `vim9script` keyword.
var fcitx5state = system("fcitx5-remote")
autocmd InsertLeave * :silent fcitx5state = system("fcitx5-remote")[0] | silent !fcitx5-remote -c
autocmd InsertEnter * :silent if fcitx5state == '2' | call system("fcitx5-remote -o") | endif
ノート: vim.cmd にこのコードを追加する場合、アンコメントする必要があるかもしれません。

VSCodeVim を使用している場合、以下のスニペットを設定ファイルに追加してください:

"vim.autoSwitchInputMethod.enable": true,
"vim.autoSwitchInputMethod.defaultIM": "1",
"vim.autoSwitchInputMethod.obtainIMCmd": "/usr/bin/fcitx5-remote",
"vim.autoSwitchInputMethod.switchIMCmd": "/usr/bin/fcitx5-remote -t {im}",

ピンイン入力メソッド

ノート: The following functions are only valid for the Pinyin input method in fcitx5-chinese-addons, please explore other input methods by yourself.

Sogou 単語ライブラリをインポートする

  • For KDE users, you can import Sogou words library through Settings > Regional Settings > Input Method > Pinyin > Dictionary > Import.
  • For users who use fcitx5-configtool, you need to manually open the software "Fcitx5 Configuration" and manually configure it in the Pinyin input method.

You can import local words library or browse and import online words library.

Cloud Pinyin

On the settings page of the Pinyin input method, you can enable Cloud Pinyin. But if you need to change the default backend of Cloud Pinyin, you need to change it in the global settings of fcitx5. Provided backends are Google, Baidu, GoogleCN.

Stroke Filter

Set the shortcut key after the "stroke filter" of the pinyin input method you set (the default is `) Then after entering the text, press the shortcut key, the words stroke filter will appear in the candidate box of the input method, and the words can be filtered by strokes. The specific rules are: h horizontal stroke, s vertical stroke, p left-falling stroke, n right-falling stroke, z turning stroke.

By default, the stroke filter is to filter the first character of a sentence, but you can switch between different characters in a sentence by using determining characters by word.

For example, to perform stroke filtering on the third character in the word 中华人民共和国, you can press ] twice in a row after enabling stroke filtering to let fcitx5 perform stroke filtering on it.

ノート: By default, the shortcut keys of Determining characters with words are [ and ], and the shortcut keys can be viewed in the settings of Pinyin input method.

RIME/Zhongzhou rhyme

ヒント: All changes need to be redeployed to take effect.

単語ライブラリをインポートする

Take importing words library rime-pinyin-zhwiki and fcitx5-pinyin-moegirl-rimeAUR as an example.

ヒント: It is also possible to put the custom words library into ~/.local/share/fcitx5/rime/, and the file name (filename.dict.yaml) should be the same as the words library name (words library format)

1. Change the ~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml file (take luna_pinyin as an example, and modify the name of the other input schemes)

~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml
# There should only be one "patch:" in the file, if it already exists, just paste the following code
# This file is used to modify a specific input scheme, change the above luna_pinyin to other input scheme names to complete the modification of other input schemes
patch:
    "translator/dictionary": extended #The dictionary name can be customized, just keep the same as the file name below

2. Create a new ~/.local/share/fcitx5/rime/extended.dict.yaml file

ヒント: Import custom words library just add the words library name after "import_tables:"
~/.local/share/fcitx5/rime/extended.dict.yaml
# The following disables the default words library and does not enable the default "Baguwen" words library and word frequency system, if you do not want traditional characters and box characters to appear in candidate words
---
name: extended
version: "2021.02.19"
sort: by_weight
use_preset_vocabulary: false #Whether to enable the default "Baguwen" words library and word frequency system, if you want to enable it, please set it to true.
import_tables:
  # - luna_pinyin #Default words library, please uncomment if you want to enable it
  - zhwiki
  - moegirl
  # - custom words library name
...

模糊音の設定

Please comment (#) or delete unnecessary fuzzy sounds as needed. If you need to add other fuzzy sounds, please refer to Mingyue Pinyin fuzzy sound custom template

If the luna_pinyin.custom.yaml file does not exist

~/.local/share/fcitx5/rime/luna_pinyin.custom.yaml
patch:
    "speller/algebra":
        - derive/^([zcs])h/$1/ #zh,ch,sh->z,c,s
        - derive/^([zcs])([^h])/$1h$2/ #z,c,s->zh,ch,sh
        - derive/^n/l #n->l
        - derive/^l/n #l->n
        - derive/([ei])n$/$1ng/  # en -> eng, in -> ing
        - derive/([ei])ng$/$1n/ # eng->en, ing -> in
        - abbrev/^([a-z]).+$/$1/ #Jianpin support
        - abbrev/^([zcs]h).+$/$1/ #fuzzy sounds support for Jianpin
        delimiter: " '" #delimiter

If the file exists, paste the part below patch: to the end of the file (there is only one patch: in luna_pinyin.custom.yaml)

特殊記号

ノート: Fcitx5 には特殊記号の組み込みサポートがあります。#特殊文字を入力する を参照してください。

Import the symbols.dict.yaml words library in the rime-dict project to input Greek letters, some mathematical symbols and Emoji expressions in Pinyin.

Example:

  • Greek letters: input alpha to output α
  • Mathematical symbols: input jifen to output
  • Special symbols: Input cha to output ✕,✖
  • Serial number: input qi to output Ⅶ,⑦
  • Emoji expression: Input haha to output 😃,😆

librime-lua プラグインをロードする

If you want to load the librime-lua plugin, you must add the lua module in the Rime input method settings of the fcitx configuration tool.

翻訳ステータス: このページは en:Fcitx5 の翻訳バージョンです。最後の翻訳日は 2024-03-27 です。もし英語版に 変更 があれば、翻訳の同期を手伝うことができます。