fs-uae icon indicating copy to clipboard operation
fs-uae copied to clipboard

Keyboard input broken after FS-UAE window gets focus

Open punktniklas opened this issue 7 years ago • 6 comments

I just updated to FS-UAE 2.8.0 from 2.6.2 on Ubuntu Linux. When starting up an Amiga instance keyboard input works fine. But then I do this:

  • Release mouse/keyboard input by clicking the mouse wheel
  • Activate some other window in Linux
  • Reactivate FS-UAE

Now keyboard input is broken. Sometimes keys get interpreted as return/linefeed. Sometimes I get control codes like ^I. Sometimes the shell window just blinks. Switching focus back and forth doesn't seem to help.

punktniklas avatar Sep 16 '16 05:09 punktniklas

Update: It seems like it only breaks when I switch workspace and activate a window there (which usually happens automatically when switching workspaces). Then when I switch back to the workspace where FS-UAE is running the keyboard input is broken.

If I stay within the same workspace I can activate windows back and forth without anything breaking.

punktniklas avatar Sep 17 '16 02:09 punktniklas

Do you switch workspace by using keyboard shortcuts, if so, what? (and what window manager are you using? Unity?)

FrodeSolheim avatar Oct 17 '16 20:10 FrodeSolheim

Yes, I switch by using Ctrl-Alt-Arrow, which is the default in Ubuntu. And yes, it's the default Unity window manager.

punktniklas avatar Oct 18 '16 00:10 punktniklas

I believe the problem is caused by you holding the ctrl and alt keys when the desktop is changed (FS-UAE loses focus). FS-UAE then does not realize that you are no longer holding the keys when it gets the focus back. That is probably a bug in FS-UAE (it should probably check the state of all keys when it gets the focus back).

Please try this, when you reactivate FS-UAE and you trigger the bug. Please try to press and release Ctrl once, and press and release Alt once. Does problem go away then?

FrodeSolheim avatar Oct 21 '16 21:10 FrodeSolheim

Yes, that makes the problem go away!

punktniklas avatar Oct 22 '16 02:10 punktniklas

FS-UAE should probably run some code to try to sync keyboard state whenever the window gets focus. This is probvably still an issue in the upcoming 4.0 version.

FrodeSolheim avatar Feb 19 '21 17:02 FrodeSolheim