Skip to content

Commit

Permalink
attempt to fix mouse selectiong when async edit
Browse files Browse the repository at this point in the history
  • Loading branch information
fxliang committed Apr 7, 2024
1 parent ffad682 commit b94343e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WeaselTSF/CandidateList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,11 @@ void WeaselTSF::_SelectCandidateOnCurrentPage(size_t index) {
// simulate a VK_SELECT presskey to get data back and DoEditSession
// the simulated keycode must be the one make TranslateKeycode Non-Zero return
// fix me: are there any better ways?
INPUT inputs[2];
INPUT inputs[1];
inputs[0].type = INPUT_KEYBOARD;
inputs[0].ki = {VK_SELECT, 0, 0, 0, 0};
inputs[1].type = INPUT_KEYBOARD;
inputs[1].ki = {VK_SELECT, 0, KEYEVENTF_KEYUP, 0, 0};
::SendInput(sizeof(inputs) / sizeof(INPUT), inputs, sizeof(INPUT));
inputs[0].ki.dwFlags = KEYEVENTF_KEYUP;
::SendInput(sizeof(inputs) / sizeof(INPUT), inputs, sizeof(INPUT));
}

Expand Down

0 comments on commit b94343e

Please sign in to comment.