[QScintilla] some Lithuanian characters cannot be input by keyboard

Phil Thompson phil at riverbankcomputing.com
Tue Feb 4 12:23:48 GMT 2014


On 01-02-2014 5:16 am, Yuya Nishihara wrote:
> Hi,
>
> I received the following bug report from a TortoiseHg user.
>
>> Commit message input does not permit to input a "į" Lithuanian 
>> character,
>> in TortoiseHg v2.10.1 it was treated as backspace...
>
> https://bitbucket.org/tortoisehg/thg/issue/3573/
>
> It is probably because the key code for "į" conflicts with SCK_LEFT 
> or
> SCK_RIGHT.  When the "į" key, which is "5" in US keyboard, is 
> pressed,
> event.key() returns 302 on Qt 4.8.4 and 303 on Qt 4.8.5 [1].
>
> I guess the problem can be avoided by the following change, but there 
> might
> be a side effect.
>
> diff --git a/Qt4Qt5/qsciscintillabase.cpp 
> b/Qt4Qt5/qsciscintillabase.cpp
> --- a/Qt4Qt5/qsciscintillabase.cpp
> +++ b/Qt4Qt5/qsciscintillabase.cpp
> @@ -467,7 +467,11 @@ void QsciScintillaBase::keyPressEvent(QK
>          break;
>
>      default:
> -        key = e->key();
> +        // qscicommand.cpp:convert() ignores unknown non-ascii keys
> +        if (key > 0x7f)
> +            key = 0;
> +        else:
> +            key = e->key();
>      }
>
>      if (key)
>
>
> [1]: this difference would probably come from the following commit
>      https://qt.gitorious.org/qt/qt/commit/68331c5

Should be fixed in tonight's snapshot.

Thanks,
Phil


More information about the QScintilla mailing list