Hi.

For using Leo on OSX I started redefining lots of shortcuts to the Control 
key (on OSX == Meta) because keys such as Ctrl-H (== Cmd-H on OSX) for 
editing the headline is caught by the System and hides the frontmost app. 
Also the usual editing shortcuts a mac user expects are very different.

To my surprise, my newly added shortcuts did worse than nothing. For 
example Meta-t (== Ctrl-t == focus outline) inserted a "t" character in the 
body.

After a digging session in leoPyRef.leo with many g.trace() & g.pdb() I 
narrowed it down to the functions LeoQtEventFilter.qtMods() and 
LeoQtEventFilter.toStroke().

As far as I understand it, the Meta key is not recognized by the event 
machinery. Meta keys can be defined, are listed as defined but are ignored 
when executed.

Adding

('Meta-', 'Meta+'),

to the table definition in toStroke()

and patching qtMods()

-                (qt.MetaModifier, 'Alt'), # For Microsoft keyboard.
+                (qt.MetaModifier, 'Meta'), # For Microsoft keyboard.

made the Control key available as Meta.

This all is on OSX 10.6 with Anaconda Python and with this modification and 
the more mac like shortcuts Leo is very usable. I don't know what these 
changes will do on other platforms but I'm curious if I've missed something 
or nobody ever used the Meta key?

-karsten

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to