[Pharo-dev] Fwd: Keyboard events is broken.

phil at highoctane.be phil at highoctane.be
Tue Aug 6 13:25:46 EDT 2013


Not sure you have two keyup. but down, up, and then keypressed should be
the right order. Because there is no char pressed until up.

Phil

On Tuesday, August 6, 2013, Guillermo Polito <guillermopolito at gmail.com>
wrote:
> And the removal of the debugging code is here
https://gitorious.org/cogvm/blessed/commit/9e2a77928edf0144f0d5c42ada66eb18918af64b/diffs/506febc8184dfd6c764d8d8fbc5b08dca8f998c0;)
>
> On Tue, Aug 6, 2013 at 5:47 PM, Guillermo Polito <
guillermopolito at gmail.com> wrote:
>
> ah, forgot to say. Latest vms from jenkins should be ready in a while,
not yet :).
>
> On Tue, Aug 6, 2013 at 5:46 PM, Guillermo Polito <
guillermopolito at gmail.com> wrote:
>
> On Tue, Aug 6, 2013 at 4:53 PM, Stéphane Ducasse <
stephane.ducasse at inria.fr> wrote:
>
> thanks guillermo :)
> Cleaning events at VM level is important.
>
> Cleaning is not sooooo easy :).
> I've been able to reproduce some of these problems (the delete key and
the double keyUp:). I've tried to fix them, bah, actually I did in here,
but I'd like someone else tests in their keyboard layouts in their homes :).
> Regarding the difference of the keyValues between keyUp and keyDown, I
did not address it, and it kinda orthogonal, nothing to do with this
particular issue.
> To see my changes, people can have a look at the diff in here:
>
https://gitorious.org/cogvm/blessed/commit/2214cee58a5c5266b8ab2322b98471553b1b11c2/diffs/9e2a77928edf0144f0d5c42ada66eb18918af64b
>
> I'd like to start putting this in some issue tracker. Cog issue tracker
or Pharo one? :) Esteban?
>
> On Aug 6, 2013, at 4:32 PM, Guillermo Polito <guillermopolito at gmail.com>
wrote:
>
>
>
> On Tue, Aug 6, 2013 at 3:40 PM, Igor Stasenko <siguctua at gmail.com> wrote:
>
> I changed this method to see better what happens:
> HandMorph class>>showDebugEvent: evt
>
>         ShowEvents == true ifTrue: [
>                 | ofs|
>                 Display fill: (0 at 0 extent: 500 at 120) rule: Form over
> fillColor: Color white.
>                 ofs := (owner hands indexOf: self) - 1 * 60.
>                 evt printString displayAt: (0 at ofs) + (evt isKeyboard
> ifTrue: [0 at 30]
> ifFalse: [0 at 0]).
>                 self keyboardFocus printString displayAt: (0 at ofs)+(0 at 45).
>
>                 evt isKeyboard ifTrue: [  Transcript show: evt
printString;cr ]
>                 ].
>
>
> KeyboardEvent>> printOn: aStream
>         "Print the receiver on a stream"
>
>         aStream nextPut: $[.
>         aStream nextPutAll: type; nextPutAll: ' '''.
>         self printKeyStringOn: aStream.
>         aStream nextPut: $'.
>
>         aStream space; nextPutAll: 'keyValue: ', self keyValue  asString.
>
>         aStream nextPut: $]
>
> set
> HandMorph showEvents:true
>
> Now, pressing single space, gives me this:
>
> [keyDown ' ' keyValue: 49]
> [keystroke ' ' keyValue: 32]
> [keyUp ' ' keyValue: 49]
> [keyUp ' ' keyValue: 49]
>
> Pressing delete key (or fn-backspace , for those who having a lot of
> spare fingers to use bad keyboards):
>
> [keyDown ' ' keyValue: 117]
> [keystroke '⌦' keyValue: 188]
> [keyUp ' ' keyValue: 117]
> [keyUp ' ' keyValue: 117]
>
> now, can someone tell me , why there is 2 keyUp events

-- 
---
Philippe Back
Dramatic Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Mail:phil at highoctane.be | Web: http://philippeback.eu
Blog: http://philippeback.be | Twitter: @philippeback
Youtube: http://www.youtube.com/user/philippeback/videos

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Featured on the Software Process and Measurement Cast
http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
Added Reseller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130806/0dfa287c/attachment-0002.html>


More information about the Pharo-dev mailing list