On Sun, Mar 7, 2010 at 1:12 PM, resi147 <[email protected]> wrote: >> if sys.platform.startswith('darwin'): >> if tkKey == 'Alt-L': >> tkKey = stroke = '@' >> >> Let me know exactly what works and I'll make the changes to the trunk. > > I put the following in qtGui.py after # Last minute-munges to > keysym. > > if sys.platform.startswith('darwin'): > darwinmap = { > 'Alt-Key-5': '[', > 'Alt-Key-6': ']', > 'Alt-Key-7': '|', > 'Alt-slash': '\\', > 'Alt-Key-8': '{', > 'Alt-Key-9': '}', > 'Alt-e': '€', > 'Alt-l': '@', > } > if tkKey in darwinmap: > tkKey = stroke = darwinmap[tkKey] > > It works quite reasonabe. Sometimes (not really well reproducable) > following message appears: > > /Users/tst/Leo-4.7-final/leo/core/leoKeys.py:3363: UnicodeWarning: > Unicode equal comparison failed to convert both arguments to Unicode - > interpreting them as being unequal > if k.abortAllModesKey and stroke == k.abortAllModesKey: > /Users/scalet/Leo-4.7-final/leo/core/leoKeys.py:2521: UnicodeWarning: > Unicode equal comparison failed to convert both arguments to Unicode - > interpreting them as being unequal > if k.abortAllModesKey and stroke == k.abortAllModesKey: # 'Control- > g' > > nonetheless the special characters were inserted as expected. > > I think all this is quite a hack, but ... thanks for the hack, most > important for me it's working for now.
I'm finally clear ancient emails. Sorry for the long delay. Let's see if we can get rid of the crash. First of all, what version of Python are you using: 3.x or 2.6? Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
