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

chore(windows): do QIT_VSHIFTDOWN and QIT_VSHIFTUP do anything at all? #11925

Closed
mcdurdin opened this issue Jul 3, 2024 · 3 comments · Fixed by #11973
Closed

chore(windows): do QIT_VSHIFTDOWN and QIT_VSHIFTUP do anything at all? #11925

mcdurdin opened this issue Jul 3, 2024 · 3 comments · Fixed by #11973
Assignees
Milestone

Comments

@mcdurdin
Copy link
Member

mcdurdin commented Jul 3, 2024

The only refs are as follows, and none of them seem to have any action:

10 results - 9 files

core\src\kmx\kmx_actions.h:
  24  // QIT_VKEYUP      1  Not supported by Core, legacy Windows-only, see #10049
  25: // QIT_VSHIFTDOWN  2  Not supported by Core, legacy Windows-only, see #10049
  26  // QIT_VSHIFTUP    3  Not supported by Core, legacy Windows-only, see #10049

developer\src\samples\imsample\imdllref.rtf:
  220  \widctlpar\intbl\adjustright \fs20\lang3081\cgrid {\row }\pard \widctlpar\intbl\adjustright {\cs17\f2\fs16 QIT_VKEYUP\cell }\pard\plain \s18\widctlpar\intbl\adjustright \f1\fs16\lang3081\cgrid {Simulate any key release on the keyboard; }{\b dwData}{
  221:  is the virtual key code\cell }\pard\plain \widctlpar\intbl\adjustright \fs20\lang3081\cgrid {\row }\pard \widctlpar\intbl\adjustright {\cs17\f2\fs16 QIT_VSHIFTDOWN\cell }\pard\plain \s18\widctlpar\intbl\adjustright \f1\fs16\lang3081\cgrid {
  222  Simulate pressing a set of shift keys.  }{\b dwData}{ can be a combination of the following flags:

developer\src\samples\imsample\imlib.h:
  6  #define QIT_VKEYUP		1
  7: #define QIT_VSHIFTDOWN	2
  8  #define QIT_VSHIFTUP	3

developer\src\tike\debug\UfrmDebugStatus_Events.pas:
  118      KM_CORE_IT_EMIT_KEYSTROKE: AddItem('emit_keystroke', action);
  119: //    QIT_VSHIFTDOWN:  AddItem('vshiftdown', action);
  120  //    QIT_VSHIFTUP:    AddItem('vshiftup', action);

windows\src\engine\keyman32\kmprocess.cpp:
  180      if (_td->app->IsLegacy()) {
  181:       _td->app->QueueAction(QIT_VSHIFTDOWN, Globals::get_ShiftState());
  182        _td->app->QueueAction(QIT_VKEYDOWN, _td->state.vkey);

windows\src\engine\keyman32\appint\aiWin2000Unicode.cpp:
  181  		  break;
  182: 	  case QIT_VSHIFTDOWN:
  183  		  break;

windows\src\engine\keyman32\appint\appint.cpp:
  31  const LPSTR ItemTypes[8] = {
  32: 	"QIT_VKEYDOWN", "QIT_VKEYUP", "QIT_VSHIFTDOWN", "QIT_VSHIFTUP",
  33      "QIT_CHAR", "QIT_DEADKEY", "QIT_BELL", "QIT_BACK" };

windows\src\engine\keyman32\appint\appint.h:
  36  #define QIT_VKEYUP		1
  37: #define QIT_VSHIFTDOWN	2
  38  #define QIT_VSHIFTUP	3

windows\src\engine\testhost\testhost.cpp:
  225  #define QIT_VKEYUP		1
  226: #define QIT_VSHIFTDOWN	2
  227  #define QIT_VSHIFTUP	3

  270        break;
  271:     case QIT_VSHIFTDOWN:
  272        break;
@rc-swag
Copy link
Contributor

rc-swag commented Jul 17, 2024

It appears not, also see #10049. although QIT_VKEYUP and QIT_VKKEYDOWN are still used.
From what I can guess at is that it (the SHIFTDOWN and SHIFTUP) to try and reduce race conditions, out of order shift key presses. I propose a PR to remove it with plenty of regression testing.

@mcdurdin
Copy link
Member Author

Sounds good to me

@rc-swag
Copy link
Contributor

rc-swag commented Jul 17, 2024

Just for my future reference, KeymanIMX.cpp for cs_pinyin does not ever call KMQueueAction with QIT_VSHIFTDOWN/UP. Which is good as
kmnToCoreActionItem(int ItemType, DWORD dwData, WORD wVkey) { does not handle QIT_VSHIFTDOWN QIT_VSHIFTUP and therefore just silently skips over it.

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

Successfully merging a pull request may close this issue.

3 participants