Hi Miklos,
After digging in some more, I was able to track down the hardware key events to gtk3gtkframe.cxx in vcl/unx/gtk3. Hopefully this information is useful for others looking for the same information. Within doKeyCallback function, I set mnCharCode in the SalKeyEvent object to the value I want and this value is reflected in the LayoutText function of CommonSalLayout.cxx.
Coming to the actual display, I faced two problems. I was able to display my glyph by hard coding the value of nGlyphIndex in LayoutText but that results in every single character in libreoffice printing my glyph (on every menu item, label, etc.). I need to figure out how to display my glyph based on the value passed into the LayoutText function based on mapping this value to the value of the nGlyphIndex. The mapping is the easy part but identifying the control flow is where things seem to get tricky. Print statements do not seem to help as they get printed multiple times for a single keystroke (18 times) and I am unsure which invocation in the loop is the relevant one and an attempt to insert an if condition based on the value I passed seemed to have no effect.
The other problem I had when I hard coded the value of nGlyphIndex is that the cursor does not move all the way to the end of the glyph but is in the center of the glyph so that the next keystroke results in an overlap of the right half of the glyph with the left half of the next glyph. This is the case only with the glyph in the font file I generated. Note that I have used my fontfile with other programs written using Gtk+ and they work fine.
Any ideas would be appreciated.
-a
On Monday, February 17, 2020, 2:36:57 AM CST, Miklos Vajna <vmiklos@xxxxxxxxxxxxx> wrote:
Hi Arvind,
Try 'git grep key_press vcl/source/', and keep in mind that if you type
into a Writer document, Calc cell or Impress shape, those are all
"custom widgets" in terms of gtk3.
Regards,
Miklos
Try 'git grep key_press vcl/source/', and keep in mind that if you type
into a Writer document, Calc cell or Impress shape, those are all
"custom widgets" in terms of gtk3.
Regards,
Miklos
_______________________________________________ LibreOffice mailing list LibreOffice@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/libreoffice