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

ENTER gets repeated by terminal when creating new device #18

Open
guettli opened this issue Feb 3, 2025 · 0 comments
Open

ENTER gets repeated by terminal when creating new device #18

guettli opened this issue Feb 3, 2025 · 0 comments

Comments

@guettli
Copy link

guettli commented Feb 3, 2025

thank you very much for this package. I guess my issue is not a bug, but maybe you can help.

I wrote a tool to configure custom keyboard commands: tff

When I start the program, then my code plays "man in the middle" and changes some events.

Overall it works fine.

Except when the program gets started, then the ENTER to start the sudo ... command does not get to the terminal correctly. The UP event seems to get lost, and the terminal repeats "ENTER" until a new key gets pressed.

sudo ~guettli/go/bin/tff  combos my-combos.yaml /dev/input/by-path/platform-i8042-serio-0-event-kbd /dev/inpu
t/by-id/usb-Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-event-kbd

|>>1738570367;264772;EV_MSC;MSC_SCAN;458792

|>>1738570367;264772;EV_KEY;KEY_ENTER;up
Eval [up] enter/ downKeysWritten: [] swallowKeys: []
  write enter/ Eval>No-match>FlushBuffer

|>>1738570367;264772;EV_SYN;SYN_REPORT;up



      (the ENTER Up does not get to the terminal, and ENTER gets repeated) 



|>>1738570368;432771;EV_MSC;MSC_SCAN;458976

|>>1738570368;432771;EV_KEY;KEY_LEFTCTRL;down
Eval [down] leftctrl_ downKeysWritten: [] swallowKeys: []
  write leftctrl_ Eval>No-match>FlushBuffer

|>>1738570368;432771;EV_SYN;SYN_REPORT;up


|>>1738570368;632808;EV_MSC;MSC_SCAN;458758

|>>1738570368;632808;EV_KEY;KEY_C;down
Eval [down] c_ downKeysWritten: [] swallowKeys: []
_PAGEDOWN NoMatch: No down-keys seen
  write c_ Eval>No-match>FlushBuffer

|>>1738570368;632808;EV_SYN;SYN_REPORT;up

It does not happen always.

When I start it like this: sleep 1; sudo ... then it does not happen, because the ENTER-Up to start the program is already gone.

Should I do Grab() and CloneDevice() somehow differently, so that it gets done after all UP events have been processed?

I guess the terminal does not expect the UP event to come from a different device.

It is not a big problem. But somehow confusing.

Do you have an idea how to fix that?

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

No branches or pull requests

1 participant