fcitx / fcitx5

maybe a new fcitx.
1.51k stars 112 forks source link

Add option show input method information after idling / idle / afk #1084

Open MrSauna opened 1 week ago

MrSauna commented 1 week ago

Summary

After getting away from keyboard I tend to forget which input method I was using. This can be solved by showing the input method information after idling. I would love to see this as a configuration options:

MacOS has implemented similar functionality which I've found to be useful in practice.

rocka commented 1 week ago

Just look at the tray icon, it shows the icon of activated input method.

Or you can turn on "Show Input Method Infomation when changing focus" under "Behavior" settings.

MrSauna commented 1 week ago

Just look at the tray icon, it shows the icon of activated input method.

That misses the part that makes the floating indicator good. You don't have to actively look for the input method information.

Or you can turn on "Show Input Method Infomation when changing focus" under "Behavior" settings.

That's different. This is not about switching anything. This is about a single input field with no changes in cursor focus happening.

This is about a single input focus having input method information appearing after idle time. This is an intuitive approach to keeping track of what input method you are using after AFK time. The intuitive part I'm speaking from experience after using such functionality on macos.

wengxt commented 1 week ago

Please provide a screencast video on mac os to demostrate the feature.

MrSauna commented 1 week ago

Here's a screen recording of the feature on mac.

output.webm

Summary

things to note:

rocka commented 1 week ago

8 minutes, are you serious? I would consider it as a bug ...

MrSauna commented 1 week ago

Normal AFK is quite easily longer than 8 minutes. Go get coffee etc. But of course that should be configurable. First time measuring the delay and I'm a bit surprised it's that long myself. However, the 8 minute delay has worked quite well in practice at least for me.

wengxt commented 1 week ago

Here's a screen recording of the feature on mac. output.webm

Summary

* start idling

* 8 minutes pass by

* indicator appears automatically

things to note:

* Had not previously noticed but the popup even has an animation

* the indicator stays on until user action

After 8 minutes, what triggers the popup? I bet it's not a keyboard press.. is it mouse pointer movement?

MrSauna commented 1 week ago

It's just the idle time. Nothing from user is happening for the 8 minutes or at the 8 minute mark: no keyboard presses, no pointer movement, no ACPI type events.

It's a simple timer resetting every time user does significant actions and if it gets to the timeout it shows the popup.

I didn't test the mac implementation in depth but, I think mouse movement shouldn't reset such timer. Clicking mouse and typing should.

wengxt commented 1 week ago

It's just the idle time. Nothing from user is happening for the 8 minutes or at the 8 minute mark: no keyboard presses, no pointer movement, no ACPI type events.

It's a simple timer resetting every time user does significant actions and if it gets to the timeout it shows the popup.

I didn't test the mac implementation in depth but, I think mouse movement shouldn't reset such timer. Clicking mouse and typing should.

On linux, usually moving mouse will light up the screen if screen is automatically closed. I would assume mac will do the same.

I mean yeah, it's possible to implement a idle monitor and display input method information when the system is not idle anymore.

org.freedesktop.ScreenSaver, X11 SYNC extension, and https://wayland.app/protocols/kde-idle are some methods that can be used.