On Tue, Feb 21, 2017 at 3:24 PM, john lunzer <[email protected]> wrote:
As Edward alluded to, keybindings feel complex. This is probably an area of > code that could use some eventual simplification and cleanup. > True, but much of the complexity is inherent. The fact that Leo uses Tk names is an accident of history. Changing those names would not simplify the code in any meaningful way. Mostly it doesn't matter what names are used, as long as the same names are used every where. There are two areas that surely need attention: 1. We want to use actual ascii characters whenever possible. So not "newline" or "Newline", but '\n'. Similarly, not 'Tab' or 'tab', but '\t'. And not "bar" but "|". This much at least I think we can all agree on. But what about non-ascii, non-printing chars? We can't represent them as char's, which is why "strokes" (instances of g.KeyStroke) exist. 2. Eliminate the distinction between "char" and "stroke". This distinction creates all sorts of problems at present. So it appears that the code should only strokes, not ascii chars. But this doesn't really eliminate all complexity. We would still have to distinguish between strokes that correspond to printable ascii chars and those that don't. This seemingly minor distinction has a way of percolating everywhere. But such statements, on my part or anyone else's, are mostly conjecture. The only way forward would be to use cff in an experimental way, looking for ways to regularize and simplify the code. This would be a big project. I don't think it is worth doing now. I have in mind a few baby steps, but even these don't seem all that important compared to other possible projects. Edward -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
