CommandShift icon indicating copy to clipboard operation
CommandShift copied to clipboard

Unexpected interaction with input method switching with Shift.

Open AlseinX opened this issue 2 years ago • 5 comments

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.

AlseinX avatar Aug 21 '22 08:08 AlseinX

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) ?

VasylBaran avatar Aug 21 '22 09:08 VasylBaran

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:

  • The expected behaviour:

    • Rime should be in Chinese mode as default.
  • But the actual behaviour:

    • Right after I press down but before releasing the Command+Shift key, the current method is successfully changed into Rime.
    • Because the Shift key is pressed down at the moment, it unexpectedly triggers Rime's mode switch.
    • Rime would thus always come with raw alphabet mode.

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 avatar Aug 21 '22 14:08 AlseinX

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

AlseinX avatar Aug 21 '22 14:08 AlseinX

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

VasylBaran avatar Apr 28 '24 19:04 VasylBaran

Screenshot 2024-04-28 at 22 41 02

VasylBaran avatar Apr 28 '24 19:04 VasylBaran