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

Keys defined to output whole words can get polluted by previous keypresses #68

Open
AntiSol opened this issue Oct 22, 2024 · 0 comments
Labels
System Bug Unexpected behavior in layout system

Comments

@AntiSol
Copy link

AntiSol commented Oct 22, 2024

Hello,

I've been experimenting with building a custom keyboard layout using the nightly build.

I've noticed that when I define keys to output an entire word, I get weird results in some circumstances.

Imagine I have the following two keys defined:

- type: base
  spec: "hello"
  moreKeys: "world"
- "test"

This mostly works as I'd expect - I get a "hello" key which I can long-press to turn it into a "world" key, and I also get a "test" key.

But: sometimes, when I press one of these keys and then the other, I get the first letter from the first keypress prefixed onto the correct output from the second.

Note that this does not seem to happen in the test area inside the layout editor, you have to go into a different text-editing application to see it. I also think it only applies when the key is pressed at the start of a new sentence (i.e when the word would be capitalised)

To reproduce, try this:

  1. define the keys above
  2. go into an application where you can edit text. I've been seeing it in Signal, my SMS app, and my notes app, but I believe any text editor should do.
  3. position the cursor at the start of a new line
  4. press the 'hello' key, observe correct output of "HELLO" (capitalisation isn't perfect, but that's a separate issue)
  5. press backspace a bunch of times to delete the "HELLO" output and put your cursor back on the start of the line
  6. press the "world" key, observe the bug: output will be "HWORLD", prefixing the "H" from hello to the correct output.
  7. This can be fixed by closing the keyboard and re-opening it, or it seems by moving the cursor away from the start of the line. The problem seems to happen most consistently when the words are capitalised on the keyboard and you are at the start of a line of text.

Thanks!

@abb128 abb128 added the System Bug Unexpected behavior in layout system label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System Bug Unexpected behavior in layout system
Projects
None yet
Development

No branches or pull requests

2 participants