VasylBaran / CommandShift

CommandShift allows you change input source (in MacOS) using Windows-style shortcuts
GNU General Public License v3.0
94 stars 0 forks source link

Unexpected interaction with input method switching with Shift. #3

Closed AlseinX closed 3 weeks ago

AlseinX commented 2 years ago

When switching to Rime (Squirrel), which is configured to switch between Chinese and raw alphabet input with a single Shift (which is the inner state maintained by the method, not the OS's input switching), with Command + Shift, the Shift switching is unexpectedly triggered, i.e. switching into Rime leads to entering the input method with raw alphabet mode, after which you need to manually press another Shift to switch back to Chinese mode.

I am not sure if this is the input method's fault, but it would be better if CommandShift could consume the Shift key press and prevent it from bubbling into input method.

VasylBaran commented 2 years ago

Hi @AlseinX! Did I understand it correctly that basically you have two shortcuts that conflict with each other? (Command+Shift to change input method and single Shift to switch to raw alphabet mode) ?

AlseinX commented 2 years ago

They are exactly supposed to conflict, while they don't.

When I am in (macOS's) ABC mode, I press Command+Shift to change the current input method to Rime, and it works properly.

But the problem is that:

I currently set Rime's default mode to raw alphabet mode as a workaround, so that after the first unexpected Shift switch, it would be switched into Chinese mode, which leads to another problem, if I switch into Rime with other ways than CommandShift, the default mode would then be raw alphabet.

AlseinX commented 2 years ago

A possible solution is that CommandShift could opt-in to trigger input method switch right after Command+Shift is released, rather than pressed down.

VasylBaran commented 4 months ago

@AlseinX please check the latest release where I tacked this: https://github.com/VasylBaran/CommandShift/releases/tag/1.03

VasylBaran commented 4 months ago
Screenshot 2024-04-28 at 22 41 02