Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition with capitalization #1051

Open
user202729 opened this issue Feb 26, 2019 · 16 comments
Open

Race condition with capitalization #1051

user202729 opened this issue Feb 26, 2019 · 16 comments

Comments

@user202729
Copy link
Member

Summary

Sometimes a noncapitalized character is wrongly capitalized when it's before a upper case character.

Reproducing

Pressing "P-BG" a few times gives:

pK pK pK PK pK pK pK PK pK PK PK pK pK pK PK PK pK pK pK pK pK pK pK pK PK PK

Plover Version

1ff8bb9

System

Arch Linux.

@SeaLiteral
Copy link

Which window manager are you using? I don't get this issue on Unity on Ubuntu when writing pH, {Mc^}{-|} and pK, two lines of each.

I remember there being an issue with ibus. Back then I could steno into gedit and it would work fine, but if I stenoed into Firefox it would miss some characters in the output. Plover was outputting them, but Firefox wasn't receiving them. Maybe you could try writing strings of pK into different applications and see if this happens in all of them or just some of them.

@user202729
Copy link
Member Author

I'm using cinnamon.
I can't reproduce it in xterm, only in my browser and Plover lookup window.

@SeaLiteral
Copy link

Does it also happen in other Plover windows, such as the add translation dialog? You should be able to open that from the main window.

And which browser is it? Firefox? Chromium? Konqeror? Have you tried stenoing into a text editor or word processor?

@user202729
Copy link
Member Author

  1. It does happen in the add translation dialog.
  2. qutebrowser.
  3. Can't reproduce in vim or gvim. Probably an issue with Qt or PyQt.

@benoit-pierre
Copy link
Member

AFAIK, neither gvim nor xterm use ibus, so do you have ibus running?

@user202729
Copy link
Member Author

$ ibus version
bash: ibus: command not found

I think I don't install it.

@benoit-pierre
Copy link
Member

Can you reproduce the issue with xdotool? Using for example: xdotool type --delay 0 'pK pK pK pK'.

@user202729
Copy link
Member Author

No, regardless of whether plover is enabled or disabled.

@benoit-pierre
Copy link
Member

That was without Plover running. Anyway, you could check if the sequence of events send by Plover is correct, although it it works in other applications, it probably is. Use xinput test-xi2 --root DEVID (replace DEVID with the device number for Virtual core XTEST keyboard (xinput list to get it)). How did you install Plover? What about PyQt5? Your using a custom version, can you confirm this happen with master too?

@SeaLiteral
Copy link

SeaLiteral commented Feb 28, 2019

Wouldn't xdotool type pK four times in xterm? If the issue doesn't happen when using Plover in xterm, it probably doesn't happen when using xdotool in xterm.

I don't have this problem myself, but I just got Python to use xdotool to write a string of pKs in Firefox:

import os
import time

def test_writing(x):
    time.sleep(2)
    os.system("xdotool type --delay 0 '"+x+"'")

test_writing('pK '*6)

The output I get is pK pK pK pK pK pK .
[Edit: it's probably easier to put a sleep before the command the way @benoit-pierre mentions in the comment below. Also, I'd missed the first line in the script above, but I've added it now.]

@benoit-pierre
Copy link
Member

xdootool will send events to the focused window, so just use sleep before the command and quickly select the problematic application: sleep 3; xdotool ..

@user202729
Copy link
Member Author

It does happen to master.

@user202729
Copy link
Member Author

Sequence of event looks correct.

However if that's the case, the bug is probably not with Plover, but PyQt/Qt.

@benoit-pierre
Copy link
Member

Yes, have you tried again with xdotool, but focusing the correct application? So you still have not mentioned how Plover/PyQt5 were installed.

@user202729
Copy link
Member Author

xdotool was tried on Plover lookup window.
Plover is from git. PyQt5 is from arch linux package.

@SeaLiteral
Copy link

I don't get this issue on Cinnamon on Ubuntu. So this could be specific to Arch Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants