Menu

#1482 '3' key cause '^3' in Turkish-Q keyboard

open
nobody
1
2020-06-25
2019-09-13
aetnc
No

Pressing '3' from TightVier cause '^3' at remote in TightVNC Server 2.8.23.

When debug it, i try to press a key to notepad to control where '^' occured step by step.

File "tightvnc-2.8.23-gpl\win-system\InputInjector.cpp" at line 202

bool invariantToShift = isInvariantToShift((BYTE)vkKeyScanResult, hklCurrent);

executed, '^' char occured.

the control of 'invariantToShift' boolean be caused of '^' char.

Discussion

  • aetnc

    aetnc - 2019-09-13

    At this control
    bool invariantToShift = isInvariantToShift((BYTE)vkKeyScanResult, hklCurrent);

    inside the code

    bool InputInjector::isInvariantToShift(BYTE virtKey, HKL keyboardLayout)
    {
      return isDifferentWith(VK_SHIFT, 128, virtKey, keyboardLayout);
    }
    

    calls

    isDifferentWith(VK_SHIFT, 128, virtKey, keyboardLayout);

    File 'tightvnc-2.8.23-gpl\win-system\InputInjector.cpp' line 411

      int count2 = ToUnicodeEx(virtKey, 0, kbdState, outBuff2,
                              sizeof(outBuff2) / sizeof(WCHAR),
                              0, keyboardLayout);
    

    cause '^'

    VK_SHIFT = 0x10 (16)

    occures a shift for 3 key.

    In turkish-q keyboard, 3 key have '^' with shift.

     
  • Anton

    Anton - 2019-09-16

    Hello.
    isInvariantToShift returns false on 3 key when Turkish-Q layout used.
    It is a correct value and it is the same for English layout.

     
  • aetnc

    aetnc - 2019-09-16

    yes. return value is true. But when the line execute it cause ^ key pressed. i control it by debuging. after line, when i press any key ^ char is shown.

     
  • aetnc

    aetnc - 2019-10-25

    With "tightvnc-2.8.27", problem is solved. Tested.

     
  • Om Sa

    Om Sa - 2020-05-16

    this bug's status should be closed now as of version 2.8.27

    thanks anton and aetnc for detailed debugging

     
  • jose willians de mendonça

    mesmo na versão 2.8.27 acessando via nat o problema acontece, em rede local não.
    após tentarmos de tudo e muita dor de cabeça tivemos a idéia de criar um layout de teclado customizado eliminando o caracter que aparece no shift+6 e finalmente deu certo!
    basta baixar o Microsoft Keyboard Layout Creator 1.4, criar o layout eliminado o shift+tecla problematico, fazer o build e instalar na maquina host.

     

Log in to post a comment.

MongoDB Logo MongoDB