Closed shenlebantongying closed 1 week ago
Don't think this will bring any regression, because the simplified code user the thing that handles https://github.com/goldendict/goldendict/pull/1419
Also tested other situations -> chinese input method & English
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Let's merge this in another day,
Chop related code to half.
This region of code looked scary because the first line assumes everyone uses English keyboard.
So, the next line patches it by copying current input source -> TISCopyCurrentKeyboardInputSource
But japanese keyboard is slightly different, so it got patched again with TISCopyCurrentKeyboardLayoutInputSource
Just uses the last one
TISCopyCurrentKeyboardLayoutInputSource
, all code are no longer needed.Also change mappping to a vector instead of
calloc
.