shin icon indicating copy to clipboard operation
shin copied to clipboard

Meta key (ctrl, alt) stays active after using shin

Open dgsiegel opened this issue 1 year ago • 3 comments

I have set ibus engine shin to the keyboard shortcut Ctrl+Space (and also tried with Alt+Space). After executing a command in shin by pressing Enter, it seems like the Ctrl stays stuck and I have to press Ctrl+c to exit this mode and return to normal input. At this point I'm not sure whether this is a shin or ibus problem, as this only started recently.

Some details:

  • Using the latest version of shin (https://github.com/p-e-w/shin/commit/a081ee0b7e2d1508f6f967ed37dd96849795ba50)
$ lsb_release -a
LSB Version:	n/a
Distributor ID:	Fedora
Description:	Fedora Linux 39 (Workstation Edition)
Release:	39
Codename:	n/a

$ gnome-shell --version 2>/dev/null
GNOME Shell 45.3

Update: Setting the keyboard shortcut to Super+Space works just fine.

dgsiegel avatar Jan 16 '24 10:01 dgsiegel

I have observed the same problem. I set the shortcut to Super+x (on GNOME), but it seems that because shin consumes the release event of the Super key, the normal ibus engine thinks it got never released and is still pressed.

I solved it by creating a bash script with:

#!/bin/bash

sleep 1
ibus engine shin

and then using this as the target of the shortcut. This ensures that the release event is processed correctly before shin starts.

A proper fix for this would maybe replay all release events just before shin exits?

tmke8 avatar Apr 02 '24 15:04 tmke8

I have opened PR #15 to solve this. If you can, it would be good if you could try it out @dgsiegel .

tmke8 avatar Apr 07 '24 14:04 tmke8

I have opened PR #15 to solve this. If you can, it would be good if you could try it out @dgsiegel .

Seems to work fine here as well, thanks!

dgsiegel avatar Apr 08 '24 10:04 dgsiegel