To be honest, I'm very annoyed that Scratch limits key controls to only letters, numbers, and arrow keys. And you can only left-click.
There should be more key support in Scratch 2.0, allowing you to have more key controls, whether you're making a game, or an online experiment, or whatever. It should at least include "when Shift", "Alt", and "Ctrl pressed". And, if it's possible, it would be cool if there was even Left Shift, Right Shift, Left Alt, etc.
This way you could also have a script saying
if <(key [right shift v] pressed?) and (key [3 v] pressed?)> add [#] to [list v] endThis next thing is different, but it would work with more key controls. If you could copy/paste from clipboard:
if <(key [left ctrl v] pressed?) and (key [v v] pressed?)> set [clipboard variable v] to (clipboard) replace item (1 v) of [list v] with (clipboard variable) end if <(key [left ctrl v] pressed?) and (key [c v] pressed?)> set [clipboard variable v] to (selected text variable) copy (clipboard variable) to clipboard endThe clipboard would actually be a sensing reporter.
Offline
Lightnin says we could add more keys, but we would need to keep the list from growing too large, and also we'd need to keep in mind that some devices may not have those keys. (If scratch ever goes on Android, then the ctrl, alt functions will be useless since Android has neither).
I want the copy thing though.
I dont think the right-mouse button is possible since then there would be no way to adjust the flash player settings (just right click on any old project and you will see). And not all mice have middle buttons so that probably isnt a good idea.
Offline
Wes64 wrote:
... also we'd need to keep in mind that some devices may not have those keys. (If scratch ever goes on Android, then the ctrl, alt functions will be useless since Android has neither).
... I dont think the right-mouse button is possible since then there would be no way to adjust the flash player settings (just right click on any old project and you will see). And not all mice have middle buttons so that probably isnt a good idea.
I never thought about that, actually.
I don't have any kind of cell phone, but can Android support Flash?
About the right mouse button, I've seen quite a bit of projects with this kind of sensor, but you would need to download or else use the Java player.
Since Scratch is completely switching to Flash, the same thing would still happen, so you'd either have to download to get all the features of the project, or you could implement the Online/Offline sensor in your project.
And a lot of mice without middle mouse buttons are quite old, but I do see your point. As far as I know, a lot of modern laptops have middle mouse buttons, but no wheel. So I agree with you on that, it probably isn't a very good idea.
Offline
berberberber wrote:
Most mice have the scrolling wheel...
Anyway, I'd like:<key [any v] pressed?>
that would be quite useful, I mean the only alternative is a chain of 41 booleans in a bunch of ()or()'s.
Offline
berberberber wrote:
Most mice have the scrolling wheel...
Anyway, I'd like:<key [any v] pressed?>
Support.
I think the only current way is to do
<<(key [up arrow] pressed?) or (key [down arrow] pressed?)> or (key [left arrow] pressed?)>etc. then
<<(key [a] pressed?) or (key [b] pressed?)> or (key [c] pressed?)>etc.
Offline