This site requires JavaScript, please enable it in your browser!
Greenfoot back
MrHare
MrHare wrote ...

2017/11/30

Problems with 's' and 'e' keys.

MrHare MrHare

2017/11/30

#
I am having an issue where when using the keys 'e' and 's' (maybe more?) all my Actor will start delaying a second before moving after using those keys for a few seconds. For example: I have two simple actors that use the arrow keys and wasd to move. If just the arrow keys are used, there is no problem. If just 'w', 'a', 'd' are used, no problem. But when I use 's', both Actors delay a second or two when any movement key is pressed. This remains an issue even after reset is pressed. I must close Greenfoot to get it back to normal. After more testing, this happens when I press the 's' or 'e' keys even when then aren't being checked. So, if I have one Actor using the arrow keys and then randomly press the 's' or 'e' key, the Actor will start to delay in moving. I found a game in Scenarios that should cause the same issue: http://www.greenfoot.org/scenarios/5354 When playing on the website, it works fine. When I download the Greenfoot project and play on my computer, the error happens which make me think this is a bug in the newest version of Greenfoot since this game was made on an older version. This has been the case on the 5 other of my student's computers I have test this on. Any advice would be great. Thanks.
MrHare MrHare

2017/11/30

#
It also seems to only happen with two or more Actors in the World.
Super_Hippo Super_Hippo

2017/11/30

#
I can't reproduce the error. Does your code have any influence? Let's say you create a new scenario and you add two actors which are simply moving straight for example. Does it lag when you press s or e, too? If not, try to comment out as much code as needed until the lag disappears. Are s and e hotkeys for something on your keyboard? Is the keyboard working correctly outside of Greenfoot?
MrHare MrHare

2017/11/30

#
I created a new scenario and just put 2 ball that use the arrows and wasd and after some movement the wasd ball started to delay like i mentioned. I've used multiple computers (1 macbook pro and 3-4 macbooks).
Super_Hippo Super_Hippo

2017/11/30

#
Ok, I am using Windows, so maybe there is a problem with the iOS version.
MrHare MrHare

2017/11/30

#
After more testing, this also happens with the letters: a,z,c,y,u,i,o,l,n (e,s). It only happens when I hold one of those keys down for more than a second. When I do, all the keys I listed are "locked" and won't respond to KeyDown until I hold a key that is not one of those down for over a second (no key works the 1st time I press it after holding one of the above keys down) and release it and press the same key again.
MrHare MrHare

2017/11/30

#
I figured it out. On macOS these are the keys that have more special characters "hidden" behind them. So when you hold the 'e' key down for a second, the next time you press it (or any other if those keys) it brings up a special character (like è, ê, ē, or ę), so it doesn't think you are pressing 'e' anymore. Holding down another key canceled out of the special characters. I guess I learned two new things today! I hope this can help some other people with macs!
MrHare MrHare

2017/12/1

#
If anyone else using a Mac has this problem, the fix is to open your Terminal and type: defaults write -g ApplePressAndHoldEnabled -bool false For some reason it is not an option in System Preferences .
You need to login to post a reply.