Discuss Scratch
- TheMonsterOfTheDeep
-
1000+ posts
(keys pressed?) block
What about for this? Workaround:if <key [r v] pressed?> then
... :: grey
end
set [user input v] to (join (user input) (key pressed :: sensing))I support, but I think this might be a duplicate.
my latest extension: 2d vector math
- Ziggy741
-
1000+ posts
(keys pressed?) block
Don't get it.What about for this? Workaround:if <key [r v] pressed?> then
... :: grey
endset [user input v] to (join (user input) (key pressed :: sensing))I support, but I think this might be a duplicate.
Note that most of my posts on the forums are from years ago, probably mainly in 2016.
(Unsolved!) How can you see all the shared projects of a deleted account? And some important context. And something else about it.
Please help me answer that question. (From May 2023)
(I know I may seem desperate, the person who owned the account whose projects I am trying to find had been doing some stuff that might need to get taken down)
- NanoRook
-
1000+ posts
(keys pressed?) block
Don't get it.What about for this? Workaround:if <key [r v] pressed?> then
... :: grey
endset [user input v] to (join (user input) (key pressed :: sensing))I support, but I think this might be a duplicate.
It's just a user input variable being set.
I LOVE BEING PURPLE!!!! JOIN THE PURPLE COALITION TODAY IF YOU ALSO LOVE BEING PURPLE. PURPLE IS THE NEW BLUE! PURPLE IS THE SUPERIOR NAVBAR COLOR! YYYEAAHHHHH BABY!!!!
![](https://u.cubeupload.com/NerdRage/87eUntitled.png)
- Ziggy741
-
1000+ posts
(keys pressed?) block
OK thank you, but I didn't understand what the block was being used for in that example.Don't get it.What about for this? Workaround:if <key [r v] pressed?> then
... :: grey
endset [user input v] to (join (user input) (key pressed :: sensing))I support, but I think this might be a duplicate.
It's just a user input variable being set.
Note that most of my posts on the forums are from years ago, probably mainly in 2016.
(Unsolved!) How can you see all the shared projects of a deleted account? And some important context. And something else about it.
Please help me answer that question. (From May 2023)
(I know I may seem desperate, the person who owned the account whose projects I am trying to find had been doing some stuff that might need to get taken down)
- Sheep_maker
-
1000+ posts
(keys pressed?) block
What if multiple keys are pressed? What would it report?
Say the key “r” was pressed. Obviously, the block would report “r”
But if both “r” and “g” are pressed, the block wouldn't be “r” anymore, so
And how'll the cursor keys, enter/return, backspace/delete, delete/delete, and ctrl/command/shift/alt/option/etc. be reported via this block?
Say the key “r” was pressed. Obviously, the block would report “r”
But if both “r” and “g” are pressed, the block wouldn't be “r” anymore, so
<(keys pressed::sensing)=[r]>Wouldn't work even though the r key is being pressed.
And how'll the cursor keys, enter/return, backspace/delete, delete/delete, and ctrl/command/shift/alt/option/etc. be reported via this block?
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- TheMonsterOfTheDeep
-
1000+ posts
(keys pressed?) block
That's a good question. I think an unambiguous one (that would clearly have some limitations) is: What if multiple keys are pressed? What would it report?
Say the key “r” was pressed. Obviously, the block would report “r”
But if both “r” and “g” are pressed, the block wouldn't be “r” anymore, so<(keys pressed::sensing)=[r]>Wouldn't work even though the r key is being pressed.
And how'll the cursor keys, enter/return, backspace/delete, delete/delete, and ctrl/command/shift/alt/option/etc. be reported via this block?
(last letter pressed :: sensing)
my latest extension: 2d vector math
- Prscr
-
100+ posts
(keys pressed?) block
Support! This definitely would be helpful!
Here's an example:
Here's an example:
when green flag clickedSo the (key pressed) will report the key(s) pressed, like if I were to press b it would report b and if I were to report a and c at the same time it would report ac, correct?
forever
wait until <key [any v] pressed?>
set [words v] to (join (words ::variables) (key pressed ::sensing)
end
Last edited by Prscr (July 11, 2016 04:29:38)
- Sheep_maker
-
1000+ posts
(keys pressed?) block
By “last” does that mean the last key unpressed? If not, that still doesn't explain what happens when multiple keys are pressedThat's a good question. I think an unambiguous one (that would clearly have some limitations) is: What if multiple keys are pressed? What would it report?
Say the key “r” was pressed. Obviously, the block would report “r”
But if both “r” and “g” are pressed, the block wouldn't be “r” anymore, so<(keys pressed::sensing)=[r]>Wouldn't work even though the r key is being pressed.
And how'll the cursor keys, enter/return, backspace/delete, delete/delete, and ctrl/command/shift/alt/option/etc. be reported via this block?(last letter pressed :: sensing)
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- asivi
-
1000+ posts
(keys pressed?) block
Take a look in Ok, I want a block that senses which key was pressed and returns that key.sound and costume for a key It might be helpful for that you are needing.
like this:if <(key pressed:: sensing) = [r]> thenIt would be helpful in touch typing projects.
your stuff :: grey
end
- scratch0maker0
-
100+ posts
(keys pressed?) block
Suppose I have a custom block called text ().
Instead of this,
Instead of this,
when [a v] key pressedI can do this:
text (a) :: custom
when [b v] key pressed
text (b):: custom
when [c v] key pressed
text (c) :: custom
and on... :: grey
when green flag clicked
forever
if <key [any key v] pressed?> then
text (key pressed :: sensing) :: custom
end
end
If you cannot do great things, do small things in a great way.
Napoleon Hill
Check out my profile!
![](http://cdn.scratch.mit.edu/scratchr2/static/__81cf81d74b22ce70e108ec52fea07589__/djangobb_forum/img/smilies/big_smile.png)
I hope I helped in some way. O:-)
- Scratcher1002
-
1000+ posts
(keys pressed?) block
A simple way of doing this is letting 2 inputs being in the block at the same time.
Like, if I pressed a and b together, it'd report “a b” or “a, b”.
I support, this could be useful.
Like, if I pressed a and b together, it'd report “a b” or “a, b”.
I support, this could be useful.
・Scratcher1002は「ここにランダムな日本語の言葉はたくさんですか?はい」と言いました・
![](https://cdn2.scratch.mit.edu/get_image/project/36697388_110x90.png?v=1446761829.75)
![](https://cdn2.scratch.mit.edu/get_image/project/54427966_110x90.png?v=1446766072.72)
![](https://cdn2.scratch.mit.edu/get_image/project/78720110_110x90.png?v=1445711721.77)
![](https://cdn2.scratch.mit.edu/get_image/project/98982679_110x90.png?v=1456260954.76)
![](https://cdn2.scratch.mit.edu/get_image/project/170373288_110x90.png)
||||Search:
Topics | Users
||Studios | Projects
||
![](https://cdn2.scratch.mit.edu/get_image/project/170375403_400x320.png)
![](https://cdn2.scratch.mit.edu/get_image/project/36697388_110x90.png?v=1446761829.75)
![](https://cdn2.scratch.mit.edu/get_image/project/54427966_110x90.png?v=1446766072.72)
![](https://cdn2.scratch.mit.edu/get_image/project/78720110_110x90.png?v=1445711721.77)
![](https://cdn2.scratch.mit.edu/get_image/project/98982679_110x90.png?v=1456260954.76)
![](https://cdn2.scratch.mit.edu/get_image/project/170373288_110x90.png)
||||Search:
Topics | Users
||Studios | Projects
||
![](https://cdn2.scratch.mit.edu/get_image/project/170375403_400x320.png)
- Sheep_maker
-
1000+ posts
(keys pressed?) block
However, if the keys were separated with spaces, it'd make this intended use: A simple way of doing this is letting 2 inputs being in the block at the same time.
Like, if I pressed a and b together, it'd report “a b” or “a, b”.
I support, this could be useful.
forevernot work anymore. Maybe have them all in one string of text (without spaces other than the space key), based off the order they started to be held down?
set [input v] to (join(input)(keys pressed::sensing))
end
However, how would “upper characters” (i.e. !@#$%^&*() on US keyboards) and capital letters be reported? Currently, Scratch treats the upper characters as a unique key by itself, but capital letters as shift (technically, ctrl, alt, etc. are also considered “shift” due to Flash) + the lowercase letter. Would arrow keys and other keys that aren't necessarily a character be reported with this block as well? If so, how would they be reported? Are keys not in the key pressed? dropdown detected as well, since different language keyboards have different symbols?
Last edited by Sheep_maker (July 12, 2016 05:08:30)
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- scratch0maker0
-
100+ posts
(keys pressed?) block
I will elaborate:
However, if the keys were separated with spaces, it'd make this intended use: A simple way of doing this is letting 2 inputs being in the block at the same time.
Like, if I pressed a and b together, it'd report “a b” or “a, b”.
I support, this could be useful.forever(this^^)
set [input v] to (join(input)(keys pressed::sensing)) // this would be "key pressed", not keys pressed, since it reports the last key pressed.
//If two keys are being pressed, It will use the fact nobody can press two keys at exactly the same time.
not work anymore. Maybe have them all in one string of text (without spaces other than the space key), based off the order they started to be held down?
However, how would “upper characters” (i.e. !@#$%^&*() on US keyboards) and capital letters be reported? (as capitals)
Currently, Scratch treats the upper characters as a unique key by itself, but capital letters as shift (technically, ctrl, alt, etc. are also considered “shift” due to Flash) + the lowercase letter. ( I have no idea what your talking about.)
Would arrow keys and other keys that aren't necessarily a character be reported with this block as well? If so, how would they be reported? (think about it, NO!)
Are keys not in the key pressed? (I am looking for reports of THE key pressed, not IF A key is being pressed!) (dropdown detected as (What does this mean?)) well, since different language keyboards have different symbols? (different languages will report the same key, just like hacking an if key pressed block:<key [language key] pressed?>
That's how it would be treated)
If you cannot do great things, do small things in a great way.
Napoleon Hill
Check out my profile!
![](http://cdn.scratch.mit.edu/scratchr2/static/__81cf81d74b22ce70e108ec52fea07589__/djangobb_forum/img/smilies/big_smile.png)
I hope I helped in some way. O:-)
- Minecratch_project
-
100+ posts
(keys pressed?) block
No support
all the suggestions made here are actually workaroundables with a VERY LARGE SCRIPT, but whatever, workaroundable
PD: i will start working in the workaround
all the suggestions made here are actually workaroundables with a VERY LARGE SCRIPT, but whatever, workaroundable
PD: i will start working in the workaround
when green flag clicked
I will never give you up
Darude Sandstorm
Illuminati
Doge
Doritos
More memes
- scratch0maker0
-
100+ posts
(keys pressed?) block
But what if I don't want script that, it would easier thats all I'm saying. No support
all the suggestions made here are actually workaroundables with a VERY LARGE SCRIPT, but whatever, workaroundable
PD: i will start working in the workaround
If you cannot do great things, do small things in a great way.
Napoleon Hill
Check out my profile!
![](http://cdn.scratch.mit.edu/scratchr2/static/__81cf81d74b22ce70e108ec52fea07589__/djangobb_forum/img/smilies/big_smile.png)
I hope I helped in some way. O:-)
- Minecratch_project
-
100+ posts
(keys pressed?) block
But what if I don't want script that, it would easier thats all I'm saying. No support
all the suggestions made here are actually workaroundables with a VERY LARGE SCRIPT, but whatever, workaroundable
PD: i will start working in the workaround
Well, now you re saying… you have the reason!
semi-support
when green flag clicked
I will never give you up
Darude Sandstorm
Illuminati
Doge
Doritos
More memes
- Sheep_maker
-
1000+ posts
(keys pressed?) block
Actually, two keys can be pressed at the same time. People normally press shift + A for capital A and ctrl + C to copy selected text. I will elaborate:However, if the keys were separated with spaces, it'd make this intended use: A simple way of doing this is letting 2 inputs being in the block at the same time.
Like, if I pressed a and b together, it'd report “a b” or “a, b”.
I support, this could be useful.forever(this^^)
set [input v] to (join(input)(keys pressed::sensing)) // this would be "key pressed", not keys pressed, since it reports the last key pressed.
//If two keys are being pressed, It will use the fact nobody can press two keys at exactly the same time.
not work anymore. Maybe have them all in one string of text (without spaces other than the space key), based off the order they started to be held down?
However, how would “upper characters” (i.e. !@#$%^&*() on US keyboards) and capital letters be reported? (as capitals)
Currently, Scratch treats the upper characters as a unique key by itself, but capital letters as shift (technically, ctrl, alt, etc. are also considered “shift” due to Flash) + the lowercase letter. ( I have no idea what your talking about.)
Would arrow keys and other keys that aren't necessarily a character be reported with this block as well? If so, how would they be reported? (think about it, NO!)
Are keys not in the key pressed? (I am looking for reports of THE key pressed, not IF A key is being pressed!) (dropdown detected as (What does this mean?)) well, since different language keyboards have different symbols? (different languages will report the same key, just like hacking an if key pressed block:<key [language key] pressed?>
That's how it would be treated)
Currently, the key pressed? boolean reports true when the specified key has been held down. Here you're saying that multiple keys can't be held down at the same time.
If I pressed “b,” let go, then pressed and held “a” first and “c” a bit later, what would the block report now? Both “a” and “c” held down, so key a pressed? and key c pressed? will both return true. You said that the key pressed reporter reports the last key pressed, but that's still a bit ambiguous. “b” is the last key unpressed and “c” is the last key that has started to be pressed, but “a” is still being held down, so which of those would the block report?
There can be multiple keys pressed, depending on what you mean by “pressed,” so there can't just be the key pressed.
- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
- scratch0maker0
-
100+ posts
(keys pressed?) block
Good point. I didn't think of that.Actually, two keys can be pressed at the same time. People normally press shift + A for capital A and ctrl + C to copy selected text. I will elaborate:However, if the keys were separated with spaces, it'd make this intended use: A simple way of doing this is letting 2 inputs being in the block at the same time.
Like, if I pressed a and b together, it'd report “a b” or “a, b”.
I support, this could be useful.forever(this^^)
set [input v] to (join(input)(keys pressed::sensing)) // this would be "key pressed", not keys pressed, since it reports the last key pressed.
//If two keys are being pressed, It will use the fact nobody can press two keys at exactly the same time.
not work anymore. Maybe have them all in one string of text (without spaces other than the space key), based off the order they started to be held down?
However, how would “upper characters” (i.e. !@#$%^&*() on US keyboards) and capital letters be reported? (as capitals)
Currently, Scratch treats the upper characters as a unique key by itself, but capital letters as shift (technically, ctrl, alt, etc. are also considered “shift” due to Flash) + the lowercase letter. ( I have no idea what your talking about.)
Would arrow keys and other keys that aren't necessarily a character be reported with this block as well? If so, how would they be reported? (think about it, NO!)
Are keys not in the key pressed? (I am looking for reports of THE key pressed, not IF A key is being pressed!) (dropdown detected as (What does this mean?)) well, since different language keyboards have different symbols? (different languages will report the same key, just like hacking an if key pressed block:<key [language key] pressed?>
That's how it would be treated)
Currently, the key pressed? boolean reports true when the specified key has been held down. Here you're saying that multiple keys can't be held down at the same time.
If I pressed “b,” let go, then pressed and held “a” first and “c” a bit later, what would the block report now? Both “a” and “c” held down, so key a pressed? and key c pressed? will both return true. You said that the key pressed reporter reports the last key pressed, but that's still a bit ambiguous. “b” is the last key unpressed and “c” is the last key that has started to be pressed, but “a” is still being held down, so which of those would the block report?
There can be multiple keys pressed, depending on what you mean by “pressed,” so there can't just be the key pressed.
![](http://cdn.scratch.mit.edu/scratchr2/static/__c7362f65c857ab381a4bd44e85accc57__/djangobb_forum/img/smilies/roll.png)
If you cannot do great things, do small things in a great way.
Napoleon Hill
Check out my profile!
![](http://cdn.scratch.mit.edu/scratchr2/static/__81cf81d74b22ce70e108ec52fea07589__/djangobb_forum/img/smilies/big_smile.png)
I hope I helped in some way. O:-)