Xpra: Ticket #2380: stuck keys on macOS when swap_keys=0

Hi Antoine,

Thank you for all your work on the Xpra project. We are using it at my department in the university to provide our researchers with a VDI-like experience through Kubernetes.

While testing, I noticed a bug in the HTML5 client when connecting from macOS. A keypress modifed by the Command (⌘) key becomes "stuck" repeating if the "swap_keys" option is disabled.

I saw that you already had a workaround for this in the _keyb_process function in Client.js, but the workaround is bypassed if "swap_keys" is false.

I assume this was a shorthand way of detecting a Mac client, since elsewhere swap_keys defaults to true for Mac clients.

However swap_keys is not necessarily always true on Mac clients, and the workaround is needed on Mac clients regardless of the state of swap_keys, so I believe it should be checking Utilities.isMacOS() instead of swap_keys. That way it will always run on Mac clients (and only on Mac clients).

I have attached a patch for your consideration which works in my local tests.



Tue, 06 Aug 2019 18:52:18 GMT - William Horka: attachment set

HTML5 client - simulate release of key on macOS when meta modifier is pressed, regardless of the state of swap_keys

Wed, 07 Aug 2019 02:27:21 GMT - Antoine Martin: status changed; resolution set

Thanks! Applied in r23461.

Sat, 23 Jan 2021 05:49:44 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2380