Xpra: Ticket #134: allow user to specify key mapping overrides

On some platforms (particularly OSX), it seems that the gtk code does not detect the key mappings correctly - or that users want to use different key mappings with it, so the only way to do the right thing is to explicitly tell xpra about the desired mappings.

For example (taken from this mailing list post) "Make esc and alt behave as Meta":

clear Mod1
clear Mod2
keycode 63 = Mode_switch
keycode 66 = Meta_L
keycode 69 = Meta_R
add Mod1 = Meta_L Meta_R
add Mod2 = Mode_switch

Maybe something like:

    --keycode="66 = Meta_L"
    --modifier="Mod1 = Meta_L Meta_R"

Or even:


We then need to keep hold of those values, and use them to override the keyboard detection code (which may fire again after startup).

Sun, 03 Jun 2012 06:54:42 GMT - Antoine Martin: status, description changed

Thu, 07 Jun 2012 07:30:11 GMT - Antoine Martin:

Talking about OSX specifically, there used to be some code in versions that explicitly mapped meta to alt for OSX:

    def grok_modifier_map(self, display_source):
        map = ClientExtrasBase.grok_modifier_map(self, display_source)
        map["meta"] = 1 << 3
        return  map

Maybe this is all we need to do. The difficulty here is that the client no longer sends any modifier map: self._client_extras.get_keymap_modifiers() returns empty values for osx and lets the server decide.

Wed, 10 Oct 2012 06:12:37 GMT - Antoine Martin: milestone changed

Probably less important now that the keyboard support is improved - delaying.

Sat, 23 Jan 2021 04:46:28 GMT - migration script:

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