GithubHelp home page GithubHelp logo

fcitx5-chewing's Introduction

fcitx5-chewing

Chewing Wrapper for Fcitx.

This provides libchewing input method support for fcitx5. Released under GPL2+.

Jenkins Build Status

Coverity Scan Status

fcitx5-chewing's People

Contributors

wengxt avatar taylorchu avatar yuyichao avatar hiroshiyui avatar mlouielu avatar rypervenche avatar eagleoflqj avatar zonble avatar

Stargazers

Alan Kuan avatar Gianni Hong avatar  avatar Kan-Ru Chen avatar Leo avatar Sayan Maity avatar Stanislav Vasilev avatar  avatar Huang Tien Yuan avatar Ivan Chen avatar kirintw avatar Jerry Y. Chen avatar KevinNyaa avatar Kvar Izunia avatar  avatar

Watchers

Takuro Ashie avatar  avatar  avatar James Cloos avatar Karuboniru avatar  avatar

fcitx5-chewing's Issues

Build failure with libchewing 0.9.0-rc.1 as chewingio.h was removed

chewingio.h is removed in chewing/libchewing#567 (part of libchewing 0.9.0-rc.1). As a result, build fails with:

FAILED: src/CMakeFiles/chewing.dir/eim.cpp.o 
/usr/bin/c++ -DFCITX_GETTEXT_DOMAIN=\"fcitx5-chewing\" -DFCITX_INSTALL_LOCALEDIR=\"/usr/share/locale\" -Dchewing_EXPORTS -isystem /usr/include/Fcitx5/Core -isystem /usr/include/Fcitx5/Config -isystem /usr/include/Fcitx5/Utils -isystem /usr/include/chewing -Wall -Wextra -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/fcitx5-chewing/src=/usr/src/debug/fcitx5-chewing -flto=auto -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT src/CMakeFiles/chewing.dir/eim.cpp.o -MF src/CMakeFiles/chewing.dir/eim.cpp.o.d -o src/CMakeFiles/chewing.dir/eim.cpp.o -c /build/fcitx5-chewing/src/fcitx5-chewing/src/eim.cpp
In file included from /build/fcitx5-chewing/src/fcitx5-chewing/src/eim.cpp:8:
/build/fcitx5-chewing/src/fcitx5-chewing/src/eim.h:11:10: fatal error: chewingio.h: No such file or directory
   11 | #include <chewingio.h>
      |          ^~~~~~~~~~~~~

Before chewingio.h is removed, it is already included via chewing.h. I think #include <chewingio.h> can be simply removed eim.h as chewing.h is already included there?

fcitx5-chewing/src/eim.h

Lines 10 to 11 in 5ad232a

#include <chewing.h>
#include <chewingio.h>

numpad is not working when buffer has any word

press numpad like 0~9/+/- when buffer has word waiting, It did not load into buffer, it direct show on the target text field.
maybe we can flush the waiting buffer when press numpad or try to load numpad key into waiting queue.

all the word will disappear when input more than 18 chinese word

Describe the bug
If the problem is about you can not use fcitx in certain application, or the input window is placed in wrong place, be sure to include which application is being typed, and the output of fcitx5-diagnose command.

To Reproduce
Steps to reproduce the behavior:

  1. running "wine notepad"
  2. 測試*20
  3. than you will see the buffer all disappear after around 19 word

Expected behavior
it should preserve waiting word or output to application. not disappear

Desktop (please complete the following information):

  • Desktop: (KDE, GNOME, etc)
    KDE
  • Display server type: X11, Wayland
    X11
  • The output of fcitx5-diagnose if possible.
    stdout.gz

Additional context
Add any other context about the problem here.

Upper case when pressing `Shift`

Is there any way to type upper case when pressing Shift while in chewing. Currently, when in chewing mode and press Shift to type any word, always lower case.
And I can't find where to setting it.
image

Environment:
fcitx5 5.0.15-1
fcitx5-chewing 5.0.10-1

word repeat issue

When I confirm the letter, press "Enter" (no underline) then press "Backspace", the letter I typed will repeted.
Ex: 你好 --> Press "Enter" + "Backspace" key --> 你好你好

My Environment:

Name : fcitx5
Version : 5.1.9-1

Name : fcitx5-chewing
Version : 5.1.2-1

Name : fcitx5-qt
Version : 5.1.6-1

Name : fcitx5-gtk
Version : 5.1.3-1

Wrong placement of the cursor in preedit strings (fcitx5-chewing)

我使用的是fcitx5-chewing。輸入文字時,游標總是會在preedit string(不太確定這個說法是否正確)的最前面。如下圖所示:

fcitx5-chewing

未選字前,游標應該要在預選區的最後面。例如Windows的微軟新注音:

default

印象中fcitx4-chewing也是把游標放最後面。

第一張圖片用的是Firefox Nightly。經測試其他應用程式也有相同問題:

  • KeePassXC (Qt5)
  • Evince (GTK+3)
  • Gimp (GTK+2)

而TexStudio (Qt5)下游標位置正常。似乎TexStudio會每打一個字就commit。

GUI issue in fcitx5-chewing 5.1.3 with libchewing 0.8.0 rc2

Symptom

Since 4411a3a (part of version 5.1.3), the preedit window is doing something strange during typing. For example, when I type 2 ( if the default keyboard layout is configured), I got repeated bopomofo symbols:

圖片

Note that the issue happens only with the Rust version of libchewing (default since 0.8.0 rc1). Everything works fine with libchewing 0.7.0.

Analysis

With libchewing 0.8.0 rc2, logs of RUST_LOG=debug fcitx5 -D --verbose default=5,chewing=5 shows that the bopomofo symbol appears twice:

D2024-05-02 22:10:14.583860 eim.cpp:562] Text: ㄉ Zuin: ㄉ

On the other hand, with libchewing 0.7.0, the bopomofo symbol appears only once in logs:

D2024-05-02 22:09:49.200383 eim.cpp:562] Text:  Zuin: ㄉ

It seems that in the Rust version of libchewing, all *_static functions share the same buffer. Specifically, when there are data to return, *_static functions use an internal helper to copy desired data to a static global array:

https://github.com/chewing/libchewing/blob/v0.8.0-rc.2/capi/src/io.rs#L1451
https://github.com/chewing/libchewing/blob/v0.8.0-rc.2/capi/src/io.rs#L71

As a result, when two *_static functions are called in a row (https://github.com/fcitx/fcitx5-chewing/blob/5.1.3/src/eim.cpp#L557-L558), both resulting pointers point to the same data.

Test environment

  • OS: Arch Linux up-to-date
  • Desktop: LXQt
  • IME: fcitx5-chewing 5.1.3
  • libchewing version
    • 0.8.0 rc2, built with this PKGBUILD
    • 0.7.0, from Arch Linux official packages

/cc @kanru this issue seems related to a difference in Rust and C implementations. I know little about Rust. Could you confirm whether my analysis is correct or not?

Candidate amount & layout cannot be customized

Tested under fcitx 5.0.10

  • In fcitx5 chewing, candidate amount is limited within only 5 (too less!), and the layout is horizontal which is a little hard to read.
    Screenshot_20211125_145254

  • In contrast, fcitx5 mozc has 9 candidates in candidate popup, and layout is vertical by default.
    Screenshot_20211125_145317

  • And both chewing & mozc in fcitx5 seems not support customizing candidate amount nor layout.

License alignment with fcitx5

Hello!

fcitx-chewing is distributed under the GPL while the fcitx5 itself is LGPL. Would it be possible to distribute this plugin under the same license as fcitx5? Thanks!

Using a candidate word count < 10 makes certain words untypable

Expected behavior

When setting the candidate count to be < 10, the overflowing characters should appear on the next page.

Example:

A B C D E F G H I J
K L M

when candidate count = 5, it should become

A B C D E
F G H I J
K L M

Actual behavior

The overflowing characters is untypable. In the example above, F G H I J is now untypable. The menu shows K L M on the next page.

How to reproduce

  • Leave the setting at 10 characters, type a word and remember the candidate list.
  • Change the setting to an amount less than 10, say 5.
  • Type the word again. Option 6~10 is now gone from the menu in all pages.

Specifications

  • fcitx 4.2.9.9-1
  • fcitx-chewing 0.2.3-5
  • Kernal: 6.9.2-arch-1
  • DE: KDE
  • Distro: EndeavourOS

"Commit when toggle state" option

Describe the bug
I'm using version 5.0.14 on apt, the input methods default to commit spelling symbols when switching to another input method.
I hope this behavior can be customized as same as version 4.

To Reproduce

  1. Install fcitx5-chewing and setup as the second input method. (the first is English)
  2. Switch to Chinese input.
  3. Click the "ㄅ" ("1") key then click shift or ctrl+space.
  4. Character "ㄅ" will commit to the text area and the input method changed to English.

Expected behavior
Add back the option in fcitx 4 and make it disabled by default.

Desktop (please complete the following information):

  • Desktop: KDE (Kubuntu 22.04 LTS)

Deletion bug

Expected behavior

When backspace is pressed, one block character of whether the preedit or the text should be deleted

Example

I use | to represent the cursor, and italic to represent preedit, with chewing symbol representing partially inputted characters

小ㄕㄨㄛ| => 小ㄕㄨ| => 小ㄕ|

小ㄕ| => 看| => 看|

Actual behavior

The following is observed in all tested scenario

小ㄕㄨㄛ| => | => | => |
小ㄕㄨ| => | => | => |
小ㄕ| => | => | => |

Specifically on neovim v10.0 and Word online, the following is observed

小ㄕㄨ| => | => | => |
小ㄕ| => | => | => |

How to reproduce

Type the above sequences

Specifications

fcitx5 5.1.10-1
fcitx5-chewing 5.1.4-1
Kernel: 6.9.3-arch1-1
DE: Sway
Distro: Arch Linux

I'm on Arch with sway-im and nvidia-beta drivers installed.

The Way to Output Simplified Chinese?

If I remember correctly, in fcitx 4.x + chewing, user can use Ctrl+Shift+F to toggle the output between Traditional / Simplified Characters. But this feature disappeared after upgrading to fcitx5.

(I don't sure if this ticket should be opened in this repo. Sorry.)

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.