Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(windows): cs_pinyin keyboards not inputting text to app in Windows 11 #8697

Open
1 of 8 tasks
rc-swag opened this issue May 2, 2023 · 3 comments
Open
1 of 8 tasks

Comments

@rc-swag
Copy link
Contributor

rc-swag commented May 2, 2023

Describe the bug

In Windows 11 when using either the simplified Chinese keyboard or the IMsample keyboard nothing is input into the applications at the cursor after selecting the input from the IMC window for the second application opened.
This was discovered when testing #8593
Two things have been observed by the testers

  1. The first application opened whether TSF or not does work correctly. However...
  2. When switching apps between apps it does not track focus correctly and no text is input at the cursor point of application when text options are selected from the IMC input window.

Related #6588

Reproduce the bug

Taken from the Windows Acceptance test cases.

  • TEST_SIMPLIFIED_CHINESE_SINGLE:
    Using Notepad or equivalent.

    • Type o - The IMX window should appear
    • Choose the 4th option
    • Expected result: 喔
  • TEST_SIMPLIFIED_CHINESE_MULTIPLE:
    Using Notepad or equivalent.

    • Type h a n z i - The IMX window will appear and in the top left the letters hanzi will be present
    • Choose the 5th option
    • Expected result: 汉字变换

Related issues

#6588

Keyman apps

  • Keyman for Android
  • Keyman for iPhone and iPad
  • Keyman for Linux
  • Keyman for macOS
  • Keyman for Windows
  • Keyman Developer
  • KeymanWeb
  • Other - give details at bottom of form

Keyman version

16

Operating system

Windows 11

Device

No response

Target application

No response

Browser

No response

Keyboard name

simplified chinese

Keyboard version

No response

Language name

No response

Additional context

No response

@rc-swag rc-swag added this to the 17.0 milestone May 2, 2023
@mcdurdin mcdurdin modified the milestones: 17.0, A17S19 Jul 10, 2023
@mcdurdin mcdurdin modified the milestones: A17S19, 18.0 Jul 25, 2023
@rc-swag rc-swag self-assigned this Apr 4, 2024
@rc-swag rc-swag modified the milestones: 18.0, B17S5 Apr 4, 2024
@rc-swag
Copy link
Contributor Author

rc-swag commented Apr 12, 2024

Looking at a debug log it was observed that the response from the FindGlyph call back to KeymnIMX.64.dll caused characters to be added to the action queue in the first instance when the keyboard was working.
In the second instance, the callback action was instead to emit the keystroke. This means F3 for example (if the third option from the IMC window is chosen) is emitted to the app. This why no keystrokes appear in the application.

Working Log

\aiTIP.cpp	130	TIPProcessKey: Enter VirtualKey=['F3' 0x72] lParam=0   IsUp=0 Extended=0 Updateable=0 Preserved=1
\aiTIP.cpp	187	TIPProcessKey: TSFShiftToShift start with 400, include 0
ess.cpp	155	Key pressed: ['F3' 0x72] Context '|| (len: 0) [ ]'
pp	47	kmtip: KeymanGetContext: Exit: Context does not support manipulation.  Using legacy interaction
\aiTIP.cpp	287	AITIP::ReadContext: transitory context, so use buffered context [Updateable=0]
ess.cpp	96	ProcessEvent: vkey[114] ShiftState[0] isDown[1]
l.cpp	270	IM_CallBackCore: td TIPFUpdatable about to call function [FindGlyph]
l.cpp	164	Core Context: || (len: 0) [ ]
l.cpp	164	Intermediate Context: || (len: 0) [ ]
ess.cpp	109	Process_Event_Core: context app before:   || (len: 0) [ ]
ess.cpp	110	Process_Event_Core: context app after:    |蚶子| (len: 2) [ U+86b6 U+5b50 ]
ess.cpp	111	Process_Event_Core: context cache before: || (len: 0) [ ]
ess.cpp	112	Process_Event_Core: context cache after:  |蚶子| (len: 2) [ U+86b6 U+5b50 ]
\aiTIP.cpp	214	TIPProcessKey: Success, res=1
\aiTIP.cpp	225	TIPProcessKey: restoring shift state from 400 to 400
pp	47	kmtip: _KeymanProcessKeystroke (72 0 update preserved ex=4b4d0000)
\aiTIP.cpp	130	TIPProcessKey: Enter VirtualKey=['F3' 0x72] lParam=0   IsUp=0 Extended=0 Updateable=1 Preserved=1
\aiTIP.cpp	187	TIPProcessKey: TSFShiftToShift start with 400, include 0
ess.cpp	155	
\appint.cpp	62	App::QueueAction: QIT_CHAR 86b6
\appint.cpp	62	App::QueueAction: QIT_CHAR 5b50

Error Log

\globals.cpp	47	kmtip: _KeymanProcessKeystroke (72 0  preserved ex=4b4d0000)
n32\appint\aiTIP.cpp	130	TIPProcessKey: Enter VirtualKey=['F3' 0x72] lParam=0   IsUp=0 Extended=0 Updateable=0 Preserved=1
n32\appint\aiTIP.cpp	134	TIPProcessKey: Scan code was zero so using cached scan code 0
n32\appint\aiTIP.cpp	187	TIPProcessKey: TSFShiftToShift start with 400, include 0
n32\kmprocess.cpp	155	Key pressed: ['F3' 0x72] Context '|| (len: 0) [ ]'
\globals.cpp	47	kmtip: GetLeftOfSelection: Exit -- no text in edit control, treating as transitory
n32\appint\aiTIP.cpp	287	AITIP::ReadContext: transitory context, so use buffered context [Updateable=0]
n32\kmprocess.cpp	96	ProcessEvent: vkey[114] ShiftState[0] isDown[1]
n32\calldll.cpp	270	IM_CallBackCore: td TIPFUpdatable about to call function [FindGlyph]
n32\calldll.cpp	164	Core Context: || (len: 0) [ ]
n32\calldll.cpp	164	Intermediate Context: || (len: 0) [ ]
n32\calldll.cpp	129	kmnToCoreActionItem: Emit Action:[QIT_VKEYDOWN] Key:[72] 
n32\calldll.cpp	129	kmnToCoreActionItem: Emit Action:[QIT_VKEYUP] Key:[72] 

@darcywong00 darcywong00 modified the milestones: B17S5, B17S6 Apr 12, 2024
@rc-swag rc-swag changed the title bug(windows): IMX keyboards not inputting text to app in Windows 11 bug(windows): cs_pinyin keyboards not inputting text to app in Windows 11 Apr 22, 2024
@rc-swag
Copy link
Contributor Author

rc-swag commented Apr 26, 2024

I have pushed commit here Which fixes this issue,that is the second application not working with the cs_pinyin keyboard. That PR keymanapp/keyboards#64 I believe needs a bit more work before it is ready to merge.

@rc-swag
Copy link
Contributor Author

rc-swag commented Apr 26, 2024

In the end this is a duplicate of #6588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants