<html><head></head><body><div class="ydp8e635694yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><div></div>
        <div dir="ltr" data-setdir="false">Hi <span>Miklos,</span></div><div dir="ltr" data-setdir="false"><span><br></span></div><div dir="ltr" data-setdir="false"><span>After digging in some more, I was able to track down the hardware key events to</span> 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.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Coming to the actual display, I faced two problems. I was able to display my glyph by hard coding the value of nGlyphIndex in <span>LayoutText but that results in every single character in libreoffice printing my glyph (on every menu item, label, etc.).<span> 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.<br></span></span></div><div dir="ltr" data-setdir="false"><span><span><br></span></span></div><div dir="ltr" data-setdir="false"><span><span>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.<br></span></span></div><div dir="ltr" data-setdir="false"><span><span><br></span></span></div><div dir="ltr" data-setdir="false"><span><span>Any ideas would be appreciated.</span></span></div><div dir="ltr" data-setdir="false"><span><span><br></span></span></div><div dir="ltr" data-setdir="false"><span><span>-a</span></span></div><div dir="ltr" data-setdir="false"><span><span></span></span><br></div><div><br></div>
        
        </div><div id="ydpbc9e4beayahoo_quoted_4486062814" class="ydpbc9e4beayahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Monday, February 17, 2020, 2:36:57 AM CST, Miklos Vajna <vmiklos@collabora.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div>Hi Arvind,<br clear="none"><br clear="none">Try 'git grep key_press vcl/source/', and keep in mind that if you type<br clear="none">into a Writer document, Calc cell or Impress shape, those are all<br clear="none">"custom widgets" in terms of gtk3.<br clear="none"><br clear="none">Regards,<br clear="none"><br clear="none">Miklos<div class="ydpbc9e4beayqt7420565125" id="ydpbc9e4beayqtfd19416"><br clear="none"></div></div>
            </div>
        </div></body></html>