(self)
return result
Return CurrentKeys with 'darwin' modifications.
Return CurrentKeys with 'darwin' modifications.
Return CurrentKeys with darwin modifications .
def GetCurrentKeySet(self):
        "Return CurrentKeys with 'darwin' modifications."
        result = self.GetKeySet(self.CurrentKeys())

        if sys.platform == "darwin":
            # macOS (OS X) Tk variants do not support the "Alt"
            # keyboard modifier.  Replace it with "Option".
            # TODO (Ned?): the "Option" modifier does not work properly
            #     for Cocoa Tk and XQuartz Tk so we should not use it
            #     in the default 'OSX' keyset.
            for k, v in result.items():
                v2 = [ x.replace('<Alt-', '<Option-') for x in v ]
                if v != v2:
                    result[k] = v2

        return result
def GetCurrentKeySet ( self ) : result = self . GetKeySet ( self . CurrentKeys ( ) ) if sys . platform == "darwin" : # macOS (OS X) Tk variants do not support the "Alt" # keyboard modifier.  Replace it with "Option". # TODO (Ned?): the "Option" modifier does not work properly #     for Cocoa Tk and XQuartz Tk so we should not use it #     in the default 'OSX' keyset. for k , v in result . items ( ) : v2 = [ x . replace ( '<Alt-' , '<Option-' ) for x in v ] if v != v2 : result [ k ] = v2 return result