Unicode support problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unicode support problems

Alexander Batalshikov
For now, some unicode symbols is impossible input from keyboard 
(at least, russian letters 'Л', 'О', 'Н' on Windows platform).
I found some solution of this problem: 
in method ParagraphEditor>>dispatchOnKeyEvent:with: 
replace line:
  keyValue := keyValue ifNil: [keyEvent keyValue]. 
with line:
  keyValue := keyValue ifNil: [keyEvent keyCharacter asInteger]. 

Then save method and that's all.

Cause of the problem: expressoin "keyEvent keyValue" return small number for 
all symbols, unclude unicode and give activation of shortcut events, defined in methods
  ParagraphEditor class>>initializeCmdKeyShortcuts,
  ParagraphEditor class>>initializeShiftCmdKeyShortcuts.

I also notice other strange things: method KeyboardEvent>>keyCharacter 
sends up to 14 times for one keyboard pressing.
Is this normal?


Regards, Alexander Batalshikov.


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Unicode support problems

Michael Rueger-6
Alexandr Batalshikov wrote:
> For now, some unicode symbols is impossible input from keyboard
> (at least, russian letters 'Л', 'О', 'Н' on Windows platform).
> I found some solution of this problem:
> in method ParagraphEditor>>dispatchOnKeyEvent:with:
> replace line:
>   keyValue := keyValue ifNil: [keyEvent keyValue].
> with line:
>   keyValue := keyValue ifNil: [keyEvent keyCharacter asInteger].

In general it looks like most (all?) senders of keyValue should rather
use keyCharacter.

> I also notice other strange things: method KeyboardEvent>>keyCharacter
> sends up to 14 times for one keyboard pressing.
> Is this normal?


I'm afraid yes, but it would still be interesting to trace who all these
senders are. Key handling in Morphic is a mess, so there should be lots
of room for improvement.

Michael

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Unicode support problems

Alexander Batalshikov
On Tue, Nov 3, 2009 at 4:00 PM, Michael Rueger <[hidden email]> wrote:
Alexandr Batalshikov wrote:
> For now, some unicode symbols is impossible input from keyboard
> (at least, russian letters 'Л', 'О', 'Н' on Windows platform).
> I found some solution of this problem:
> in method ParagraphEditor>>dispatchOnKeyEvent:with:
> replace line:
>   keyValue := keyValue ifNil: [keyEvent keyValue].
> with line:
>   keyValue := keyValue ifNil: [keyEvent keyCharacter asInteger].

In general it looks like most (all?) senders of keyValue should rather
use keyCharacter.


Apparently, yes.
At least, this is not seems to be simple typo error in Unicode tables.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project