xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #2380: xpra-html5-Client-swap-keys-stuck.patch

File xpra-html5-Client-swap-keys-stuck.patch, 644 bytes (added by William Horka, 2 years ago)

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

  • trunk/src/html5/js/Client.js

    old new  
    782782                var me = this;
    783783                setTimeout(function () {
    784784                        me.send(packet);
    785                         if (pressed && me.swap_keys && raw_modifiers.includes("meta") && ostr!="meta") {
     785                        if (pressed && Utilities.isMacOS() && raw_modifiers.includes("meta") && ostr!="meta") {
    786786                                //macos will swallow the key release event if the meta modifier is pressed,
    787787                                //so simulate one immediately:
    788788                                packet = ["key-action", me.topwindow, keyname, false, modifiers, keyval, str, keycode, group];