jdf / Processing.py-Bugs

A home for all bugs and feature requests about Python Mode for the Processing Development Environment.
41 stars 8 forks source link

why is it bugging for 'R' but not for 'r' ? #222

Open jb5425 opened 6 years ago

jb5425 commented 6 years ago

Why is it having problems when restarting the program with 'R' (when haping capslock ON) but not with 'r' key. With 'R' its just showing the line until click is released, but it's supposed to be permanent. Here is the code:

def setup():
    size(400, 400)
    strokeWeight(3)
    background(192, 64, 0)
def draw():
    stroke("#FFFF00")
    if keyPressed:
        if key == 'R' or key == 'r':
            background(192, 64, 0)
    if mousePressed:
        line(width/2, height/2, mouseX, mouseY)
    stroke(255, 100, 0)
    fill(255, 255, 0)
    ellipse(width/2, height/2, 50, 50)
jdf commented 6 years ago

I can't reproduce the behavior you describe.

jb5425 commented 6 years ago

I have now figured out that this is a bug only on MAC OS version? Since it works normal for me too on a Windows version.

jdf commented 6 years ago

When I tested it I was on a Mac OS computer. I still cannot reproduce it. If you could provide steps to trigger the behavior, I'm happy to try again.

jb5425 commented 6 years ago

Seems odd. On Windows it is fine. But on my Mac OS computer: When I run it I hold click, to draw some lines, then press 'r' for reset, draw some lines again, press capslock button, therefor press 'R'. Now when I try to draw lines with holding click, there is only 1 that is from center to my mouse pointer, but disappears when I let go of the click. I've noticed if u hold key 'r' and click at the same time, this is my behaviour of the program when only pressing key 'R'. But if I press any other key it starts to work as it should.

alex-lindsay commented 6 years ago

Ahhhhh I see what you are saying. But. I have the same thing happen when I use r after using caps lock and then turning off caps lock before hitting 'r'. So ... once I've turned CAPS LOCK on, whether I leave it on, or turn it off, I see the behavior of getting only one line drawing.