On Sat, Jan 28, 2012 at 2:32 PM, Mark Morgan Lloyd <[email protected]> wrote: > What is the situation with LCL editing components, Synedit, Cmdline and so > on? Is there a single underlying keyboard component, or at least a uniform > interface? > > In short, where do I start? :-)
All LCL applications use the TWinControl.OnKeyDown, OnKeyUp, OnKeyPress and OnUTF8KeyPress events which give almost all information about the keyboard. There is also LCLIntf.GetKeyState, but is less used. All of those in the end are calls to the underlying widgetset which does the real work, we just convert the result from the widgetset into the formats supported by the LCL. So you should not be thinking initially at LCL support for your keyboard, but instead in supporting for example X11 (supposing we are talking here only about Linux). I have no idea how X11 interfaces with the keyboard, but the LCL interfaces with it via X11 (the most direct relationship is only in the LCL-CustomDrawn widgetset, but I think that Gtk and Qt use X11 too for their keyboard code). So if your keyboard interfaces correctly with X11 then it should work with LCL apps too. Except for this the other idea which I would have is hacking the LCL widgetset code to make use of your custom keyboard directly, but then it won't work for pre-compiled applications. Doing this in the LCL-CustomDrawn widgetset might be the easiest because it is the smallest, but its X11 version still has no text support. -- Felipe Monteiro de Carvalho -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
