This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-09-19 00:00:46

Schroedingers_hat
New Scratcher
Registered: 2012-09-18
Posts: 2

key __ pressed ? bug

In using the linux version, the key pressed blocks such as:

 key [left arrow] pressed?
Get stuck when pressing multiple keys.
Ie. pressing and hold left, then press and release right, then release left results in
 key [left arrow] pressed?
continuing to return true.

This is using the scratch program under linux. I cannot reproduce the issue in windows.
Suggestions of a workaround are welcome. I am attempting to set up a computer for children to have in their bedroom and so it's not connected to the internet (so uploading and playing online is not an option.
is there a guide to installing the web player locally somewhere, perhaps?

Offline

 

#2 2012-09-19 08:32:00

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: key __ pressed ? bug

Schroedingers_hat wrote:

In using the linux version, the key pressed blocks such as:

<key [left arrow v] pressed?>
Get stuck when pressing multiple keys.
Ie. pressing and hold left, then press and release right, then release left results in
<key [left arrow v] pressed?>
continuing to return true.

This is using the scratch program under linux. I cannot reproduce the issue in windows.
Suggestions of a workaround are welcome. I am attempting to set up a computer for children to have in their bedroom and so it's not connected to the internet (so uploading and playing online is not an option.
is there a guide to installing the web player locally somewhere, perhaps?

I think these are the blocks you meant after I fixed them.

How about:

when [whatever v] key pressed
? Does it fail to function too?


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#3 2012-09-19 10:01:13

chongyian
Scratcher
Registered: 2012-05-08
Posts: 1000+

Re: key __ pressed ? bug

I think it'll be the same...

Offline

 

#4 2012-09-20 04:29:22

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: key __ pressed ? bug

We can't assume.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#5 2012-09-20 04:40:53

chongyian
Scratcher
Registered: 2012-05-08
Posts: 1000+

Re: key __ pressed ? bug

yes, its the same. I tried on my father's rasberry pi ( Linux computer) last night and...

Offline

 

#6 2012-09-20 05:03:54

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: key __ pressed ? bug

Okay then.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#7 2012-09-20 05:11:35

chongyian
Scratcher
Registered: 2012-05-08
Posts: 1000+

Re: key __ pressed ? bug

:)lol

Offline

 

#8 2012-10-12 03:59:07

proxima-alver
New Scratcher
Registered: 2012-10-10
Posts: 7

Re: key __ pressed ? bug

I am having the same problem as the original poster, using Scratch on a Raspberry Pi.  Several other Pi users have confirmed the same problem (when two keys are pressed at once, as they often are during a game, the first key to be pressed gets 'stuck' - as if it was still pressed - until it is pressed again, which releases it.

This is not a system-wide problem with the Pi itself; it only happens in Scratch.

I have found a workaround, which stops the keys sticking.  I'm hoping someone who knows more than me may be able to find out *why* this workaround helps, and maybe help fix the bug itself.

The workaround (on the current Raspberry Pi standard recommended dist) is:

In the file /usr/bin/scratch, line 97 reads:

Code:

[ -z "$LC_ALL" ] && export LC_ALL="$LANG"

Commenting that line out (by putting a # at the start of it) causes the sticky-keys problem to disappear - the keys then work as they should, and multiple keys (or at least two anyway) can be pressed at the same time with no problems.

If anyone knows why that might be, and even better if anyone can use that information to help fix the bug, I'd be more than happy to test!

Offline

 

#9 2012-10-12 04:42:09

proxima-alver
New Scratcher
Registered: 2012-10-10
Posts: 7

Re: key __ pressed ? bug

In follow-up to my previous post:  Confirming that the problem, and the workaround I gave, both seem to apply to Linux in general (at least, replicated here on a Ubuntu 12.04 LTS x86 system).   

Anyone know why export LC_ALL="$LANG" may cause sticky keys?!

Offline

 

#10 2013-03-02 22:27:43

pheinberg
New Scratcher
Registered: 2013-03-02
Posts: 1

Re: key __ pressed ? bug

First, thanks so much for sharing the solution to this problem!

Second, how on earth did you figure out this proximate cause?

Offline

 

Board footer