Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用上下鍵選字(Use arrow keys to select characters) #455

Open
leafpool243 opened this issue Mar 17, 2024 · 6 comments
Open

使用上下鍵選字(Use arrow keys to select characters) #455

leafpool243 opened this issue Mar 17, 2024 · 6 comments
Labels
Milestone

Comments

@leafpool243
Copy link

我習慣用上下鍵選字,因為其他中文輸入法都是用上下鍵選字的。

2020年有人在 fcitx5-chewing 開了 issue,@wengxt 說:

Chewing 的按键行为都是 libchewing 控制的,看起来并没有很多可以自定义某个按键行为的办法。建议提交给 libchewing。
fcitx/fcitx5-chewing#2 (comment)


I'm used to using the up and down arrow keys to select characters because that's what all other Chinese IMEs do.

In 2020, someone opened an issue at fcitx5-chewing, but @wengxt said that the key behaviour was controlled by libchewing instead and suggested that an issue be opened here, but it doesn't appear like that was ever done.

@kanru
Copy link
Member

kanru commented Mar 17, 2024

為了確定我了解你的使用方法,可以請你舉個例子嗎?

比如說輸入「hk4g4<下鍵>」應該會出現選字單,你說得是這個使用情境嗎?還是說出現選字單後繼續用方向鍵選擇你要的字?

@leafpool243
Copy link
Author

我說的是出現了選字單後,要能夠繼續用上下鍵選字

例如
g4下鍵:出現選字單
圖片
繼續按下鍵:市、是、事、世、士
像微軟的注音輸入法一樣

@kanru
Copy link
Member

kanru commented Mar 21, 2024

是像這樣嗎?這是 gnome + ibus-chewing

Screencast.from.2024-03-21.23-25-16.webm

@kanru kanru added feature more info Needs more information labels Mar 21, 2024
@wengxt
Copy link

wengxt commented Mar 21, 2024

我主要的意见是 chewing 的 API 设计和按键处理上。So 显然 ibus-chewing 在 chewing_handle 系列的 API 上再铺了一层自己的代码处理候选词列表。这种代码的写法就是只能假定 libchewing 不会改变 chewing_handle_{Left,Right,Up,Down} 的行为。

实质上是将 ibus-chewing 的实现和 libchewing 的按键逻辑进行了强绑定

举个例子,libchewing 如果某天决定自己增加 API 改变某个 handle_XXX 的行为,engine 里写的这些逻辑将直接受到影响

而且,因为候选词光标目前只是 ibus -chewing 放在自己 engine 里的概念,preedit 也没有同步进行更新

我的意见是这些逻辑都应当在 libchewing 中实现,而不是在 ibus-chewing 中实现

@kanru
Copy link
Member

kanru commented Mar 21, 2024

我想我同意你的意見

如果加了這個功能的話,感覺應該要是預設關閉的,不然原本沒有處理,或是無法顯示目前候選詞的 UI 就會有一個隱形的游標在那裡。

因為要加新的 API,我先把這個問題放到 1.0 之後

@kanru kanru removed the more info Needs more information label Mar 21, 2024
@kanru kanru added this to the v1.0.0 milestone Mar 21, 2024
@leafpool243
Copy link
Author

是像這樣嗎?這是 gnome + ibus-chewing
Screencast.from.2024-03-21.23-25-16.webm

是的

wengxt added a commit to fcitx/fcitx5-chewing that referenced this issue Apr 19, 2024
This also override some behavior in libchewing.

We may need to revisit after chewing/libchewing#455 updates.

Fix #2
@kanru kanru modified the milestones: v1.0.0, v0.9.0 May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants