xpra icon
Bug tracker and wiki

Changes between Initial Version and Version 1 of Ticket #1609, comment 5


Ignore:
Timestamp:
07/30/17 14:48:50 (3 years ago)
Author:
Antoine Martin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1609, comment 5

    initial v1  
    66I'll try to play with this on macos when I get a chance.
    77
     8
     9{{{
     10--- xpra/client/gtk_base/gtk_client_window_base.py      (revision 16553)
     11+++ xpra/client/gtk_base/gtk_client_window_base.py      (working copy)
     12@@ -1357,6 +1357,19 @@
     13         keyval = event.keyval
     14         keycode = event.hardware_keycode
     15         keyname = gdk.keyval_name(keyval)
     16+        if OSX and self._client.swap_keys:
     17+            if keycode==55:
     18+                keycode = 133
     19+                keyname = 'Super_L'
     20+            elif keycode==54:
     21+                keycode = 134
     22+                keyname = 'Super_R'
     23+            elif keycode==133:
     24+                keycode = 55
     25+                keyname = "Meta_L"
     26+            elif keycode==134:
     27+                keycode = 54
     28+                keyname = "Meta_R"
     29         keyname = KEY_TRANSLATIONS.get((keyname, keyval, keycode), keyname)
     30         key_event = GTKKeyEvent()
     31         key_event.modifiers = self._client.mask_to_names(event.state)
     32}}}