[squeak-dev] unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

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

[squeak-dev] unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Nicolas Cellier-3

Sorry to raise this again,
I am running a 3.10 image with some of OLPC fixes recommended by Bert (
http://bugs.squeak.org/view.php?id=7071 ) on a 3.10-1 VM in linux i86
X11, french keyboard.

My (LanguageEnvironment currentPlatform) is (a Latin1Environment).
My (ActiveHand keyboardInterpreter) is (an UTF32InputInterpreter).
So far, so good, i can type éèà etc, dead letters work etc...

But I experience annoying problems with these 3 keys:
#PageUp #PageDown and #End do not behave as expected.
(Same with keys above the arrow pad and unlocked numpad).

Anyone experienced this or is it just me?
Anyone has a fix for it? VM update?

Nicolas



Gory details:
#PageUp key gives:

evtBuf: #(2 3830724 11 1 0 5 0 0)
buttons: 0
modifiers: 0
type: #keyDown
pressType: 1
stamp: 3830724
char: Character value: 5

I would expect 11

#PageDown key gives:
evtBuf: #(2 4037346 12 1 0 11 0 0)
buttons: 0
modifiers: 0
type: #keyDown
pressType: 1
stamp: 4037346
char: Character value: 11

I would expect 12

#End key gives:
evtBuf: #(2 4093084 4 1 0 12 0 0)
buttons: 0
modifiers: 0
type: #keyDown
pressType: 1
stamp: 4093084
char: Character newPage

I would expect 4

The source of my expectations is:
ParagraphEditor class>>#initializeCmdKeyShortcuts

cmdMap at: 1 + 1 put: #cursorHome:.        "home key"
cmdMap at: 4 + 1 put: #cursorEnd:.         "end key"
cmdMap at: 8 + 1 put: #backspace:.         "ctrl-H or delete key"
cmdMap at: 11 + 1 put: #cursorPageUp:.     "page up key"
cmdMap at: 12 + 1 put: #cursorPageDown:.   "page down key"
cmdMap at: 13 + 1 put: #crWithIndent:.     "cmd-Return"
cmdMap at: 27 + 1 put: #offerMenuFromEsc:. "escape key"
cmdMap at: 28 + 1 put: #cursorLeft:.       "left arrow key"
cmdMap at: 29 + 1 put: #cursorRight:.      "right arrow key"
cmdMap at: 30 + 1 put: #cursorUp:.         "up arrow key"
cmdMap at: 31 + 1 put: #cursorDown:.       "down arrow key"
cmdMap at: 32 + 1 put: #selectWord:.       "space bar key"
cmdMap at: 127 + 1 put: #forwardDelete:.   "del key"


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Bert Freudenberg
Thanks Nicolas,

looks like you have found a genuine bug. I just confirmed the problem  
occurs on an OLPC laptop, too. I opened this bug report about it

https://dev.laptop.org/ticket/8536

- Bert -

Am 17.09.2008 um 23:39 schrieb nicolas cellier:

>
> Sorry to raise this again,
> I am running a 3.10 image with some of OLPC fixes recommended by  
> Bert ( http://bugs.squeak.org/view.php?id=7071 ) on a 3.10-1 VM in  
> linux i86 X11, french keyboard.
>
> My (LanguageEnvironment currentPlatform) is (a Latin1Environment).
> My (ActiveHand keyboardInterpreter) is (an UTF32InputInterpreter).
> So far, so good, i can type éèà etc, dead letters work etc...
>
> But I experience annoying problems with these 3 keys:
> #PageUp #PageDown and #End do not behave as expected.
> (Same with keys above the arrow pad and unlocked numpad).
>
> Anyone experienced this or is it just me?
> Anyone has a fix for it? VM update?
>
> Nicolas
>
>
>
> Gory details:
> #PageUp key gives:
>
> evtBuf: #(2 3830724 11 1 0 5 0 0)
> buttons: 0
> modifiers: 0
> type: #keyDown
> pressType: 1
> stamp: 3830724
> char: Character value: 5
>
> I would expect 11
>
> #PageDown key gives:
> evtBuf: #(2 4037346 12 1 0 11 0 0)
> buttons: 0
> modifiers: 0
> type: #keyDown
> pressType: 1
> stamp: 4037346
> char: Character value: 11
>
> I would expect 12
>
> #End key gives:
> evtBuf: #(2 4093084 4 1 0 12 0 0)
> buttons: 0
> modifiers: 0
> type: #keyDown
> pressType: 1
> stamp: 4093084
> char: Character newPage
>
> I would expect 4
>
> The source of my expectations is:
> ParagraphEditor class>>#initializeCmdKeyShortcuts
>
> cmdMap at: 1 + 1 put: #cursorHome:.        "home key"
> cmdMap at: 4 + 1 put: #cursorEnd:.         "end key"
> cmdMap at: 8 + 1 put: #backspace:.         "ctrl-H or delete key"
> cmdMap at: 11 + 1 put: #cursorPageUp:.     "page up key"
> cmdMap at: 12 + 1 put: #cursorPageDown:.   "page down key"
> cmdMap at: 13 + 1 put: #crWithIndent:.     "cmd-Return"
> cmdMap at: 27 + 1 put: #offerMenuFromEsc:. "escape key"
> cmdMap at: 28 + 1 put: #cursorLeft:.       "left arrow key"
> cmdMap at: 29 + 1 put: #cursorRight:.      "right arrow key"
> cmdMap at: 30 + 1 put: #cursorUp:.         "up arrow key"
> cmdMap at: 31 + 1 put: #cursorDown:.       "down arrow key"
> cmdMap at: 32 + 1 put: #selectWord:.       "space bar key"
> cmdMap at: 127 + 1 put: #forwardDelete:.   "del key"
>
>


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Nicolas Cellier-3
Seems like (evtBuf at: 3) holds the right value for these 3 keys.

Bert Freudenberg a écrit :

> Thanks Nicolas,
>
> looks like you have found a genuine bug. I just confirmed the problem
> occurs on an OLPC laptop, too. I opened this bug report about it
>
> https://dev.laptop.org/ticket/8536
>
> - Bert -
>
> Am 17.09.2008 um 23:39 schrieb nicolas cellier:
>
>>
>> Sorry to raise this again,
>> I am running a 3.10 image with some of OLPC fixes recommended by Bert
>> ( http://bugs.squeak.org/view.php?id=7071 ) on a 3.10-1 VM in linux
>> i86 X11, french keyboard.
>>
>> My (LanguageEnvironment currentPlatform) is (a Latin1Environment).
>> My (ActiveHand keyboardInterpreter) is (an UTF32InputInterpreter).
>> So far, so good, i can type éèà etc, dead letters work etc...
>>
>> But I experience annoying problems with these 3 keys:
>> #PageUp #PageDown and #End do not behave as expected.
>> (Same with keys above the arrow pad and unlocked numpad).
>>
>> Anyone experienced this or is it just me?
>> Anyone has a fix for it? VM update?
>>
>> Nicolas
>>
>>
>>
>> Gory details:
>> #PageUp key gives:
>>
>> evtBuf:     #(2 3830724 11 1 0 5 0 0)
>> buttons:     0
>> modifiers:     0
>> type:     #keyDown
>> pressType:     1
>> stamp:     3830724
>> char:     Character value: 5
>>
>> I would expect 11
>>
>> #PageDown key gives:
>> evtBuf:     #(2 4037346 12 1 0 11 0 0)
>> buttons:     0
>> modifiers:     0
>> type:     #keyDown
>> pressType:     1
>> stamp:     4037346
>> char:     Character value: 11
>>
>> I would expect 12
>>
>> #End key gives:
>> evtBuf:     #(2 4093084 4 1 0 12 0 0)
>> buttons:     0
>> modifiers:     0
>> type:     #keyDown
>> pressType:     1
>> stamp:     4093084
>> char:     Character newPage
>>
>> I would expect 4
>>
>> The source of my expectations is:
>> ParagraphEditor class>>#initializeCmdKeyShortcuts
>>
>> cmdMap at: 1 + 1 put: #cursorHome:.        "home key"
>> cmdMap at: 4 + 1 put: #cursorEnd:.         "end key"
>> cmdMap at: 8 + 1 put: #backspace:.         "ctrl-H or delete key"
>> cmdMap at: 11 + 1 put: #cursorPageUp:.     "page up key"
>> cmdMap at: 12 + 1 put: #cursorPageDown:.   "page down key"
>> cmdMap at: 13 + 1 put: #crWithIndent:.     "cmd-Return"
>> cmdMap at: 27 + 1 put: #offerMenuFromEsc:. "escape key"
>> cmdMap at: 28 + 1 put: #cursorLeft:.       "left arrow key"
>> cmdMap at: 29 + 1 put: #cursorRight:.      "right arrow key"
>> cmdMap at: 30 + 1 put: #cursorUp:.         "up arrow key"
>> cmdMap at: 31 + 1 put: #cursorDown:.       "down arrow key"
>> cmdMap at: 32 + 1 put: #selectWord:.       "space bar key"
>> cmdMap at: 127 + 1 put: #forwardDelete:.   "del key"
>>
>>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Yoshiki Ohshima-2
  Could you compile the VM with the line:

static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 5, 11, 12, 4};

changed to perhaps:

static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 11, 12, 4, 5};

and try?

  Sorry not for doing it by myself, but I first have to see what is
going on with my broken laptop...

-- Yoshiki

At Thu, 18 Sep 2008 01:06:35 +0200,
nicolas cellier wrote:

>
> Seems like (evtBuf at: 3) holds the right value for these 3 keys.
>
> Bert Freudenberg a écrit :
> > Thanks Nicolas,
> >
> > looks like you have found a genuine bug. I just confirmed the problem
> > occurs on an OLPC laptop, too. I opened this bug report about it
> >
> > https://dev.laptop.org/ticket/8536
> >
> > - Bert -
> >
> > Am 17.09.2008 um 23:39 schrieb nicolas cellier:
> >
> >>
> >> Sorry to raise this again,
> >> I am running a 3.10 image with some of OLPC fixes recommended by Bert
> >> ( http://bugs.squeak.org/view.php?id=7071 ) on a 3.10-1 VM in linux
> >> i86 X11, french keyboard.
> >>
> >> My (LanguageEnvironment currentPlatform) is (a Latin1Environment).
> >> My (ActiveHand keyboardInterpreter) is (an UTF32InputInterpreter).
> >> So far, so good, i can type éèà etc, dead letters work etc...
> >>
> >> But I experience annoying problems with these 3 keys:
> >> #PageUp #PageDown and #End do not behave as expected.
> >> (Same with keys above the arrow pad and unlocked numpad).
> >>
> >> Anyone experienced this or is it just me?
> >> Anyone has a fix for it? VM update?
> >>
> >> Nicolas
> >>
> >>
> >>
> >> Gory details:
> >> #PageUp key gives:
> >>
> >> evtBuf:     #(2 3830724 11 1 0 5 0 0)
> >> buttons:     0
> >> modifiers:     0
> >> type:     #keyDown
> >> pressType:     1
> >> stamp:     3830724
> >> char:     Character value: 5
> >>
> >> I would expect 11
> >>
> >> #PageDown key gives:
> >> evtBuf:     #(2 4037346 12 1 0 11 0 0)
> >> buttons:     0
> >> modifiers:     0
> >> type:     #keyDown
> >> pressType:     1
> >> stamp:     4037346
> >> char:     Character value: 11
> >>
> >> I would expect 12
> >>
> >> #End key gives:
> >> evtBuf:     #(2 4093084 4 1 0 12 0 0)
> >> buttons:     0
> >> modifiers:     0
> >> type:     #keyDown
> >> pressType:     1
> >> stamp:     4093084
> >> char:     Character newPage
> >>
> >> I would expect 4
> >>
> >> The source of my expectations is:
> >> ParagraphEditor class>>#initializeCmdKeyShortcuts
> >>
> >> cmdMap at: 1 + 1 put: #cursorHome:.        "home key"
> >> cmdMap at: 4 + 1 put: #cursorEnd:.         "end key"
> >> cmdMap at: 8 + 1 put: #backspace:.         "ctrl-H or delete key"
> >> cmdMap at: 11 + 1 put: #cursorPageUp:.     "page up key"
> >> cmdMap at: 12 + 1 put: #cursorPageDown:.   "page down key"
> >> cmdMap at: 13 + 1 put: #crWithIndent:.     "cmd-Return"
> >> cmdMap at: 27 + 1 put: #offerMenuFromEsc:. "escape key"
> >> cmdMap at: 28 + 1 put: #cursorLeft:.       "left arrow key"
> >> cmdMap at: 29 + 1 put: #cursorRight:.      "right arrow key"
> >> cmdMap at: 30 + 1 put: #cursorUp:.         "up arrow key"
> >> cmdMap at: 31 + 1 put: #cursorDown:.       "down arrow key"
> >> cmdMap at: 32 + 1 put: #selectWord:.       "space bar key"
> >> cmdMap at: 127 + 1 put: #forwardDelete:.   "del key"
> >>
> >>
> >
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Yoshiki Ohshima-2
At Wed, 17 Sep 2008 17:35:59 -0700,
Yoshiki Ohshima wrote:
>
>   Could you compile the VM with the line:
>
> static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 5, 11, 12, 4};
>
> changed to perhaps:
>
> static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 11, 12, 4, 5};

  Ok... I fixed my laptop and tried it.  The correct line should be:

static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 11, 12, 4, 1};

  The first 1 may well be off; the array could be one short and the
offset could be adjusted, but I think behavior that is "forgiving"
makes sense here.

-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Nicolas Cellier-3
Yoshiki Ohshima a écrit :

> At Wed, 17 Sep 2008 17:35:59 -0700,
> Yoshiki Ohshima wrote:
>>   Could you compile the VM with the line:
>>
>> static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 5, 11, 12, 4};
>>
>> changed to perhaps:
>>
>> static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 11, 12, 4, 5};
>
>   Ok... I fixed my laptop and tried it.  The correct line should be:
>
> static unsigned short const sqSpecialKey[] = {1, 28, 30, 29, 31, 11, 12, 4, 1};
>

Thank you very much Yoshiki, this change made my squeak hours easier!


>   The first 1 may well be off; the array could be one short and the
> offset could be adjusted, but I think behavior that is "forgiving"
> makes sense here.
>
> -- Yoshiki
>
>

Hmm, my #home key did work as expected before change.
I would have guessed the last 1 would map to another key (which one?).
No matter, thanks again!

Nicolas


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Yoshiki Ohshima-2
> Hmm, my #home key did work as expected before change.
> I would have guessed the last 1 would map to another key (which one?).
> No matter, thanks again!

  I'm still confused about what is XK_Home in keysymdef.h.  Do you
know what key is supposed to generate the code?

-- Yoshiki

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: unix 3.10-1 VM scrambles #PageUp #PageDown #End keys

Nicolas Cellier-3
Yoshiki Ohshima a écrit :

>> Hmm, my #home key did work as expected before change.
>> I would have guessed the last 1 would map to another key (which one?).
>> No matter, thanks again!
>
>   I'm still confused about what is XK_Home in keysymdef.h.  Do you
> know what key is supposed to generate the code?
>
> -- Yoshiki
>
>

locate keysymdef.h
gvim /usr/include/X11/keysymdef.h
/XK_Home

#define XK_Home      0xff50
#define XK_Left      0xff51  /* Move left, left arrow */
#define XK_Up        0xff52  /* Move up, up arrow */
#define XK_Right     0xff53  /* Move right, right arrow */
#define XK_Down      0xff54  /* Move down, down arrow */
#define XK_Prior     0xff55  /* Prior, previous */
#define XK_Page_Up   0xff55
#define XK_Next      0xff56  /* Next */
#define XK_Page_Down 0xff56
#define XK_End       0xff57  /* EOL */
#define XK_Begin     0xff58  /* BOL */

:1
/* $Xorg: keysymdef.h,v 1.4 2001/02/09 02:03:23 $ */

Well, I always used the Home key with BOL semantics, did not know that
could be two different things...

On my keyboard the key just has an arrow pointing to upper left, and it
must correspond to XK_Home, otherwise it would not have worked in 3.10-1
VM before patch...
And I am quite sure I remember 'Home' was written on this key on
equivalent English keyboard (did not touch one for years now).

There must have been some keyboards with the two different keys...
Most keyboard I know just have the #Home one,.
And indeed my keyboard does not seem to generate any XK_Begin...
It seems like yours does.

Logical conclusion would be that both leading 1 and final 1 are
necessary, and your patch is perfect in this case.

Cheers

Nicolas