Bug 6378

Summary: libfakekey patch to allow shift-ed version of symbol not already in keymap
Product: [Yocto Project Subprojects] Matchbox Reporter: Finn <finn>
Component: matchboxAssignee: Jussi Kukkonen <jku>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: richard.purdie
Version: unspecified   
Target Milestone: 2.4   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
patch none

Description Finn 2014-05-28 10:03:27 UTC
Created attachment 1981 [details]
patch

Sorry if this is the wrong place to offer a fakekey patch, I couldn't find anywhere better but I'd be happy to be redirected.

If my keymap is set to US and I use fakekey_press_keysym to send a Ó the character isn't already in my keymap so fakekey adds it but then sends ó instead. My patch now does the same check if a shift modifier is required that's done in the code path for keys that are already in the keymap.

The code has some comments that make me think this check may be dodgy but it fixes the problem for me on fedora 18.

Note "Ó" is just an example any character that uses a shift modifier and isn't already in your keymap suffers this problem.
Comment 1 Jussi Kukkonen 2016-10-11 07:51:34 UTC
Did not have time to look at fakekey at all so I'll have to push this forward once more.
Comment 2 Jussi Kukkonen 2017-05-16 09:02:19 UTC
Ahh, I've completely forgotten this. Partly because I dread modifying ancient code with comments like this:

       * There's no way whatsoever that this could ever possibly
       * be guaranteed to work (ever), but it does.


...but I'm going to do this now: I'll do some whitespace modifications and probably remove the "code = 0" line in the error case (just to keep changes to a minimum) but otherwise this seems good to me.
Comment 3 Jussi Kukkonen 2017-05-17 11:51:46 UTC
Committed to libfakekey master.

I'll keep this issue open until I've integrated into oe-core as well.
Comment 4 Jussi Kukkonen 2017-07-17 13:51:35 UTC
commit 8656af385666802ba5d4ee5f42780386b13e3cb0
Author: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Date:   Mon Jun 19 14:44:43 2017 +0300

    libfakekey: upgrade to 0.3+gitAUTOINC+7ad885912e
    
    (From OE-Core rev: 9adc1baf815ee06c3317b51f459dbb921e0e6de5)
    
    Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>