sergei-mironov / xkb-switch

Switch your X keyboard layouts from the command line
MIT License
345 stars 37 forks source link

Bug when use xkb-switch and emulates key presses #72

Closed FrolovRuslan1 closed 8 months ago

FrolovRuslan1 commented 8 months ago

Hello everyone, I faced with a problem when I use xkb-switchin my project OpenSwitcher I tried several tests but result shows that problem appears exactly after using xkb-switch. OpenSwitcher uses actkbd to run when Ctr_L+Alt_L combination is pesses

Test 1 in script/openswitcher.sh

#!/bin/bash
xkb-switch -n
sleep 1
xsel -o | sudo openswitcher --verbose --device "$(input-device-info.sh)"
  1. I select text "text"
  2. I press default for my program Ctr_L+Alt_L combination and it changed text to "еуче"
  3. I press second time keys combination and nothing happens.(And so on)

Result: text changed only at first time.

Test 2 in script/openswitcher.sh

#!/bin/bash
#xkb-switch -n
#sleep 1
xsel -o | sudo openswitcher --verbose --device "$(input-device-info.sh)"
  1. I select text "text"
  2. I press default for my program Ctr_L+Alt_L combination and it dont changed text (as expected) to "еуче"
  3. I press second time keys combination and it repeat case 2. If i dont select text it prints (as expected) previous text. Result: all (as expected) work Ok.
FrolovRuslan1 commented 8 months ago

problem was in actkbd settings