Commit message input does not permit all unicode characters

Issue #3573 resolved
Justinas Urbanavicius
created an issue

Commit message input does not permit to input a "į" Lithuanian character, in TortoiseHg v2.10.1 it was treated as backspace and every-time i pressed it, it worked as backspace and deleted one character backwards. in v2.10.2 pressing "į" does nothing, it just does not appear in the input. į character is above letters number 5 on the keyboard, every other character works without problem.

Using Windows 8 x64 with Lithuanian - Lithuanian layout

Comments (8)

  1. Justinas Urbanavicius reporter

    į - latin small letter i with ogonek OCT: 0457; DEC: 303; HEX: 0x12F

    ok found it finally, just press ALT+0225 on windows

    or add lithuanian layout and press nuber 5 above the letters and that's it

  2. Yuya Nishihara

    Okay, probably it is a bug of QScintilla.

    QScintilla is the bridge between Qt and Scintilla editor component. In Qt, the key code for "į" is 302, but Scintilla defines SCK_LEFT = 302. QScintilla can translate Qt::Key_Left to SCK_LEFT correctly, but can't 302 to "į".

    // qsciscintillabase.cpp
        switch (e->key())
        case Qt::Key_Left:
            key = SCK_LEFT;
            key = e->key();
        if (key)
            bool consumed = false;
            // unfortunately the code for "į" key is 302, so it's "consumed" by Scintilla
            sci->KeyDownWithModifiers(key, modifiers, &consumed);
            if (consumed)
        QString text = e->text();
        if (!text.isEmpty() && text[0].isPrint())
            ScintillaBytes bytes = textAsBytes(text);
            sci->AddCharUTF(, bytes.length());
  3. Log in to comment